|
|
"use strict";var YN=Object.defineProperty;var UN=(e,t,n)=>t in e?YN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var De=(e,t,n)=>(UN(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const C=require("obsidian"),Lw=require("@codemirror/language"),Cm=require("@codemirror/state"),ul=require("@codemirror/view");function zN(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Vr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lx={exports:{}},tm={},ux={exports:{}},ln={},yD;function VN(){if(yD)return ln;yD=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function v(K){return K===null||typeof K!="object"?null:(K=g&&K[g]||K["@@iterator"],typeof K=="function"?K:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,T={};function I(K,re,pe){this.props=K,this.context=re,this.refs=T,this.updater=pe||w}I.prototype.isReactComponent={},I.prototype.setState=function(K,re){if(typeof K!="object"&&typeof K!="function"&&K!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,K,re,"setState")},I.prototype.forceUpdate=function(K){this.updater.enqueueForceUpdate(this,K,"forceUpdate")};function k(){}k.prototype=I.prototype;function A(K,re,pe){this.props=K,this.context=re,this.refs=T,this.updater=pe||w}var R=A.prototype=new k;R.constructor=A,D(R,I.prototype),R.isPureReactComponent=!0;var j=Array.isArray,B=Object.prototype.hasOwnProperty,L={current:null},Z={key:!0,ref:!0,__self:!0,__source:!0};function U(K,re,pe){var Ie,Oe={},Ne=null,Be=null;if(re!=null)for(Ie in re.ref!==void 0&&(Be=re.ref),re.key!==void 0&&(Ne=""+re.key),re)B.call(re,Ie)&&!Z.hasOwnProperty(Ie)&&(Oe[Ie]=re[Ie]);var Je=arguments.length-2;if(Je===1)Oe.children=pe;else if(1<Je){for(var ze=Array(Je),Qe=0;Qe<Je;Qe++)ze[Qe]=arguments[Qe+2];Oe.children=ze}if(K&&K.defaultProps)for(Ie in Je=K.defaultProps,Je)Oe[Ie]===void 0&&(Oe[Ie]=Je[Ie]);return{$$typeof:e,type:K,key:Ne,ref:Be,props:Oe,_owner:L.current}}function z(K,re){return{$$typeof:e,type:K.type,key:re,ref:K.ref,props:K.props,_owner:K._owner}}function $(K){return typeof K=="object"&&K!==null&&K.$$typeof===e}function te(K){var re={"=":"=0",":":"=2"};return"$"+K.replace(/[=:]/g,function(pe){return re[pe]})}var Q=/\/+/g;function ue(K,re){return typeof K=="object"&&K!==null&&K.key!=null?te(""+K.key):re.toString(36)}function ee(K,re,pe,Ie,Oe){var Ne=typeof K;(Ne==="undefined"||Ne==="boolean")&&(K=null);var Be=!1;if(K===null)Be=!0;else switch(Ne){case"string":case"number":Be=!0;break;case"object":switch(K.$$typeof){case e:case t:Be=!0}}if(Be)return Be=K,Oe=Oe(Be),K=Ie===""?"."+ue(Be,0):Ie,j(Oe)?(pe="",K!=null&&(pe=K.replace(Q,"$&/")+"/"),ee(Oe,re,pe,"",function(Qe){return Qe})):Oe!=null&&($(Oe)&&(Oe=z(Oe,pe+(!Oe.key||Be&&Be.key===Oe.key?"":(""+Oe.key).replace(Q,"$&/")+"/")+K)),re.push(Oe)),1;if(Be=0,Ie=Ie===""?".":Ie+":",j(K))for(var Je=0;Je<K.length;Je++){Ne=K[Je];var ze=Ie+ue(Ne,Je);Be+=ee(Ne,re,pe,ze,Oe)}else if(ze=v(K),typeof ze=="function")for(K=ze.call(K),Je=0;!(Ne=K.next()).done;)Ne=Ne.value,ze=Ie+ue(Ne,Je++),Be+=ee(Ne,re,pe,ze,Oe);else if(Ne==="object")throw re=String(K),Error("Objects are not valid as a React child (found: "+(re==="[object Object]"?"object with keys {"+Object.keys(K).join(", ")+"}":re)+"). If you meant to render a collection of children, use an array instead.");return Be}function le(K,re,pe){if(K==null)return K;var Ie=[],Oe=0;return ee(K,Ie,"","",function(Ne){return re.call(pe,Ne,Oe++)}),Ie}function W(K){if(K._status===-1){var re=K._result;re=re(),re.then(function(pe){(K._status===0||K._status===-1)&&(K._status=1,K._result=pe)},function(pe){(K._status===0||K._status===-1)&&(K._status=2,K._result=pe)}),K._status===-1&&(K._status=0,K._result=re)}if(K._status===1)return K._result.default;throw K._result}var de={current:null},oe={transition:null},he={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:oe,ReactCurrentOwner:L};return ln.Children={map:le,forEach:function(K,re,pe){le(K,function(){re.apply(this,arguments)},pe)},count:function(K){var re=0;return le(K,function(){re++}),re},toArray:function(K){return le(K,function(re){return re})||[]},only:function(K){if(!$(K))throw Error("React.Children.only expected to receive a single React element child.");return K}},ln.Component=I,ln.Fragment=n,ln.Profiler=o,ln.PureComponent=A,ln.StrictMode=r,ln.Suspense=d,ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=he,ln.cloneElement=function(K,re,pe){if(K==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+K+".");var Ie=D({},K.props),Oe=K.key,Ne=K.ref,Be=K._owner;if(re!=null){if(re.ref!==void 0&&(Ne=re.ref,Be=L.current),re.key!==void 0&&(Oe=""+re.key),K.type&&K.type.defaultProps)var Je=K.type.defaultProps;for(ze in re)B.call(re,ze)&&!Z.hasOwnProperty(ze)&&(Ie[ze]=re[ze]===void 0&&Je!==void 0?Je[ze]:re[ze])}var ze=arguments.length-2;if(ze===1)Ie.children=pe;else if(1<ze){Je=Array(ze);for(var Qe=0;Qe<ze;Qe++)Je[Qe]=arguments[Qe+2];Ie.children=Je}return{$$typeof:e,type:K.type,key:Oe,ref:Ne,props:Ie,_owner:Be}},ln.createContext=function(K){return K={$$typeof:a,_currentValue:K,_currentValue2:K,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},K.Provider={$$typeof:i,_context:K},K.Consumer=K},ln.createElement=U,ln.createFactory=function(K){var re=U.bind(null,K);return re.type=K,re},ln.createRef=function(){return{current:null}},ln.forwardRef=function(K){return{$$typeof:u,render:K}},ln.isValidElement=$,ln.lazy=function(K){return{$$typeof:m,_payload:{_status:-1,_result:K},_init:W}},ln.memo=function(K,re){return{$$typeof:f,type:K,compare:re===void 0?null:re}},ln.startTransition=function(K){var re=oe.transition;oe.transition={};try{K()}finally{oe.transition=re}},ln.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},ln.useCallback=function(K,re){return de.current.useCallback(K,re)},ln.useContext=function(K){return de.current.useContext(K)},ln.useDebugValue=function(){},ln.useDeferredValue=function(K){return de.current.useDeferredValue(K)},ln.useEffect=function(K,re){return de.current.useEffect(K,re)},ln.useId=function(){return de.current.useId()},ln.useImperativeHandle=function(K,re,pe){return de.current.useImperativeHandle(K,re,pe)},ln.useInsertionEffect=function(K,re){return de.current.useInsertionEffect(K,re)},ln.useLayoutEffect=function(K,re){return de.current.useLayoutEffect(K,re)},ln.useMemo=function(K,re){return de.current.useMemo(K,re)},ln.useReducer=function(K,re,pe){return de.current.useReducer(K,re,pe)},ln.useRef=function(K){return de.current.useRef(K)},ln.useState=function(K){return de.current.useState(K)},ln.useSyncExternalStore=function(K,re,pe){return de.current.useSyncExternalStore(K,re,pe)},ln.useTransition=function(){return de.current.useTransition()},ln.version="18.2.0",ln}ux.exports=VN();var F=ux.exports;const se=$r(F),WN=zN({__proto__:null,default:se},[F]);var vD;function ZN(){if(vD)return tm;vD=1;var e=F,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(u,d,f){var m,g={},v=null,w=null;f!==void 0&&(v=""+f),d.key!==void 0&&(v=""+d.key),d.ref!==void 0&&(w=d.ref);for(m in d)r.call(d,m)&&!i.hasOwnProperty(m)&&(g[m]=d[m]);if(u&&u.defaultProps)for(m in d=u.defaultProps,d)g[m]===void 0&&(g[m]=d[m]);return{$$typeof:t,type:u,key:v,ref:w,props:g,_owner:o.current}}return tm.Fragment=n,tm.jsx=a,tm.jsxs=a,tm}lx.exports=ZN();var y=lx.exports;const Ra=e=>{const{children:t,store:n,context:r}=e,[o,i]=F.useState(n.getState());return F.useEffect(()=>{const a=n.subscribe(u=>{i(u)});return()=>{a()}},[]),y.jsx(r.Provider,{value:o,children:t})};function $N(e){const t=Object.keys(e),n={};for(const r of t)typeof e[r]=="function"&&(n[r]=e[r]);return(r={},o)=>{let i=!1;const a={};for(const u of t){const d=r[u],f=n[u](d,o);a[u]=f,i=i||f!==d}return i?a:r}}function qN(e,t){const n=[];let r=e;return{dispatch:u=>{const d=t(r,u),f=r;r=d;for(const m of n)m(r,f)},getState:()=>r,subscribe:u=>{let d=!0;return n.push(u),()=>{if(!d)return;const f=n.indexOf(u);n.splice(f,1),d=!1}}}}function GN(e,t){switch(t.type){case"SET_MARK_MEMO_ID":return t.payload.markMemoId===e.markMemoId?e:{...e,markMemoId:t.payload.markMemoId};case"SET_EDIT_MEMO_ID":return t.payload.editMemoId===e.editMemoId?e:{...e,editMemoId:t.payload.editMemoId};case"SET_GLOBAL_EDITOR_SHOWN":return t.payload.globalEditorShown===e.globalEditorShown?e:{...e,globalEditorShown:t.payload.globalEditorShown};case"SET_COMMENT_MEMO_ID":return t.payload.commentMemoId===e.commentMemoId?e:{...e,commentMemoId:t.payload.commentMemoId};case"SET_MOBILE_VIEW":return t.payload.isMobileView===e.isMobileView?e:{...e,isMobileView:t.payload.isMobileView};case"SET_CHANGED_BY_MEMOS":return t.payload.changedByMemos===e.changedByMemos?e:{...e,changedByMemos:t.payload.changedByMemos};case"SET_REFRESH":return t.payload.refresh===e.refresh?e:{...e,refresh:t.payload.refresh};case"SET_INSTANCE":return{...e,instanceList:e.instanceList.set(t.payload.id,t.payload.instance)};case"SET_SHOW_SIDEBAR_IN_MOBILE_VIEW":return t.payload.showSiderbarInMobileView===e.showSiderbarInMobileView?e:{...e,showSiderbarInMobileView:t.payload.showSiderbarInMobileView};case"SET_MEMO_LIST_VIEW":return t.payload.memoListView===e.memoListView?e:{...e,memoListView:t.payload.memoListView};case"SET_MEMO_PLUGIN_MANIFEST":return{...e,manifest:t.payload.manifest};case"SET_LOADED":return{...e,loaded:t.payload.loaded};case"SET_EXIT_STEPS":return{...e,exited:t.payload.exited};case"SET_LOCKED":return{...e,locked:t.payload.locked};case"SET_APP_SETTING":return{...e,...t.payload};default:return e}}const JN={markMemoId:"",editMemoId:"",commentMemoId:"",shouldSplitMemoWord:!0,shouldHideImageUrl:!0,shouldUseMarkdownParser:!0,useTinyUndoHistoryCache:!1,isMobileView:!1,showSiderbarInMobileView:!1,changedByMemos:!1,memoListView:null,manifest:null,refresh:!1,loaded:!1,globalEditorShown:!1,instanceList:new Map,locked:!1,exited:!1};function KN(e,t){switch(t.type){case"RELOAD":return cx;case"SET_LOCATION":return t.payload;case"SET_PATHNAME":return t.payload.pathname===e.pathname?e:{...e,pathname:t.payload.pathname};case"SET_HASH":return t.payload.hash===e.hash?e:{...e,hash:t.payload.hash};case"SET_QUERY":return{...e,query:{...t.payload}};case"SET_TAG_QUERY":return t.payload.tag===e.query.tag?e:{...e,query:{...e.query,tag:t.payload.tag}};case"SET_DURATION_QUERY":return t.payload.duration===e.query.duration?e:{...e,query:{...e.query,duration:{...e.query.duration,...t.payload.duration}}};case"SET_TYPE":return t.payload.type===e.query.type?e:{...e,query:{...e.query,type:t.payload.type}};case"SET_TEXT":return t.payload.text===e.query.text?e:{...e,query:{...e.query,text:t.payload.text}};case"SET_QUERY_FILTER":return t.payload===e.query.filter?e:{...e,query:{...e.query,filter:t.payload}};default:return e}}const cx={pathname:"/",hash:"",query:{tag:"",duration:null,type:"",text:"",filter:""}};var un={};Object.defineProperty(un,"__esModule",{value:!0});var sr=C;const Mb="YYYY-MM-DD",kb="gggg-[W]ww",dx="YYYY-MM",fx="YYYY-[Q]Q",hx="YYYY";function qm(e){var n,r;const t=window.app.plugins.getPlugin("periodic-notes");return t&&((r=(n=t.settings)==null?void 0:n[e])==null?void 0:r.enabled)}function Gm(){var e,t,n,r;try{const{internalPlugins:o,plugins:i}=window.app;if(qm("daily")){const{format:f,folder:m,template:g}=((t=(e=i.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.daily)||{};return{format:f||Mb,folder:(m==null?void 0:m.trim())||"",template:(g==null?void 0:g.trim())||""}}const{folder:a,format:u,template:d}=((r=(n=o.getPluginById("daily-notes"))==null?void 0:n.instance)==null?void 0:r.options)||{};return{format:u||Mb,folder:(a==null?void 0:a.trim())||"",template:(d==null?void 0:d.trim())||""}}catch{}}function Jm(){var e,t,n,r,o,i,a;try{const u=window.app.plugins,d=(e=u.getPlugin("calendar"))==null?void 0:e.options,f=(n=(t=u.getPlugin("periodic-notes"))==null?void 0:t.settings)==null?void 0:n.weekly;if(qm("weekly"))return{format:f.format||kb,folder:((r=f.folder)==null?void 0:r.trim())||"",template:((o=f.template)==null?void 0:o.trim())||""};const m=d||{};return{format:m.weeklyNoteFormat||kb,folder:((i=m.weeklyNoteFolder)==null?void 0:i.trim())||"",template:((a=m.weeklyNoteTemplate)==null?void 0:a.trim())||""}}catch{}}function Km(){var t,n,r,o;const e=window.app.plugins;try{const i=qm("monthly")&&((n=(t=e.getPlugin("periodic-notes"))==null?void 0:t.settings)==null?void 0:n.monthly)||{};return{format:i.format||dx,folder:((r=i.folder)==null?void 0:r.trim())||"",template:((o=i.template)==null?void 0:o.trim())||""}}catch{}}function Qm(){var t,n,r,o;const e=window.app.plugins;try{const i=qm("quarterly")&&((n=(t=e.getPlugin("periodic-notes"))==null?void 0:t.settings)==null?void 0:n.quarterly)||{};return{format:i.format||fx,folder:((r=i.folder)==null?void 0:r.trim())||"",template:((o=i.template)==null?void 0:o.trim())||""}}catch{}}function Xm(){var t,n,r,o;const e=window.app.plugins;try{const i=qm("yearly")&&((n=(t=e.getPlugin("periodic-notes"))==null?void 0:t.settings)==null?void 0:n.yearly)||{};return{format:i.format||hx,folder:((r=i.folder)==null?void 0:r.trim())||"",template:((o=i.template)==null?void 0:o.trim())||""}}catch{}}function px(...e){let t=[];for(let r=0,o=e.length;r<o;r++)t=t.concat(e[r].split("/"));const n=[];for(let r=0,o=t.length;r<o;r++){const i=t[r];!i||i==="."||n.push(i)}return t[0]===""&&n.unshift(""),n.join("/")}function QN(e){let t=e.substring(e.lastIndexOf("/")+1);return t.lastIndexOf(".")!=-1&&(t=t.substring(0,t.lastIndexOf("."))),t}async function XN(e){const t=e.replace(/\\/g,"/").split("/");if(t.pop(),t.length){const n=px(...t);window.app.vault.getAbstractFileByPath(n)||await window.app.vault.createFolder(n)}}async function eg(e,t){t.endsWith(".md")||(t+=".md");const n=sr.normalizePath(px(e,t));return await XN(n),n}async function Eh(e){const{metadataCache:t,vault:n}=window.app,r=sr.normalizePath(e);if(r==="/")return Promise.resolve(["",null]);try{const o=t.getFirstLinkpathDest(r,""),i=await n.cachedRead(o),a=window.app.foldManager.load(o);return[i,a]}catch(o){return console.error(`Failed to read the daily note template '${r}'`,o),new sr.Notice("Failed to read the daily note template"),["",null]}}function ys(e,t="day"){const n=e.clone().startOf(t).format();return`${t}-${n}`}function mx(e){return e.replace(/\[[^\]]*\]/g,"")}function eA(e,t){if(t==="week"){const n=mx(e);return/w{1,2}/i.test(n)&&(/M{1,4}/.test(n)||/D{1,4}/.test(n))}return!1}function Ch(e,t){return gx(e.basename,t)}function tA(e,t){return gx(QN(e),t)}function gx(e,t){const r={day:Gm,week:Jm,month:Km,quarter:Qm,year:Xm}[t]().format.split("/").pop(),o=window.moment(e,r,!0);if(!o.isValid())return null;if(eA(r,t)&&t==="week"){const i=mx(r);if(/w{1,2}/i.test(i))return window.moment(e,r.replace(/M{1,4}/g,"").replace(/D{1,4}/g,""),!1)}return o}class nA extends Error{}async function yx(e){const t=window.app,{vault:n}=t,r=window.moment,{template:o,format:i,folder:a}=Gm(),[u,d]=await Eh(o),f=e.format(i),m=await eg(a,f);try{const g=await n.create(m,u.replace(/{{\s*date\s*}}/gi,f).replace(/{{\s*time\s*}}/gi,r().format("HH:mm")).replace(/{{\s*title\s*}}/gi,f).replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(v,w,D,T,I,k)=>{const A=r(),R=e.clone().set({hour:A.get("hour"),minute:A.get("minute"),second:A.get("second")});return D&&R.add(parseInt(T,10),I),k?R.format(k.substring(1).trim()):R.format(i)}).replace(/{{\s*yesterday\s*}}/gi,e.clone().subtract(1,"day").format(i)).replace(/{{\s*tomorrow\s*}}/gi,e.clone().add(1,"d").format(i)));return t.foldManager.save(g,d),g}catch(g){console.error(`Failed to create file: '${m}'`,g),new sr.Notice("Unable to create new file.")}}function rA(e,t){return t[ys(e,"day")]??null}function oA(){const{vault:e}=window.app,{folder:t}=Gm(),n=e.getAbstractFileByPath(sr.normalizePath(t));if(!n)throw new nA("Failed to find daily notes folder");const r={};return sr.Vault.recurseChildren(n,o=>{if(o instanceof sr.TFile){const i=Ch(o,"day");if(i){const a=ys(i,"day");r[a]=o}}}),r}class iA extends Error{}function aA(){const{moment:e}=window;let t=e.localeData()._week.dow;const n=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];for(;t;)n.push(n.shift()),t--;return n}function sA(e){return aA().indexOf(e.toLowerCase())}async function vx(e){const{vault:t}=window.app,{template:n,format:r,folder:o}=Jm(),[i,a]=await Eh(n),u=e.format(r),d=await eg(o,u);try{const f=await t.create(d,i.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(m,g,v,w,D,T)=>{const I=window.moment(),k=e.clone().set({hour:I.get("hour"),minute:I.get("minute"),second:I.get("second")});return v&&k.add(parseInt(w,10),D),T?k.format(T.substring(1).trim()):k.format(r)}).replace(/{{\s*title\s*}}/gi,u).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi,(m,g,v)=>{const w=sA(g);return e.weekday(w).format(v.trim())}));return window.app.foldManager.save(f,a),f}catch(f){console.error(`Failed to create file: '${d}'`,f),new sr.Notice("Unable to create new file.")}}function lA(e,t){return t[ys(e,"week")]??null}function uA(){const e={};if(!bx())return e;const{vault:t}=window.app,{folder:n}=Jm(),r=t.getAbstractFileByPath(sr.normalizePath(n));if(!r)throw new iA("Failed to find weekly notes folder");return sr.Vault.recurseChildren(r,o=>{if(o instanceof sr.TFile){const i=Ch(o,"week");if(i){const a=ys(i,"week");e[a]=o}}}),e}class cA extends Error{}async function wx(e){const{vault:t}=window.app,{template:n,format:r,folder:o}=Km(),[i,a]=await Eh(n),u=e.format(r),d=await eg(o,u);try{const f=await t.create(d,i.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(m,g,v,w,D,T)=>{const I=window.moment(),k=e.clone().set({hour:I.get("hour"),minute:I.get("minute"),second:I.get("second")});return v&&k.add(parseInt(w,10),D),T?k.format(T.substring(1).trim()):k.format(r)}).replace(/{{\s*date\s*}}/gi,u).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,u));return window.app.foldManager.save(f,a),f}catch(f){console.error(`Failed to create file: '${d}'`,f),new sr.Notice("Unable to create new file.")}}function dA(e,t){return t[ys(e,"month")]??null}function fA(){const e={};if(!Sx())return e;const{vault:t}=window.app,{folder:n}=Km(),r=t.getAbstractFileByPath(sr.normalizePath(n));if(!r)throw new cA("Failed to find monthly notes folder");return sr.Vault.recurseChildren(r,o=>{if(o instanceof sr.TFile){const i=Ch(o,"month");if(i){const a=ys(i,"month");e[a]=o}}}),e}class hA extends Error{}async function pA(e){const{vault:t}=window.app,{template:n,format:r,folder:o}=Qm(),[i,a]=await Eh(n),u=e.format(r),d=await eg(o,u);try{const f=await t.create(d,i.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(m,g,v,w,D,T)=>{const I=window.moment(),k=e.clone().set({hour:I.get("hour"),minute:I.get("minute"),second:I.get("second")});return v&&k.add(parseInt(w,10),D),T?k.format(T.substring(1).trim()):k.format(r)}).replace(/{{\s*date\s*}}/gi,u).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,u));return window.app.foldManager.save(f,a),f}catch(f){console.error(`Failed to create file: '${d}'`,f),new sr.Notice("Unable to create new file.")}}function mA(e,t){return t[ys(e,"quarter")]??null}function gA(){const e={};if(!Dx())return e;const{vault:t}=window.app,{folder:n}=Qm(),r=t.getAbstractFileByPath(sr.normalizePath(n));if(!r)throw new hA("Failed to find quarterly notes folder");return sr.Vault.recurseChildren(r,o=>{if(o instanceof sr.TFile){const i=Ch(o,"quarter");if(i){const a=ys(i,"quarter");e[a]=o}}}),e}class yA extends Error{}async function vA(e){const{vault:t}=window.app,{template:n,format:r,folder:o}=Xm(),[i,a]=await Eh(n),u=e.format(r),d=await eg(o,u);try{const f=await t.create(d,i.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(m,g,v,w,D,T)=>{const I=window.moment(),k=e.clone().set({hour:I.get("hour"),minute:I.get("minute"),second:I.get("second")});return v&&k.add(parseInt(w,10),D),T?k.format(T.substring(1).trim()):k.format(r)}).replace(/{{\s*date\s*}}/gi,u).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,u));return window.app.foldManager.save(f,a),f}catch(f){console.error(`Failed to create file: '${d}'`,f),new sr.Notice("Unable to create new file.")}}function wA(e,t){return t[ys(e,"year")]??null}function bA(){const e={};if(!Tx())return e;const{vault:t}=window.app,{folder:n}=Xm(),r=t.getAbstractFileByPath(sr.normalizePath(n));if(!r)throw new yA("Failed to find yearly notes folder");return sr.Vault.recurseChildren(r,o=>{if(o instanceof sr.TFile){const i=Ch(o,"year");if(i){const a=ys(i,"year");e[a]=o}}}),e}function SA(){var r,o;const{app:e}=window,t=e.internalPlugins.plugins["daily-notes"];if(t&&t.enabled)return!0;const n=e.plugins.getPlugin("periodic-notes");return n&&((o=(r=n.settings)==null?void 0:r.daily)==null?void 0:o.enabled)}function bx(){var n,r;const{app:e}=window;if(e.plugins.getPlugin("calendar"))return!0;const t=e.plugins.getPlugin("periodic-notes");return t&&((r=(n=t.settings)==null?void 0:n.weekly)==null?void 0:r.enabled)}function Sx(){var n,r;const{app:e}=window,t=e.plugins.getPlugin("periodic-notes");return t&&((r=(n=t.settings)==null?void 0:n.monthly)==null?void 0:r.enabled)}function Dx(){var n,r;const{app:e}=window,t=e.plugins.getPlugin("periodic-notes");return t&&((r=(n=t.settings)==null?void 0:n.quarterly)==null?void 0:r.enabled)}function Tx(){var n,r;const{app:e}=window,t=e.plugins.getPlugin("periodic-notes");return t&&((r=(n=t.settings)==null?void 0:n.yearly)==null?void 0:r.enabled)}function DA(e){const t={day:Gm,week:Jm,month:Km,quarter:Qm,year:Xm}[e];return t()}function TA(e,t){return{day:yx,month:wx,week:vx}[e](t)}un.DEFAULT_DAILY_NOTE_FORMAT=Mb;un.DEFAULT_MONTHLY_NOTE_FORMAT=dx;un.DEFAULT_QUARTERLY_NOTE_FORMAT=fx;un.DEFAULT_WEEKLY_NOTE_FORMAT=kb;un.DEFAULT_YEARLY_NOTE_FORMAT=hx;var Mm=un.appHasDailyNotesPluginLoaded=SA;un.appHasMonthlyNotesPluginLoaded=Sx;un.appHasQuarterlyNotesPluginLoaded=Dx;un.appHasWeeklyNotesPluginLoaded=bx;un.appHasYearlyNotesPluginLoaded=Tx;var Ix=un.createDailyNote=yx;un.createMonthlyNote=wx;un.createPeriodicNote=TA;un.createQuarterlyNote=pA;un.createWeeklyNote=vx;un.createYearlyNote=vA;var su=un.getAllDailyNotes=oA;un.getAllMonthlyNotes=fA;un.getAllQuarterlyNotes=gA;un.getAllWeeklyNotes=uA;un.getAllYearlyNotes=bA;var e0=un.getDailyNote=rA,oc=un.getDailyNoteSettings=Gm,lh=un.getDateFromFile=Ch;un.getDateFromPath=tA;un.getDateUID=ys;un.getMonthlyNote=dA;un.getMonthlyNoteSettings=Km;un.getPeriodicNoteSettings=DA;un.getQuarterlyNote=mA;un.getQuarterlyNoteSettings=Qm;un.getTemplateInfo=Eh;un.getWeeklyNote=lA;un.getWeeklyNoteSettings=Jm;un.getYearlyNote=wA;un.getYearlyNoteSettings=Xm;const IA={},xA={},EA={},CA={},xx={welcome:"Welcome to Thino",ribbonIconTitle:"Thino",to:"to",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan.","Feb.","Mar.","Apr.","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."],weekDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekDaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],year:null,month:null,"Basic Options":"Basic options","User name":"User name","Set your user name here. 'Memos 😏' By default":"Set your user name here. 'Thino 😏' By default",'You can set target heading like "# Heading" to control data location':'You can set target heading like "# Heading" to control data location',"Insert after heading":"Insert after heading","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"You should set the same heading below if you want to insert and process thino below the same heading.","Allows admonitions to be created using ":"Allows admonitions to be created using ","Process Memos below":"Process thino below","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.","Save Memo button label":"Save thino button label","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"The text shown on the save Thino button in the UI. 'NOTEIT' by default.","Focus on editor when open memos":"Focus on editor when open thino","Focus on editor when open memos. Focus by default.":"Focus on editor when open thino. Focus by default.","Open daily memos with open memos":"Open daily thino with open thino","Open daily memos with open memos. Open by default.":"Open daily thino with open thino. Open by default.","Open Memos when obsidian opens":"Open Thino when obsidian opens","When enable this, Memos will open when Obsidian opens. False by default.":"When enable this, Thino will open when Obsidian opens. False by default.","Hide done tasks in Memo list":"Hide done tasks in Thino list","Hide all done tasks in Memo list. Show done tasks by default.":"Hide all done tasks in Thino list. Show done tasks by default.","Advanced Options":"Advanced Options","UI language for date":"UI language for date","Translates the date UI language. Only 'en' and 'zh' are available.":"Translates the date UI language. Only 'en' and 'zh' are available.","Default prefix when save thino":"Default prefix when save thino","Set the default prefix when create memo, 'List' by default.":"Set the default prefix when create thino, 'List' by default.","Default insert date format":"Default insert date format","Set the default date format when insert date by @, 'Tasks' by default.":"Set the default date format when insert date by @, 'Tasks' by default.","Default editor position on mobile":"Default editor position on mobile","Set the default editor position on Mobile, 'Top' by default.":"Set the default editor position on Mobile, 'Top' by default.","Use button to show editor on mobile":"Use button to show editor on mobile","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Set a float button to call editor on mobile. Only when editor located at the bottom works.","Show Time When Copy Results":"Show Time When Copy Results","Show time when you copy results, like 12:00. Copy time by default.":"Show time when you copy results, like 12:00. Copy time by default.","Show Date When Copy Results":"Show Date When Copy Results","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"Show date when you copy results, like [[2022-01-01]]. Copy date by default.","Add Blank Line Between Different Date":"Add Blank Line Between Different Date","Add blank line when copy result with date. No blank line by default.":"Add blank line when copy result with date. No blank line by default.","Share Options":"Share Options","Share Memos Image Footer Start":"Share Thino Image Footer Start","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default","Share Memos Image Footer End":"Share Thino Image Footer End","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default","Save Shared Image To Folder For Mobile":"Save Shared Image To Folder For Mobile","Save image to folder for mobile. False by Default":"Save image to folder for mobile. False by Default","Say Thank You":"Say Thank You",Donate:"Donate","If you like this plugin, consider donating to support continued development:":"If you like this plugin, consider donating to support continued development:","File Name of Recycle Bin":"File Name of Recycle Bin","Set the filename for recycle bin. 'delete' By default":"Set the filename for recycle bin. 'delete' By default","File Name of Query File":"File Name of Query File","Set the filename for query file. 'query' By default":"Set the filename for query file. 'query' By default","Use Tags In Vault":"Use Tags In Vault","Use tags in vault rather than only in Memos. False by default.":"Use tags in vault rather than only in Thino. False by default.","Ready to convert image into background":"Ready to convert image into background",List:"List",Task:"Task",Top:"Top",Bottom:"Bottom",TAG:"TAG",DAY:"DAY",QUERY:"Query",EDIT:"EDIT",PIN:"PIN",UNPIN:"UNPIN",DELETE:"DELETE","CONFIRM!":"CONFIRM!","CREATE FILTER":"CREATE FILTER","Comment it...":"Comment it...",Settings:"Settings","Recycle bin":"Recycle bin","About Me":"About Me","Fetching data...":"Fetching data...","Here is No Memos.":"Here is No Thino.","Frequently Used Tags":"Frequently Used Tags","What do you think now...":"What do you think now...",READ:"READ",MARK:"MARK",SHARE:"SHARE",SOURCE:"SOURCE",RESTORE:"RESTORE",ARCHIVE:"Archive","DELETE AT":"DELETE AT","Noooop!":"Noooop!","All Data is Loaded 🎉":"All Data is Loaded 🎉","Quick filter":"Quick filter",TYPE:"TYPE",LINKED:"LINKED","NO TAGS":"NO TAGS","HAS LINKS":"HAS LINKS","HAS IMAGES":"HAS IMAGES",INCLUDE:"INCLUDE",EXCLUDE:"EXCLUDE",TEXT:"TEXT",IS:"IS",AND:"AND",OR:"OR",LIST:"LIST",ISNOT:"ISNOT",SELECT:"SELECT","ADD FILTER TERMS":"ADD FILTER TERMS",FILTER:"FILTER",Filter:"Filter",TITLE:"TITLE","CREATE QUERY":"CREATE QUERY","EDIT QUERY":"EDIT QUERY",MATCH:"MATCH",TIMES:"TIMES","Share Memo Image":"Share Thino Image","↗Click the button to save":"↗Click the button to save","Image is generating...":"Image is generating...","Image is loading...":"Image is loading...","Loading...":"Loading...","😟 Cannot load image, image link maybe broken":"😟 Cannot load image, image link maybe broken","Daily Memos":"Daily Thino","CANCEL EDIT":"CANCEL EDIT","LINK TO THE":"LINK TO THE","Mobile Options":"Mobile Options","Experimental Options":"Experimental Options","Don't support web image yet, please input image path in vault":"Don't support web image yet, please input image path in vault","Background Image in Dark Theme":"Background Image in Dark Theme","Background Image in Light Theme":"Background Image in Light Theme",'Set background image in dark theme. Set something like "Daily/one.png"':'Set background image in dark theme. Set something like "Daily/one.png"','Set background image in light theme. Set something like "Daily/one.png"':'Set background image in light theme. Set something like "Daily/one.png"','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Set default thino composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default',"Default Memo Composition":"[Deprecated] Default Thino Composition","Show Tasks Label":"Show Tasks Label","Show tasks label near the time text. False by default":"Show tasks label near the time text. False by default","Please Open Memos First":"Please Open Thino First",DATE:"DATE",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED",BEFORE:"BEFORE",AFTER:"AFTER","Allow Comments On Memos":"Allow Comments On Thino","You can comment on memos. False by default":"You can comment on thino. False by default",Import:"Import","TITLE CANNOT BE NULL!":"TITLE CANNOT BE NULL!","FILTER CANNOT BE NULL!":"FILTER CANNOT BE NULL!","Comments In Original DailyNotes/Notes":"Comments In Original DailyNotes/Notes","You should install Dataview Plugin ver 0.5.9 or later to use this feature.":"You should install Dataview Plugin ver 0.5.9 or later to use this feature.","Open Memos Successfully":"Open Thino Successfully","Fetch Memos Error":"😭 Fetch Error","Copied to clipboard Successfully":"Copied to clipboard Successfully","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Check if you opened Daily Notes Plugin Or Periodic Notes Plugin","Please finish the last filter setting first":"Please finish the last filter setting first","Close Memos Successfully":"Close Thino Successfully","Insert as Memo":"Insert as Thino","Insert file as memo content":"Insert file as thino content","Image load failed":"Image load failed","Content cannot be empty":"Content cannot be empty","Unable to create new file.":"Unable to create new file.","Failed to fetch deleted memos: ":"Failed to fetch deleted thino: ","RESTORE SUCCEED":"RESTORE SUCCEED","DELETE SUCCEED":"DELETE SUCCEED","Save Memo button icon":"Save Thino button icon","The icon shown on the save Memo button in the UI.":"The icon shown on the save Thino button in the UI.","Fetch Memos From Particular Notes":"Fetch Thino From Particular Notes",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'You can set any Dataview Query for thino to fetch it. All thino in those notes will show on list. "#memo" by default',"Allow Memos to Fetch Memo from Notes":"Allow Thino to Fetch Thino from Notes","Use Memos to manage all memos in your notes, not only in daily notes. False by default":"Use Thino to manage all thino in your notes, not only in daily notes. False by default","Always Show Memo Comments":"Always Show Thino Comments","Always show memo comments on memos. False by default":"Always show thino comments on thino. False by default","You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.","Please check your daily note plugin OR periodic notes plugin settings":"Please check your daily note plugin OR periodic notes plugin settings","Use which plugin's default configuration":"Use which plugin's default configuration","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"Thino use the plugin's default configuration to fetch thino from daily, 'Daily' by default.",Daily:"Daily","Always Show Leaf Sidebar on PC":"Always Show Leaf Sidebar on PC","Show left sidebar on PC even when the leaf width is less than 875px. False by default.":"Show left sidebar on PC even when the leaf width is less than 875px. False by default.","You didn't set format for daily notes in both periodic-notes and daily-notes plugins.":"You didn't set format for daily notes in both periodic-notes and daily-notes plugins.","fetch more":"fetch more","Search all settings":"Search all settings",General:"General",Theme:"Theme",Share:"Share",Advanced:"Advanced",Thino:"Thino","Random Review":"Random Review","ARCHIVED AT":"ARCHIVED AT","Failed to get memos from daily notes":"Failed to get thino from daily notes","Failed to delete memo":"Failed to delete thino","CTRL + ENTER to save":"CTRL + ENTER to save","Started from":"Started from","Custom Background Image":"Custom Background Image","Set custom background image.":"Set custom background image.","Custom Memo Footer":"Custom Thino Footer","Set custom memo footer.":"Set custom thino footer.","Heatmap Color Scheme":"Heatmap Color Scheme","Set different color scheme for heatmap.":"Set different color scheme for heatmap.","Enable Local Http Server":"Enable Local Http Server","Memos Http Server Port":"Thino Http Server Port","Set memos http server port to listen. '43999' by default":"Set thino http server port to listen. '43999' by default","Default Editor Mode":"Default Editor Mode","Live-Preview Mode OR Source Mode.":"Live-Preview Mode/Source Mode.","Save type for Thino":"Save type for Thino",DAILY:"DAILY",MULTI:"MULTI",CANVAS:"CANVAS",ALL:"ALL",FILE:"FILE",TODO:"TODO",DONE:"DONE",JOURNAL:"JOURNAL",OTHER:"OTHER","Failed to create daily note, check if it exists.":"Failed to create daily note, check if it exists.","Failed to create daily note. Please check if you created a folder for daily notes.":"Failed to create daily note. Please check if you created a folder for daily notes.","After you verify your account, please refresh this page.":"After you verify your account, please refresh this page.",Verify:"Verify","Oops! You forget to verify insider account":"Oops! You forget to verify insider account","If you have any questions, please contact us.":"If you have any questions, please contact us.","Delete Thino Directly":"Delete Thino Directly","When delete thino directly, it will not be moved to trash. False by default.":"When delete thino directly, it will not be moved to trash. False by default.","Enable opening thino globally":"Enable opening thino globally","Enable opening thino globally. False by default.":"Enable opening thino globally. False by default.","Key for opening thino globally":"Key for opening thino globally","Set key for opening thino globally. CTRL + SHIFT + T by default.":"Set key for opening thino globally. CTRL + SHIFT + T by default.","Key for showing thino globally":"Key for showing thino globally","Set key for showing thino globally. CTRL + SHIFT + E by default.":"Set key for showing thino globally. CTRL + SHIFT + E by default.","Get activation code":"Get activation code","Input activation code here":"Input activation code here","Copy Thino id":"Copy Thino id","Activate Pro Version":"Activate Pro Version","Please copy Thino id first":"Please copy Thino id first",'You can set folder name with file name like "folder/file"':'You can set folder name with file name like "folder/file"','You can set folder name like "folder1/folder2/folder3" to create sub-folder':'You can set folder name like "folder1/folder2/folder3" to create sub-folder',"Default save type":"Default save location",'Set the default save type for thino. "DAILY" by default':'Set the default save type for thino. "DAILY" by default',"Sync Thino via PKMer":"Sync Thino via PKMer",Unlink:"Unlink",Link:"Link","Connect to PKMer Sync, you can check it in ":"Connect to PKMer Sync, you can check it in ","PKMer Sync":"PKMer Sync","Remove successfully":"Remove successfully",Deactivate:"Deactivate",Remove:"Remove","Confirm?":"Confirm?","Sync Status":"Sync Status","Start or stop sync":"Start or stop sync","Stop sync successfully":"Stop sync successfully","Start sync successfully":"Start sync successfully",Stop:"Stop",Start:"Start","Show thino near mouse":"Show thino near mouse","Query not found":"Query not found","Send to clipboard successfully":"Send to clipboard successfully","Thino - Failed to start HTTP server, please check the port is available.":"Thino - Failed to start HTTP server, please check the port is available.","Thino - Started HTTP server on port":"Thino - Started HTTP server on port","Thino - Terminated HTTP server":"Thino - Terminated HTTP server","File not exist":"File not exist","Thino not found":"Thino not found","File not found for the given thino path, is creating a new file":"File not found for the given thino path, is creating a new file","Saved sync token successfully":"Saved sync token successfully","Failed to find daily notes folder":"Failed to find daily notes folder","Please install obsidian-hover-editor plugin first":"Please install obsidian-hover-editor plugin first","Copied app id successfully":"Copied app id successfully","Please input token first":"Please input token first","Please enable sync first":"Please enable sync first","Init Failed":"Init Failed","Verify successfully":"Verify successfully","Failed to verify":"Failed to verify","Folder not found for the given thino path, is creating a new folder":"Folder not found for the given thino path, is creating a new folder","File not found for the given thino path":"File not found for the given thino path","Failed to read current daily note, check if it exists.":"Failed to read current daily note, check if it exists.","Failed to save":"Failed to save","Failed to login, please login again":"Failed to login, please login again","COPY FAILED":"COPY FAILED","COPY SUCCEED":"COPY SUCCEED","Copy selected text":"Copy selected text","Copy thino":"Copy thino",COPY:"COPY","This is a pro feature, please upgrade to pro version to use it.":"This is a pro feature, please upgrade to pro version to use it.","You can get pro version from: ":"You can get pro version from: ",Save:"Save",Cancel:"Cancel","Thino Daily Target":"Thino Daily Target",Input:"Input","#Tag":"#Tag","to create tag":"to create tag","You have verified your account. Congrats!":"You have verified your account. Congrats!","Pro features":"Pro features","Target Thino Count":"Target Thino Count",on:"on","Switch waterfall view":"Switch waterfall view","Switch view":"Switch view","Switch list view":"Switch list view","Set daily target":"Set daily target","Thino Save To: ":"Thino Save To: ","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",words:"words","Return To Home Page":"Return To Home Page","Open thino in center window":"Open thino in center window","Open thino in float window":"Open thino in float window","Open thino in right sidebar":"Open thino in right sidebar","Open thino in left sidebar":"Open thino in left sidebar","Show thino editor":"Show thino editor","Toggle minimal mode":"Toggle minimal mode","Focus on thino editor":"Focus on thino editor","ReSync web thinos to local":"ReSync web thinos to local","Sync local thinos to web":"Sync local thinos to web","Show daily thino":"Show daily thino","Focus on search bar":"Focus on search bar","Show-thino in popover(Hover editor)":"Show-thino in popover(Hover editor)","Center window":"Center window","Float window":"Float window","Right sidebar":"Right sidebar","Left sidebar":"Left sidebar","Save thino type when sync local":"Save thino type when sync local","Set the default save thino type when sync local, FILE by default.":"Set the default save thino type when sync local, FILE by default.","Sync service":"Sync service","Pro verification status":"Pro verification status","Live-preview":"Live-preview",Source:"Source","Global copy":"Global copy","Set the folder name":"Set the folder name","Set the filename":"Set the filename","Set the filename for current location file":"Set the filename for current location file","Switch calendar type":"Switch calendar type",alphabetical:"alphabetical",alphabeticalReverse:"alphabeticalReverse",byCount:"byCount",byCountReverse:"byCountReverse","Type here":"Type here",Today:"Today",Yesterday:"Yesterday","Last 7 days":"Last 7 days","Last 30 days":"Last 30 days","Last 90 days":"Last 90 days","Last 180 days":"Last 180 days","Last 365 days":"Last 365 days",Found:"Found","Copy filtered thinos":"Copy filtered thinos","Bulk delete":"Bulk delete","Bulk archive":"Bulk archive","Bulk tag operation":"Bulk tag operation","Bulk restore":"Bulk restore","If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.":"If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.",Preview:"Preview","Set and save":"Set and save","Show day mark in thino list":"Show day mark in thino list","Show day mark on the top of daily range thino. False by default.":"Show day mark on the top of daily range thino. False by default.","Click to expand or fold, Cmd+Click to show all thinos of the day":"Click to expand or fold, Cmd+Click to show all thinos of the day","You can buy a license from":"You can buy a license from","No thinos in range":"No thinos in range",Month:"Month",Week:"Week",Day:"Day",Agenda:"Agenda",Tomorrow:"Tomorrow",Previous:"Previous",Next:"Next","Search all columns...":"Search all columns...","Basic Info":"Basic Info","Additional Info":"Additional Info","Created At":"Created At",Content:"Content","Thino Type":"Thino Type","Source Type":"Source Type","Row status":"Row status",Path:"Path","Pinned Status":"Pinned Status",Table:"Table",Chat:"Chat",Moments:"Moments",Waterfall:"Waterfall",Calendar:"Calendar","Go to page":"Go to page",Page:"Page",Show:"Show",rows:"rows","Temp Filter":"Temp Filter","Open link directly in Thino view":"Open link directly in Thino view","Day mark range":"Day mark range","Set the range of day mark. Day by default.":"Set the range of day mark. Day by default.","Thino is locked":"Thino is locked","Please unlock Thino by input password":"Please unlock Thino by input password","Auto Download Image":"Auto Download Image","Auto download image when save to thino. 'false' by default":"Auto download image when save to thino. 'false' by default","Thino Http IP Type":"Thino Http IP Type","Set Thino http server ip to listen. 'localhost' by default":"Set Thino http server ip to listen. 'localhost' by default","Password to lock Thino":"Password to lock Thino",Unlock:"Unlock",Locked:"Locked","Password is incorrect":"Password is incorrect",Lock:"Lock","Need password to unlock Thino":"Need password to unlock Thino","You have not set a password or enable this feature yet":"You have not set a password or enable this feature yet",Password:"Password","Password for Thino":"Password for Thino","Please input your password to change password settings":"Please input your password to change password settings","Please input your password":"Please input your password","Lock thino":"Lock thino",date:"date",time:"time",event:"event","Add tag position":"Add tag position","Set the position of the tag when adding tag automatically":"Set the position of the tag when adding tag automatically","Add tag automatically":"Add tag automatically","Add tag to the end or beginning of the thino content when creating a thino and filtering tags":"Add tag to the end or beginning of the thino content when creating a thino and filtering tags","Add tag with new line":"Add tag with new line","Add tag with new line when adding tag automatically":"Add tag with new line when adding tag automatically","Input to select more tags":"Input to select more tags","Tag Bulk Edit":"Tag Bulk Edit","Tag Bulk Select":"Tag Bulk Select","Exist Tags":"Exist Tags","Selected Tags":"Selected Tags","Click to remove exist tag":"Click to remove exist tag","Click to remove selected tag":"Click to remove selected tag","Select tags":"Select tags","Input to select exist tag":"Input to select exist tag",Beginning:"Beginning",End:"End","Set the heading for saving thino":"Set the heading for saving thino","# Heading":"# Heading","Chat view style":"Chat view style","Set the style of chat view":"Set the style of chat view","Background image for moments view":"Background image for moments view","Set the background image for moments view":"Set the background image for moments view","Icon for moments/chat view/share image":"Icon for moments/chat view/share image","Set the icon for moments/chat view/share image":"Set the icon for moments/chat view/share image","Quote for moments view/share image":"Quote for moments view/share image","Set the quote for moments view/share image":"Set the quote for moments view/share image","Theme for Thino":"Theme for Thino","Set the theme for Thino":"Set the theme for Thino","Interface Details":"Interface Details","Task amount":"Task amount","Thino status":"Thino status","Used tags":"Used tags","Used days":"Used days","Most active day":"Most active day","Most active hour":"Most active hour","Thino amount":"Thino amount","No content to generate.":"No content to generate.","Image generated successfully.":"Image generated successfully.","Failed to generate image.":"Failed to generate image.","Share filtered thinos as image":"Share filtered thinos as image","Latest version":"Latest version","Previous version":"Previous version","Thino update info":"Thino update info","Debug info copied to clipboard":"Debug info copied to clipboard","Copy debug info":"Copy debug info","Failed to load changelog":"Failed to load changelog","View online":"View online",ChangeLog:"ChangeLog","Please open thino first":"Please open thino first","Insert editor":"Insert editor","Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.":"Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.","Default time prefix for thino in daily notes":"Default time prefix for thino in daily notes","Set default time prefix for thino in daily notes.":"Set default time prefix for thino in daily notes.","Save image successfully":"Save image successfully","User quote":"User quote","Set user quote for thino":"Set user quote for thino","User icon":"User icon","Set user icon for thino. You can input http/https link or file path in vault.":"Set user icon for thino. You can input http/https link or file path in vault.","User info":"User info","Copy filtered results":"Copy filtered results","Share image":"Share image",Default:"Default",Gray:"Gray",Grass:"Grass",Flame:"Flame",Olive:"Olive",Ice:"Ice",Magenta:"Magenta","Daily notes":"Daily notes",Editor:"Editor","Append/prepend text when share to Thino":"Append/prepend text when share to Thino","Append text when share to Thino":"Append text when share to Thino","Prepend text when share to Thino":"Prepend text when share to Thino","Add newline when append/prepend text":"Add newline when append/prepend text","Input anything here":"Input anything here",Prepend:"Prepend",Append:"Append",Both:"Both",None:"None","Hide pinned group":"Hide pinned group","Hide pinned group in thino list. False by default.":"Hide pinned group in thino list. False by default.","Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.","Different insert target for different type":"Different insert target for different type","Toggle this to set different insert target for different type of thino, like task or list type of thino":"Toggle this to set different insert target for different type of thino, like task or list type of thino","You can set whole diary or only part of it":"You can set whole diary or only part of it","Set process target":"Set process target",Custom:"Custom","Whole diary":"Whole Diary","Set thino insert place":"Set thino insert place","Set where to insert thino content":"Set where to insert thino content","End of the diary":"End of the diary","Custom location":"Custom location","Setting guide":"User setting guide","Details settings":"Details settings","Start Thino":"Start Thino","About Thino Pro":"About Thino Pro",Enabled:"Enabled",Enable:"Enable","Daily notes folder":"Daily notes folder","Set daily notes folder":"Set daily notes folder","Daily note name format":"Daily note name format","Set daily note name format":"Set daily note name format","Daily note plugin":"Daily note plugin","Enable daily note plugin":"Enable daily note plugin",Selected:"Selected",Select:"Select","A classic theme for Thino with a two-column layout":"A classic theme for Thino with a two-column layout",Classic:"Classic","A modern theme for Thino with a three-column layout and some unique features.":"A modern theme for Thino with a three-column layout and some unique features.",Modern:"Modern","Go and enjoy Thino":"Go and enjoy Thino","Congrats! All settings done":"Congrats! All settings done","Adjust settings that influence your user experience with Thino.":"Adjust settings that influence your user experience with Thino.","Set preferences for using Thino":"Set preferences for using Thino","If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.":"If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.","Go with daily note plugin":"Go with daily note plugin","Choose a theme for Thino.":"Choose a theme for Thino.","Set theme for Thino":"Set theme for Thino","Set up your user info for Thino.":"Set up your user info for Thino.","Get started with Thino":"Get started with Thino","Skip and start Thino":"Skip and start Thino","Next step":"Next step","Back to previous step":"Back to previous step","Click to enable =>":"Click to enable =>","This is Thino's sidebar. Navigate to different path or select query filter.":"This is Thino's sidebar. Navigate to different path or select query filter.","Click here and go to settings page.":"Click here and go to settings page.","Click here and go to different path.":"Click here and go to different path.","Select or create query filter here.":"Select or create query filter here.","See the status of Thinos here.":"See the status of Thinos here.","Search your thino quickly here.":"Search your thino quickly here.","Edit or create your thino here.":"Edit or create your thino here.","See your thinos here.":"See your thinos here.","See your time status of thinos here.":"See your time status of thinos here.","See your tags here. Tags will be shown when thino contains tags.":"See your tags here. Tags will be shown when thino contains tags.",Done:"Done","Thino is ready to use. ":"Thino is ready to use. ","You can start using Thino now. If you want to know more about Thino Pro, click the button below.":"You can start using Thino now. If you want to know more about Thino Pro, click the button below.","Default time prefix":"Default time prefix","Append Text Action":"Append Text Action","Prepend Text Action":"Prepend Text Action",Preset:"Preset","Select Tags":"Select Tags","It is not available on small view":"It is not available on small view","Append text":"Append text","Prepend text":"Prepend text","Your daily note folder is not set correctly, please check your settings":"Your daily note folder is not set correctly, please check your settings","Default sharing style":"Default sharing style","Set the default style for sharing thino, 'Modern' by default.":'Set the default style for sharing thino, "Modern" by default.',Clean:"Clean",Minimal:"Minimal",Gradient:"Gradient","Thino share":"Thino share","Copy to clipboard failed":"Copy to clipboard failed","Copy to clipboard successfully":"Copy to clipboard successfully","Your content has been copied to clipboard, and inserted into the editor. Please try it again":"Your content has been copied to clipboard, and inserted into the editor. Please try it again","Share thino":"Share thino","Set file name after create thino":"Set file name after create thino","You can set file name after create thino. A input box will show when you create thino.":"You can set file name after create thino. A input box will show when you create thino.",SPLIT:"SPLIT","Split by Heading 1":"Split by Heading 1","Split by Heading 2":"Split by Heading 2","Split by Heading 3":"Split by Heading 3","Insert task":"Insert task","All settings have been reset to default.":"All settings have been reset to default.","Reset all Thino settings":"Reset all Thino settings","Reset settings":"Reset settings","Reset Thino settings to default settings.":"Reset Thino settings to default settings.","Task Management":"Task Management","Append completed date when task done in thino":"Append completed date when task done in thino","Append completed date when task done in thino. False by default":"Append completed date when task done in thino. False by default","Set tag for single file that Thino indexes":"Set tag for single file that Thino indexes","When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.":"When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.","Set tag for file type file":"Set tag for file type file","Set tag for multi type file":"Set tag for multi type file","Please input the tag":"Please input the tag","Merge thinos in to thino share image":"Merge thinos in to thino share image","Custom height for Thino content":"Custom height for Thino content","Set custom height for Thino content. Like 200px or 20rem":"Set custom height for Thino content. Like 200px or 20rem","Input height":"Input height"},MA={},kA={},NA={welcome:"Bienvenue dans Mémo !",ribbonIconTitle:"Mémos",months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Aout","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan.","Feb.","Mar.","Apr.","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."],weekDays:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],weekDaysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],to:"à",year:null,month:null,"Basic Options":"Options basique","User name":"Username","Set your user name here. 'Memos 😏' By default":"Définissez votre username ici. Défaut : 'Memo 😏'","Insert after heading":"Insérer après le titre","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Vous devez définir le même titre en-dessous si vous voulez insérer et traiter des mémos sous le même titre.","Allows admonitions to be created using ":"Permet de créer des admonitions en utilisant","Process Memos below":"Insérer Mémo sous","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"Seulement les entrée sous cette section/phrase dans vos notes seront considérés. S'il n'existe pas, aucune notes ne sera traité pour ce fichier.","Save Memo button label":"Titre du bouton de sauvegarde","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"Le texte affiché sur le bouton de sauvegarde dans l'UI. Défaut : 'NOTEIT'","Focus on editor when open memos":"Focus sur l'éditeur lors de l'ouverture du mémo.","Focus on editor when open memos. Focus by default.":"Focus sur l'éditeur lors de l'ouverture du mémo. Focus par défaut.","Open daily memos with open memos":"Ouvrir les mémos quotidiens quand mémo est ouvert.","Open daily memos with open memos. Open by default.":"Ouvrir les mémos quotidiens quand mémo est ouvert.","Open Memos when obsidian opens":"Ouvrir Mémo quand Obsidian est ouvert.","When enable this, Memos will open when Obsidian opens. False by default.":"Quand activé, Memo sera ouvert quand Obsidian à l'ouverture d'Obsidian. Désactivé par défaut.","Hide done tasks in Memo list":"Masquer les tâches accomplies dans la liste des mémos.","Hide all done tasks in Memo list. Show done tasks by default.":"Masquer les tâches accomplies dans les mémos. Affiche les tâches accomplies par défaut.","Advanced Options":"Options avancées","UI language for date":"Langue de l'UI pour la date","Translates the date UI language. Only 'en' and 'zh' are available.":"Traduit la langue des dates dans l'UI. Seuls 'en', 'fr' et 'zh' sont disponibles. ","Default prefix":"Préfix par défaut.","Set the default prefix when create memo, 'List' by default.":"Définit le préfix par défaut lors de la création d'un mémo. Défault : 'Liste'","Default insert date format":"Format de la date insérée par défaut.","Default editor position on mobile":"Position par défaut de l'éditeur sur mobile.","Set the default date format when insert date by @, 'Tasks' by default.":"Définit le format de la date par défaut lors de l'insertion de la date par @. Défaut : 'Tâches'.","Set the default editor position on Mobile, 'Top' by default.":"Position par défaut de l'éditeur sur le mobile. Défaut : 'Haut'.","Use button to show editor on mobile":"Utilisation du bouton pour afficher l'éditeur sur le mobile.","Show Time When Copy Results":"Aficher l'heure quand les résultats sont copiés","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Place un bouton flottant pour appeler l'éditeur sur mobile. Fonctionne uniquement quand l'éditeur est placé en bas.","Show time when you copy results, like 12:00. Copy time by default.":"Affiche l'heure quand les résultats sont copiés, comme '12:00'. Copie l'heure par défaut","Show Date When Copy Results":"Affiche la date quand les résultats sont copiés","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"Affiche la date quand les résultats sont copiés, comme [[2022-01-01]]. Par défaut, copie la date.","Add Blank Line Between Different Date":"Ajoute une ligne entre les différentes dates.","Add blank line when copy result with date. No blank line by default.":"Ajoute une ligne lors de la copie du résultat avec la date. Pas de ligne par défaut.","Share Options":"Options de partage","Share Memos Image Footer Start":"Début du pied de page — Partage de mémo de mémos","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Définissez ce que vous voulez ici, utilisez {ThinoNum} pour afficher le nombre de thino, {UsedDay} pour les jours. Par défaut : '{ThinoNum} Thino {UsedDay} Days.","Share Memos Image Footer End":"Fin du pied de page — Partage de mémo","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Définissez ce que vous voulez ici. Utilisez {UserName} comme username. Par défaut : '✍️ By {UserName}'","Save Shared Image To Folder For Mobile":"Sauvegarde des images partagés dans un dossier sur mobile.","Save image to folder for mobile. False by Default":"Sauvegarder les images dans un dossier sur mobile. Désactivé par défaut.","Say Thank You":"Dites Merci",Donate:"Faire un don","If you like this plugin, consider donating to support continued development:":"Si vous aimez ce plugin, envisagez de faire un don pour soutenir le développement continu :","File Name of Recycle Bin":"Nom de la corbeille","Set the filename for recycle bin. 'delete' By default":"Définition du nom de la poubelle. Défaut : 'Delete'","Set the filename for query file. 'query' By default":"Définit le nom de fichier pour les requête. Défaut : 'Query'","Use Tags In Vault":"Utiliser des tags dans le Coffre","Use tags in vault rather than only in Memos. False by default.":"Utiliser des tags du coffre plutôt que ceux que seulement dans Mémo. Désactivé par défaut.","Ready to convert image into background":"Prêt pour convertir des image en arrière-plan.",List:"Liste",Task:"Tâche",Top:"Haut",Bottom:"Bas",TAG:"TAG",DAY:"JOUR",QUERY:"RECHERCHE",EDIT:"EDITER",PIN:"PIN",UNPIN:"ÉPINGLER",DELETE:"DESÉPINGLER","CONFIRM!":"CONFIRMER !","CREATE FILTER":"CRÉER FILTRE",Settings:"Paramètres","Recycle bin":"Corbeille","About Me":"À propos de moi","Fetching data...":"Récupération des données...","Here is No Memos.":"Il n'y a pas de Memos.","Frequently Used Tags":"Tags fréquemment utilisés","What do you think now...":"Que pensez-vous maintenant...",READ:"LU",MARK:"MARQUER",SHARE:"PARTAGER",SOURCE:"SOURCE",RESTORE:"RESTAURER","DELETE AT":"SUPPRIMER","Noooop!":"Noooop!","All Data is Loaded 🎉":"Toutes les données sont chargées 🎉","Quick filter":"Filtre rapide",TYPE:"TYPE",LINKED:"LIEN","NO TAGS":"PAS DE TAGS","HAS LINKS":"A DES LIENS","HAS IMAGES":"A DES IMAGES",INCLUDE:"INCLUS",EXCLUDE:"EXCLUS",TEXT:"TEXTE",IS:"EST",ISNOT:"N'EST PAS",SELECT:"SELECTION","ADD FILTER TERMS":"AJOUTER DES TERMES FILTRÉ",FILTER:"FILTRE",TITLE:"TITRE","CREATE QUERY":"CRÉER UNE RECHERCHE","EDIT QUERY":"ÉDITER UNE RECHERCHE",MATCH:"MATCH",TIMES:"HEURE","Share Memo Image":"Partager un mémo image","↗Click the button to save":"↗Clique pour sauvegarder","Image is generating...":"Génération de l'image...","Image is loading...":"Image en chargement...","Loading...":"Chargement...","😟 Cannot load image, image link maybe broken":"😟 Impossible de charger l'image, le lien peut être brisé","Daily Memos":"Mémo quotidien","CANCEL EDIT":"ANNULER L'ÉDITION","LINK TO THE":"LIENS À","Mobile Options":"Options mobile","Don't support web image yet, please input image path in vault":"Ne supporte pas les images webs. Merci d'insérer le chemin de l'image depuis le coffre.","Background Image in Dark Theme":"Image de fond en thème sombre","Background Image in Light Theme":"Image de fond en thème clair",'Set background image in dark theme. Set something like "Daily/one.png"':"Définir l'image de fond en thème sombre. Définir 'Daily/one.png' par exemple.",'Set background image in light theme. Set something like "Daily/one.png"':"Définir l'image de fond en thème clair. Définir 'Daily/one.png' par exemple.",'Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Définir la composition par défaut du mémo, vous devez utiliser {TIME} comme "HH:mm" et {CONTENT} comme contenu. "{TIME} {CONTENT}" par défaut',"Default Memo Composition":"Composition par défaut du mémo","Show Tasks Label":"Afficher les étiquettes des tâches","Show tasks label near the time text. False by default":"Afficher les étiquettes des tâches à côté du texte horaire. Désactivé par défaut.","Please Open Memos First":"Merci d'ouvrir les mémos en premier"},AA={},FA={},PA={},OA={},jA={},LA={},RA={},_A={},BA={welcome:"Bem-vindo ao Thino!",ribbonIconTitle:"Thino",months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan.","Fev.","Mar.","Abr.","Maio","Jun.","Jul.","Ago.","Set.","Out.","Nov.","Dez."],weekDays:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],weekDaysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],to:"para",year:null,month:null,"Basic Options":"Opções Básicas","User name":"Nome de Usuário","Set your user name here. 'Memos 😏' By default":"Defina o nome de usuário. Padrão: 'Thino 😏'.","Insert after heading":"Inserir após o cabeçalho","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Deve definir o mesmo cabeçalho na configuração posterior se pretende inserir e processar memorandos abaixo do cabeçalho aqui definido.","Allows admonitions to be created using ":"Permitir que Admonitions sejam criadas usando ","Process Memos below":"Processar Memorandos abaixo do Cabeçalho","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"Somente as entradas abaixo deste cabeçalho serão processadas nas suas notas. Se não configurar esta funcionalidade, nenhuma nota será processada para o ficheiro respetivo.","Save Memo button label":"Legenda do Botão de Guardar Memorandos","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":'Define o texto apresentado na UI do botão guardar memorandos. Padrão: "NOTEIT".',"Focus on editor when open memos":"Focar no Editor ao iniciar o Thino","Focus on Editor when open memos. Focus by default.":'Focar no editor ao iniciar o Thino. Padrão: "Focar".',"Open daily memos with open memos":"Abrir memorandos diários ao iniciar o Thino","Open daily memos with open memos. Open by default.":'Abrir memorandos diários ao iniciar o Thino. Padrão: "Abrir".',"Open Memos when obsidian opens":"Abrir Thino quando o Obsidian inicia","When enable this, Memos will open when Obsidian opens. False by default.":'Quando esta opção está activa, o Memos abrirá quando o Obsidian inicia. Padrão: "Falso".',"Hide done tasks in Memo list":"Ocultar tarefas concluídas na lista de memorandos","Hide all done tasks in Memo list. Show done tasks by default.":'Ocultar todas as tarefas concluídas na lista de memorandos. Padrão: "Mostrar tarefas concluídas".',"Advanced Options":"Opções Avançadas","UI language for date":"Idioma na UI da Data ","Translates the date UI language. Only 'en' and 'zh' are available.":"Define o idioma na UI da Data. De momento, apenas 'en', 'fr', 'pt' e 'zh' estão disponíveis.","Default prefix when save thino":"Prefixo Padrão","Set the default prefix when create memo, 'List' by default.":"Define o prefixo padrão quando um memorando é criado. Padrão: 'Lista'.","Default insert date format":"Formato Padrão para Inserção de Data","Set the default date format when insert date by @, 'Tasks' by default.":"Define o formato de Data padrão ao inserir a data usando '@'. Padrão: 'Tarefas'.","Default editor position on mobile":"Posição Padrão do Editor de Memorandos na Versão Móvel","Set the default editor position on Mobile, 'Top' by default.":"Define a posição padrão do editor de memorandos na versão móvel. Padrão: 'Topo'.","Use button to show editor on mobile":"Usar Botão para Mostrar o Editor na Versão Móvel","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Define um botão flutuante para abrir o editor na versão móvel. Opção disponível somente quando a posição do editor está definida para 'Fundo'.","Show Time When Copy Results":"Mostrar a Hora ao Copiar os Resultados","Show time when you copy results, like 12:00. Copy time by default.":"Mostrar a Hora, no formato '12:00', ao copiar os resultados. Padrão: 'Copiar a hora'.","Show Date When Copy Results":"Mostrar a Data ao Copiar os Resultados","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":'Mostrar a Data, no formato [[2022-01-01]], ao copiar os resultados. Padrão: "Copiar a hora".',"Add Blank Line Between Different Date":"Adicionar Linha em Branco entre Datas Diferentes.","Add blank line when copy result with date. No blank line by default.":'Adicionar linha em branco ao copiar resultados com Data. Padrão: "Não adicionar linha."',"Share Options":"Opções de Partilha","Share Memos Image Footer Start":"Partilhar a Imagem de um memorando - Início do Rodapé","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Defina como preferir, use {ThinoNum} para mostrar o número de thinorandos e use {UsedDay} para dias. 'Padrão: {ThinoNum} Thinorandos {UsedDay} Dias'.","Share Memos Image Footer End":"Partilhar a Imagem de um memorando - Fim do Rodapé","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Defina como preferir, use {UserName} como o seu nome de usuário. Padrão: '✍️ Por {UserName}'.","Save Shared Image To Folder For Mobile":"Guardar a Imagem Partilhada para Pasta na Versão Móvel","Save image to folder for mobile. False by Default":'Guardar a imagem partilhada para pasta na versão móvel. Padrão: "Falso".',"Say Thank You":"Agradeça",Donate:"Doar","If you like this plugin, consider donating to support continued development:":"Se gosta deste plugin, considere doar para apoiar o seu desenvolvimento contínuo:","File Name of Recycle Bin":"Nome da Reciclagem","Set the filename for recycle bin. 'delete' By default":"Define o nome do ficheiro para a Reciclagem. Padrão: 'delete'.","File Name of Query File":"Nome do Ficheiro de Query","Set the filename for query file. 'query' By default":"Define o nome do ficheiro de Query. Padrão: 'Query'.","Use Tags In Vault":"Usar Tags no Vault","Use tags in vault rather than only in Memos. False by default.":'Usar as Tags do Vault e não somente dos memorandos. Padrão: "Falso".',"Ready to convert image into background":"Pronto para converter imagem em fundo",List:"Lista",Task:"Tarefa",Top:"Topo",Bottom:"Fundo",TAG:"TAG",DAY:"DIA",QUERY:"QUERY",EDIT:"EDITAR",PIN:"FIXAR",UNPIN:"DESAFIXAR",DELETE:"ELIMINAR","CONFIRM!":"CONFIRMAR!","CREATE FILTER":"CRIAR FILTRO",Settings:"Definições","Recycle bin":"Reciclagem","About Me":"Acerca de mim","Fetching data...":"A obter dados...","Here is No Memos.":"Não existem Thino.","Frequently Used Tags":"Tags Usadas Frequentemente","What do you think now...":"Em que está a pensar...",READ:"LER",MARK:"ASSINALAR",SHARE:"PARTILHAR",SOURCE:"ORIGEM",RESTORE:"RESTAURAR","DELETE AT":"ELIMINADO EM","Noooop!":"Noooop!","All Data is Loaded 🎉":"Todos os Dados foram Carregados 🎉","Quick filter":"Filtro rápido",TYPE:"TIPO",LINKED:"LINKED","NO TAGS":"SEM TAGS","HAS LINKS":"TEM LINKS","HAS IMAGES":"TEM IMAGENS",INCLUDE:"INCLUIR",EXCLUDE:"EXCLUIR",TEXT:"TEXTO",IS:"É",ISNOT:"NÃO É",SELECT:"SELECCIONAR","ADD FILTER TERMS":"ADICIONAR TERMOS DE FILTRAGEM",FILTER:"FILTRAR",TITLE:"TÍTULO","CREATE QUERY":"CRIAR QUERY","EDIT QUERY":"EDITAR QUERY",MATCH:"IGUALA",TIMES:"VEZES","Share Memo Image":"Partilhar Imagem de Memo","↗Click the button to save":"↗Clique no botão para guardar","Image is generating...":"A gerar Imagem..","Image is loading...":"A carregar Imagem...","Loading...":"Carregando...","😟 Cannot load image, image link maybe broken":"😟 Não é possível carregar a imagem, o link da imagem pode estar incorrecto","Daily Memos":"Thino Diários","CANCEL EDIT":"CANCELAR EDIÇÃO","LINK TO THE":"LINK PARA O","Mobile Options":"Opções Móveis","Don't support web image yet, please input image path in vault":"Ainda não existe suporte para imagens de web. Por favor, insira o link para uma imagem do vault","Experimental Options":"Opções Experimentais","Background Image in Dark Theme":"Imagem de Fundo no Tema Escuro","Background Image in Light Theme":"Imagem de Fundo no Tema Claro",'Set background image in dark theme. Set something like "Daily/one.png"':'Defina a imagem de fundo para o tema escuro. Defina da seguinte forma: "Daily/one.png".','Set background image in light theme. Set something like "Daily/one.png"':'Defina a imagem de fundo para o tema claro. Defina da seguinte forma: "Daily/one.png".','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Defina a composição padrão do memorando, deve usar {TIME} como "HH:mm" e {CONTENT} como conteúdo. Padrão: "{TIME} {CONTENT}".',"Default Memo Composition":"Composição Padrão de um Memorando","Show Tasks Label":"Mostrar Etiquetas de Tarefas","Show tasks label near the time text. False by default":'Mostrar etiquetas de tarefas próximas do texto de tempo. Padrão: "Falso".',"Please Open Memos First":"Por favor, abra o Thino primeiro",DATE:"DATA",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED",BEFORE:"ANTES",AFTER:"DEPOIS","Allow Comments On Memos":"Permitir Comentários nos Memorandos","You can comment on memos. False by default":'Permite que comente os memorandos. Padrão: "Falso".',Import:"Importar","TITLE CANNOT BE NULL!":"O TÍTULO NÃO PODE SER NULO!","FILTER CANNOT BE NULL!":"O FILTRO NÃO PODE SER NULO!","Comments In Original DailyNotes/Notes":"Comentários nas Notas/Notas Diárias Originais","You should install Dataview Plug-in ver 0.5.9 or later to use this feature.":"Deve instalar a versão 0.5.9 ou posterior do plugin Dataview para usar esta funcionalidade.","Open Memos Successfully":"Thino Iniciado com Sucesso","Fetch Memos Error":"😭 Erro de Fetch","Copied to clipboard Successfully":"Copiado para a área de transferência com sucesso","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Verifique se abriu o plugin de Notas Diárias ou de Notas Periódicas","Please finish the last filter setting first":"Por favor, termine primeiro a configuração do último filtro","Close Memos Successfully":"Thino Fechado com Sucesso","Insert as Memo":"Inserir como um Memorando","Insert file as memo content":"Inserir ficheiro como conteúdo de um memorando","Image load failed":"Falha no carregamento da imagem","Content cannot be empty":"O Conteúdo não pode estar vazio","Unable to create new file.":"Não foi possível criar um novo ficheiro.","Failed to fetch deleted memos: ":"Falha no fetch dos memorandos removidos: ","RESTORE SUCCEED":"RESTAURO BEM SUCEDIDO","Save Memo button icon":"Ícone do Botão para Guardar Memorandos","The icon shown on the save Memo button in the UI.":"O ícone exibido na UI do botão para guardar memorandos.","Fetch Memos From Particular Notes":"Obter Memorandos de Notas Específicas",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'Pode definir qualquer Query de Dataview para o Memos procurar. Todos os memorandos nessas notas serão mostrados na lista. Padrão: "#memo".',"Allow Memos to Fetch Memo from Notes":"Permitir que o Thino Obtenha memorandos das Notas","Use Memos to manage all memos in your notes, not only in daily notes. False by default":'Use o Memos para gerir todos os memorandos nas suas notas e não apenas nas notas diárias. Padrão: "Falso".',"Always Show Memo Comments":"Mostrar Comentários dos Memorandos","Always show memo comments on memos. False by default":'Mostrar sempre os comentários dos memorandos. Padrão: "Falso".',"You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"Não definiu a pasta para as notas diárias, quer no plugin the Notas Periódicas ou de Notas Diárias.","Please check your daily note plugin OR periodic notes plugin settings":"Por favor, verifique as configurações dos plugins de Notas Diárias OU de Notas Periódicas","Use Which Plugin's Default Configuration":"Usar a Configuração Padrão do Plugin","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"O Memos usa a configuração padrão do plugin seleccionado para obter memorandos diariamente. Padrão: 'Notas Diárias'.",Daily:"Diário"},HA={welcome:"Bem-vindo ao Memos!",ribbonIconTitle:"Thino",months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan.","Fev.","Mar.","Abr.","Maio","Jun.","Jul.","Ago.","Set.","Out.","Nov.","Dez."],weekDays:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],weekDaysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],to:"para",year:null,month:null,"Basic Options":"Opções Básicas","User name":"Nome de Usuário","Set your user name here. 'Memos 😏' By default":"Defina o nome de usuário. Padrão: 'Thino 😏'.","Insert after heading":"Inserir após o cabeçalho","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Deve definir o mesmo cabeçalho na configuração posterior se pretende inserir e processar memorandos abaixo do cabeçalho aqui definido.","Allows admonitions to be created using ":"Permitir que Admonitions sejam criadas usando ","Process Memos below":"Processar Memorandos abaixo do Cabeçalho","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"Somente as entradas abaixo deste cabeçalho serão processadas nas suas notas. Se não configurar esta funcionalidade, nenhuma nota será processada para o ficheiro respetivo.","Save Memo button label":"Legenda do Botão de Guardar Memorandos","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":'Define o texto apresentado na UI do botão guardar memorandos. Padrão: "NOTEIT".',"Focus on editor when open memos":"Focar no Editor ao iniciar o Thino","Focus on Editor when open memos. Focus by default.":'Focar no editor ao iniciar o Thino. Padrão: "Focar".',"Open daily memos with open memos":"Abrir memorandos diários ao iniciar o Thino","Open daily memos with open memos. Open by default.":'Abrir memorandos diários ao iniciar o Thino. Padrão: "Abrir".',"Open Memos when obsidian opens":"Abrir Thino quando o Obsidian inicia","When enable this, Memos will open when Obsidian opens. False by default.":'Quando esta opção está activa, o Memos abrirá quando o Obsidian inicia. Padrão: "Falso".',"Hide done tasks in Memo list":"Ocultar tarefas concluídas na lista de memorandos","Hide all done tasks in Memo list. Show done tasks by default.":'Ocultar todas as tarefas concluídas na lista de memorandos. Padrão: "Mostrar tarefas concluídas".',"Advanced Options":"Opções Avançadas","UI language for date":"Idioma na UI da Data ","Translates the date UI language. Only 'en' and 'zh' are available.":"Define o idioma na UI da Data. De momento, apenas 'en', 'fr', 'pt' e 'zh' estão disponíveis.","Default prefix when save thino":"Prefixo Padrão","Set the default prefix when create memo, 'List' by default.":"Define o prefixo padrão quando um memorando é criado. Padrão: 'Lista'.","Default insert date format":"Formato Padrão para Inserção de Data","Set the default date format when insert date by @, 'Tasks' by default.":"Define o formato de Data padrão ao inserir a data usando '@'. Padrão: 'Tarefas'.","Default editor position on mobile":"Posição Padrão do Editor de Memorandos na Versão Móvel","Set the default editor position on Mobile, 'Top' by default.":"Define a posição padrão do editor de memorandos na versão móvel. Padrão: 'Topo'.","Use button to show editor on mobile":"Usar Botão para Mostrar o Editor na Versão Móvel","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Define um botão flutuante para abrir o editor na versão móvel. Opção disponível somente quando a posição do editor está definida para 'Fundo'.","Show Time When Copy Results":"Mostrar a Hora ao Copiar os Resultados","Show time when you copy results, like 12:00. Copy time by default.":"Mostrar a Hora, no formato '12:00', ao copiar os resultados. Padrão: 'Copiar a hora'.","Show Date When Copy Results":"Mostrar a Data ao Copiar os Resultados","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":'Mostrar a Data, no formato [[2022-01-01]], ao copiar os resultados. Padrão: "Copiar a hora".',"Add Blank Line Between Different Date":"Adicionar Linha em Branco entre Datas Diferentes.","Add blank line when copy result with date. No blank line by default.":'Adicionar linha em branco ao copiar resultados com Data. Padrão: "Não adicionar linha."',"Share Options":"Opções de Partilha","Share Memos Image Footer Start":"Partilhar a Imagem de um memorando - Início do Rodapé","Set anything you want here, use {ThinoNum} to display Number of memos, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Defina como preferir, use {ThinoNum} para mostrar o número de thinorandos e use {UsedDay} para dias. 'Padrão: {ThinoNum} Thinorandos {UsedDay} Dias'.","Share Memos Image Footer End":"Partilhar a Imagem de um memorando - Fim do Rodapé","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Defina como preferir, use {UserName} como o seu nome de usuário. Padrão: '✍️ Por {UserName}'.","Save Shared Image To Folder For Mobile":"Guardar a Imagem Partilhada para Pasta na Versão Móvel","Save image to folder for mobile. False by Default":'Guardar a imagem partilhada para pasta na versão móvel. Padrão: "Falso".',"Say Thank You":"Agradeça",Donate:"Doar","If you like this plugin, consider donating to support continued development:":"Se gosta deste plugin, considere doar para apoiar o seu desenvolvimento contínuo:","File Name of Recycle Bin":"Nome da Reciclagem","Set the filename for recycle bin. 'delete' By default":"Define o nome do ficheiro para a Reciclagem. Padrão: 'delete'.","File Name of Query File":"Nome do Ficheiro de Query","Set the filename for query file. 'query' By default":"Define o nome do ficheiro de Query. Padrão: 'Query'.","Use Tags In Vault":"Usar Tags no Vault","Use tags in vault rather than only in Memos. False by default.":'Usar as Tags do Vault e não somente dos memorandos. Padrão: "Falso".',"Ready to convert image into background":"Pronto para converter imagem em fundo",List:"Lista",Task:"Tarefa",Top:"Topo",Bottom:"Fundo",TAG:"TAG",DAY:"DIA",QUERY:"QUERY",EDIT:"EDITAR",PIN:"FIXAR",UNPIN:"DESAFIXAR",DELETE:"ELIMINAR","CONFIRM!":"CONFIRMAR!","CREATE FILTER":"CRIAR FILTRO",Settings:"Definições","Recycle bin":"Reciclagem","About Me":"Acerca de mim","Fetching data...":"A obter dados...","Here is No Memos.":"Não existem Thino.","Frequently Used Tags":"Tags Usadas Frequentemente","What do you think now...":"Em que está a pensar...",READ:"LER",MARK:"ASSINALAR",SHARE:"PARTILHAR",SOURCE:"ORIGEM",RESTORE:"RESTAURAR","DELETE AT":"ELIMINADO EM","Noooop!":"Noooop!","All Data is Loaded 🎉":"Todos os Dados foram Carregados 🎉","Quick filter":"Filtro rápido",TYPE:"TIPO",LINKED:"LINKED","NO TAGS":"SEM TAGS","HAS LINKS":"TEM LINKS","HAS IMAGES":"TEM IMAGENS",INCLUDE:"INCLUIR",EXCLUDE:"EXCLUIR",TEXT:"TEXTO",IS:"É",ISNOT:"NÃO É",SELECT:"SELECCIONAR","ADD FILTER TERMS":"ADICIONAR TERMOS DE FILTRAGEM",FILTER:"FILTRAR",TITLE:"TÍTULO","CREATE QUERY":"CRIAR QUERY","EDIT QUERY":"EDITAR QUERY",MATCH:"IGUALA",TIMES:"VEZES","Share Memo Image":"Partilhar Imagem de Memo","↗Click the button to save":"↗Clique no botão para guardar","Image is generating...":"A gerar Imagem..","Image is loading...":"A carregar Imagem...","Loading...":"Carregando...","😟 Cannot load image, image link maybe broken":"😟 Não é possível carregar a imagem, o link da imagem pode estar incorrecto","Daily Memos":"Thino Diários","CANCEL EDIT":"CANCELAR EDIÇÃO","LINK TO THE":"LINK PARA O","Mobile Options":"Opções Móveis","Don't support web image yet, please input image path in vault":"Ainda não existe suporte para imagens de web. Por favor, insira o link para uma imagem do vault","Experimental Options":"Opções Experimentais","Background Image in Dark Theme":"Imagem de Fundo no Tema Escuro","Background Image in Light Theme":"Imagem de Fundo no Tema Claro",'Set background image in dark theme. Set something like "Daily/one.png"':'Defina a imagem de fundo para o tema escuro. Defina da seguinte forma: "Daily/one.png".','Set background image in light theme. Set something like "Daily/one.png"':'Defina a imagem de fundo para o tema claro. Defina da seguinte forma: "Daily/one.png".','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Defina a composição padrão do memorando, deve usar {TIME} como "HH:mm" e {CONTENT} como conteúdo. Padrão: "{TIME} {CONTENT}".',"Default Memo Composition":"Composição Padrão de um Memorando","Show Tasks Label":"Mostrar Etiquetas de Tarefas","Show tasks label near the time text. False by default":'Mostrar etiquetas de tarefas próximas do texto de tempo. Padrão: "Falso".',"Please Open Memos First":"Por favor, abra o Thino primeiro",DATE:"DATA",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED",BEFORE:"ANTES",AFTER:"DEPOIS","Allow Comments On Memos":"Permitir Comentários nos Memorandos","You can comment on memos. False by default":'Permite que comente os memorandos. Padrão: "Falso".',Import:"Importar","TITLE CANNOT BE NULL!":"O TÍTULO NÃO PODE SER NULO!","FILTER CANNOT BE NULL!":"O FILTRO NÃO PODE SER NULO!","Comments In Original DailyNotes/Notes":"Comentários nas Notas/Notas Diárias Originais","You should install Dataview Plug-in ver 0.5.9 or later to use this feature.":"Deve instalar a versão 0.5.9 ou posterior do plugin Dataview para usar esta funcionalidade.","Open Memos Successfully":"Thino Iniciado com Sucesso","Fetch Memos Error":"😭 Erro de Fetch","Copied to clipboard Successfully":"Copiado para a área de transferência com sucesso","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Verifique se abriu o plugin de Notas Diárias ou de Notas Periódicas","Please finish the last filter setting first":"Por favor, termine primeiro a configuração do último filtro","Close Memos Successfully":"Thino Fechado com Sucesso","Insert as Memo":"Inserir como um Memorando","Insert file as memo content":"Inserir ficheiro como conteúdo de um memorando","Image load failed":"Falha no carregamento da imagem","Content cannot be empty":"O Conteúdo não pode estar vazio","Unable to create new file.":"Não foi possível criar um novo ficheiro.","Failed to fetch deleted memos: ":"Falha no fetch dos memorandos removidos: ","RESTORE SUCCEED":"RESTAURO BEM SUCEDIDO","Save Memo button icon":"Ícone do Botão para Guardar Memorandos","The icon shown on the save Memo button in the UI.":"O ícone exibido na UI do botão para guardar memorandos.","Fetch Memos From Particular Notes":"Obter Memorandos de Notas Específicas",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'Pode definir qualquer Query de Dataview para o Memos procurar. Todos os memorandos nessas notas serão mostrados na lista. Padrão: "#memo".',"Allow Memos to Fetch Memo from Notes":"Permitir que o Thino Obtenha memorandos das Notas","Use Memos to manage all memos in your notes, not only in daily notes. False by default":'Use o Memos para gerir todos os memorandos nas suas notas e não apenas nas notas diárias. Padrão: "Falso".',"Always Show Memo Comments":"Mostrar Comentários dos Memorandos","Always show memo comments on memos. False by default":'Mostrar sempre os comentários dos memorandos. Padrão: "Falso".',"You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"Não definiu a pasta para as notas diárias, quer no plugin the Notas Periódicas ou de Notas Diárias.","Please check your daily note plugin OR periodic notes plugin settings":"Por favor, verifique as configurações dos plugins de Notas Diárias OU de Notas Periódicas","Use Which Plugin's Default Configuration":"Usar a Configuração Padrão do Plugin","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"O Memos usa a configuração padrão do plugin seleccionado para obter memorandos diariamente. Padrão: 'Notas Diárias'.",Daily:"Diário"},YA={},UA={},zA={},VA={welcome:"欢迎使用 Thino ",ribbonIconTitle:"Thino",months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:[null,null,null,null,null,null,null,null,null,null,null,null],weekDays:["周日","周一","周二","周三","周四","周五","周六"],weekDaysShort:["周日","周一","周二","周三","周四","周五","周六"],to:"至",year:"年",month:"月","Basic Options":"基础选项","User name":"用户名","Set your user name here. 'Memos 😏' By default":"在这里设置你喜欢的用户名。 默认为 'Thino 😏'",'You can set target heading like "# Heading" to control data location':'你可以设置目标标题,例如 "# Heading" 来控制数据的位置',"Insert after heading":"在指定标题后插入 Thino","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"若留空,则记录的 thino 内容在日记末尾插入,若填写标题,则记录的 thino 内容统一都记录在该标题下","Process Memos below":"解析指定标题后的 Thino","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"若留空,则在Thino界面会显示所有thino记录内容,若填写标题,则Thino界面只显示该标题下的内容,写入其他位置的内容不显示","Save Memo button label":"保存按钮上的文本","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"在保存按钮上展示的文本。默认为 'NOTEIT'","Focus on editor when open memos":"自动聚焦到 Thino 输入框","Focus on editor when open memos. Focus by default.":"当打开 Thino 的时候自动聚焦到 Thino 输入框。默认开启","Open daily memos with open memos":"打开每日 Thino 的时候打开 Thino 界面","Open daily memos with open memos. Open by default.":"打开每日 Thino 的时候打开 Thino 界面。默认开启","Open Memos when obsidian opens":"当开启 Obsidian 的时候自动打开 Thino","When enable this, Memos will open when Obsidian opens. False by default.":"当开启该选项, Thino 会在 Obsidian 打开时自动打开。默认不开启。","Hide done tasks in Memo list":"在 Thino 列表中隐藏已完成 Thino","Hide all done tasks in Memo list. Show done tasks by default.":"在 Thino 列表中隐藏已完成 Thino。默认不开启","Advanced Options":"进阶选项","UI language for date":"针对日期展示的语言界面","Translates the date UI language. Only 'en' and 'zh' are available.":"对日期的不同翻译。目前只能选择 'en' 和 'zh'(未来会废置)","Default prefix when save thino":"保存 Thino 时的默认前缀","Set the default prefix when create memo, 'List' by default.":"设置默认的前缀样式。默认为列表","Default insert date format":"插入日期附带的样式","Set the default date format when insert date by @, 'Tasks' by default.":"当使用 @ 来快速插入日期时,插入日期附带的样式,默认为 'Tasks' 样式","Default editor position on mobile":"在移动端上的默认编辑器位置","Set the default editor position on Mobile, 'Top' by default.":"设置在移动端上的默认编辑器位置,默认在顶部。","Use button to show editor on mobile":"当编辑器位置在底部时,用按钮来唤出编辑器","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"设置一个浮动按钮来唤出编辑器。当在移动端上启用该选项才会生效","Show Time When Copy Results":"当复制检索结果时附带时间","Show time when you copy results, like 12:00. Copy time by default.":"在复制检索结果时附带其时间,例如 12:00 。默认开启","Show Date When Copy Results":"当复制检索结果时附带日期","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"在复制检索结果时附带其日期,例如 [[2022-01-01]]。默认开启","Add Blank Line Between Different Date":"在复制日期的时候加上空行","Add blank line when copy result with date. No blank line by default.":"在复制日期的时候在相邻的日期之间加上空行。默认无空行","Share Options":"分享选项","Share Memos Image Footer Start":"分享 Thino 图片的左边页脚","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"你可以在这里设置你想要的任意文本,用 {ThinoNum} 来展示你记录的 thino 数量,{UsedDay} 来展示使用日期。默认为'{ThinoNum} Thino {UsedDay} Days'","Share Memos Image Footer End":"分享 Thino 图片的右边页脚","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"你可以在这里设置你想要的任意文本,用 {UserName} 来展示你的用户名。默认为 '✍️ By {UserName}'","Save Shared Image To Folder For Mobile":"当在移动端上时保存图片到文件夹","Save image to folder for mobile. False by Default":"当在移动端上时,保存生成的图片到文件夹","Say Thank You":"感谢开发",Donate:"捐赠","If you like this plugin, consider donating to support continued development:":"如果你喜欢这个插件,而且也希望给我买鸡腿,那么可以考虑 Github 页面右边的 Sponsor~","File Name of Recycle Bin":"回收站的文件名","Set the filename for recycle bin. 'delete' By default":"给回收站设置一个文件名。默认为'delete'","File Name of Query File":"检索文件的文件名","Set the filename for query file. 'query' By default":"设置存放检索式的文件的文件名。默认为'query'","Use Tags In Vault":"使用在库内的所有标签","Use tags in vault rather than only in Memos. False by default.":"使用在库内的而不是 Thino 内的标签。默认关闭","Don't support web image yet, please input image path in vault":"暂不支持网络图片,请使用本地图片","Ready to convert image into background":"正在将图片转换为背景图",List:"列表",Task:"任务",Top:"顶部",Bottom:"底部",TAG:"标签",DAY:"天",QUERY:"检索式",EDIT:"编辑",PIN:"置顶",UNPIN:"取消置顶",DELETE:"删除","CONFIRM!":"确定删除","CREATE FILTER":"创建检索式",Filter:"筛选",Settings:"设置","Recycle bin":"回收站","About Me":"关于","Fetching data...":"获取数据中...","Here is No Memos.":"没有找到 Thino","Frequently Used Tags":"常用标签","What do you think now...":"你现在在想什么?",READ:"阅读",MARK:"引用",SHARE:"分享",SOURCE:"来源",RESTORE:"恢复",ARCHIVE:"归档","DELETE AT":"删除于","Noooop!":"啥都没有!","All Data is Loaded 🎉":"所有数据都加载好啦 🎉","Quick filter":"快速筛选",TYPE:"类型",LINKED:"有链接","NO TAGS":"无标签","HAS LINKS":"有超链接","HAS IMAGES":"有图片",INCLUDE:"包括",EXCLUDE:"排除",TEXT:"文本",IS:"是",AND:"和",OR:"或",LIST:"状态",ISNOT:"不是",SELECT:"选择","ADD FILTER TERMS":"添加检索条件",FILTER:"筛选器",TITLE:"标题","CREATE QUERY":"创建检索式","EDIT QUERY":"编辑检索式",MATCH:"匹配",TIMES:"次","Share Memo Image":"分享 Thino 图片","↗Click the button to save":"↗点击右上角的按钮来保存","Image is generating...":"图片正在生成中...","Image is loading...":"图片正在加载中...","😟 Cannot load image, image link maybe broken":"😟 无法加载图片,图片链接也许不存在","Loading...":"努力加载中...","Daily Memos":"每日 Thino","CANCEL EDIT":"取消编辑","LINK TO THE":"链接到","Mobile Options":"移动端选项","Experimental Options":"实验性选项","Background Image in Dark Theme":"深色主题的背景图","Background Image in Light Theme":"浅色主题的背景图",'Set background image in dark theme. Set something like "Daily/one.png"':'设置深色主题的背景图。请设置类似"Daily/one.png"的路径','Set background image in light theme. Set something like "Daily/one.png"':'设置浅色主题的背景图。请设置类似"Daily/one.png"的路径','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'设置默认 Thino 组成,你必须要使用 {TIME} 作为 "HH:mm" 而且要设置 {CONTENT} 作为内容识别。默认情况下, Thino 基于 "{TIME} {CONTENT}" 识别',"Default Memo Composition":"【已弃置】默认 Thino 组成","Show Tasks Label":"展示任务标签","Show tasks label near the time text. False by default":"在 Thino 的时间旁展示任务标签。默认情况下不展示","Please Open Memos First":"请先打开 Thino","Comment it...":"评论...",DATE:"日期",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"Obsidian Natrual DATES language 插件没启动",BEFORE:"在之前",AFTER:"在之后","Allow Comments On Memos":"允许在 Thino 上评论","You can comment on memos. False by default":"你可以在 Thino 点击图标进行评论了。默认不开启",Import:"导入","TITLE CANNOT BE NULL!":"标题不可以为空!","FILTER CANNOT BE NULL!":"筛选器不可以为空!","Comments In Original DailyNotes/Notes":"在原文件中进行评论","You should install Dataview Plugin ver 0.5.9 or later to use this feature.":"你需要安装 0.5.9 版本以上的 Dataview 插件来使用该功能","Open Memos Successfully":"成功打开 Thino ","Fetch Memos Error":"😭 Thino 获取失败","Copied to clipboard Successfully":"复制成功","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"请检查你有没有开启日记插件或者 Periodic Notes 插件且启用了日记模式","Please finish the last filter setting first":"先完善上一个过滤器吧","Close Memos Successfully":"成功关闭 Thino ","Insert as Memo":"插入内容为 Thino","Insert file as memo content":"插入文件为 Thino","Image load failed":"有个图片加载失败了😟","Content cannot be empty":"内容不能为空呀","Unable to create new file.":"无法新建文件","Failed to fetch deleted memos: ":"无法获取已删除的 Thino :","RESTORE SUCCEED":"成功恢复 Thino","DELETE SUCCEED":"删除成功","Save Memo button icon":"保存按钮上的图标","The icon shown on the save Memo button in the UI.":"你可以设置保存按钮上的图标","Fetch Memos From Particular Notes":"从指定的文件中获取 Thino",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'你可以给笔记设置指定检索式来让 Memos 可以索引到它。默认为 "#memo" ',"Allow Memos to Fetch Memo from Notes":"允许 Thino 从笔记中获取 Thino","Use Memos to manage all memos in your notes, not only in daily notes. False by default":"使用 Memos 来管理你笔记中的 Memos,不单只 DailyNotes 中的内容。默认为关闭","Always Show Memo Comments":"评论将总是可见","Always show memo comments on memos. False by default":"当开启后评论总是会在 Thino 的下方展示。默认为关闭","You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"你在 Periodic Notes 插件和日记插件都没设置日记的所在文件夹","Please check your daily note plugin OR periodic notes plugin settings":"请检查你的日记插件和/或 Periodic Notes 插件的设置","Use which plugin's default configuration":"使用哪个插件的默认日记配置","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"Thino 采用指定插件的默认配置来获取 Thino。默认为日记插件。",Daily:"日记插件","Always Show Leaf Sidebar on PC":"在 PC 上总是展示左侧栏","Show left sidebar on PC even when the leaf width is less than 875px. False by default.":"在 PC 上即使页面宽度小于 875px 时都展示左侧栏。默认为关闭","You didn't set format for daily notes in both periodic-notes and daily-notes plugins.":"你在 Periodic Notes 插件和日记插件都没设置日记的格式","fetch more":"加载更多","Search all settings":"搜索所有设置","Random Review":"随机回顾","ARCHIVED AT":"归档于","Failed to get memos from daily notes":"无法从日记中获取 Thino","Failed to delete memo":"无法删除 Thino","CTRL + ENTER to save":"CTRL + ENTER 保存","Started from":"开始于","Custom Background Image":"自定义背景图","Set custom background image.":"设置自定义背景图","Custom Memo Footer":"自定义 Thino 页脚","Set custom memo footer.":"设置自定义 Thino 页脚","Heatmap Color Scheme":"热力图颜色","Set different color scheme for heatmap.":"设置热力图的颜色","Enable Local Http Server":"启用本地 HTTP 服务器","Memos Http Server Port":"Thino HTTP 服务器端口","Set memos http server port to listen. '43999' by default":"设置 Thino HTTP 服务器端口。默认为 '43999'","Live-Preview Mode OR Source Mode.":"基于 Thino 的所见即所得模式(默认) 或者 源码模式,你可以自己选择适合自己的输入体验。","Default Editor Mode":"默认编辑器模式","Save type for Thino":"Thino 保存类型",DAILY:"日记",MULTI:"多文件",CANVAS:"画布",FILE:"单文件",ALL:"所有","Failed to create daily note, check if it exists.":"无法创建日记,请检查是否存在文件夹","Failed to create daily note. Please check if you created a folder for daily notes.":"无法创建日记,请检查是否存在日记文件夹","After you verify your account, please refresh this page.":"验证成功后,请刷新页面。",Verify:"去验证","Oops! You forget to verify insider account":"内测账户验证失败","If you have any questions, please contact us.":"如果你有任何问题,请联系我们。","Delete Thino Directly":"直接删除 Thino","When delete thino directly, it will not be moved to trash. False by default.":"当直接删除 Thino 时,不会移动到回收站。默认为关闭","Get activation code":"获取激活码","Input activation code here":"在这里输入激活码","Copy Thino id":"获取 Thino id","Activate Pro Version":"激活专业版","Please copy Thino id first":"请先获取 Thino id",'You can set folder name with file name like "folder/file"':'你可以设置例如 "folder/file" 的文件夹名+文件名的搭配来存放在指定文件夹','You can set folder name like "folder1/folder2/folder3" to create sub-folder':'你可以设置例如 "folder1/folder2/folder3" 的文件夹名来创建子文件夹',"Default save type":"默认保存类型",'Set the default save type for thino. "DAILY" by default':'设置 Thino 的默认保存类型。默认为 "日记"',"Enable opening thino globally":"全局唤醒 Thino","Enable opening thino globally. False by default.":"全局唤醒 Thino。默认为关闭","Key for opening thino globally":"全局唤醒 Thino 的快捷键","Set key for opening thino globally. CTRL + SHIFT + T by default.":"设置全局唤醒 Thino 的快捷键。默认为 CTRL + SHIFT + T","Sync Thino via PKMer":"通过 PKMer 同步 Thino",Unlink:"取消链接",Link:"链接","Connect to PKMer Sync, you can check it in ":"连接到 PKMer 同步,你可以在该链接中查看:","PKMer Sync":"PKMer 同步","Remove successfully":"移除成功",Deactivate:"取消激活",Remove:"移除","Confirm?":"确认?","Sync Status":"同步状态","Start or stop sync":"开始或停止同步","Stop sync successfully":"停止同步成功","Start sync successfully":"开始同步成功",Stop:"停止",Start:"开始","Show thino near mouse":"在鼠标附近展示 Thino","Query not found":"检索式未找到","Send to clipboard successfully":"发送到剪贴板成功","Thino - Failed to start HTTP server, please check the port is available.":"Thino - 启动 HTTP 服务器失败,请检查端口是否可用。","Thino - Started HTTP server on port":"Thino - 启动 HTTP 服务器成功,端口为","Thino - Terminated HTTP server":"Thino - 终止 HTTP 服务器","File not exist":"文件不存在","Thino not found":"Thino 未找到","File not found for the given thino path, is creating a new file":"未找到承载指定 Thino 的文件,正在创建新文件","Saved sync token successfully":"保存同步令牌成功","Failed to find daily notes folder":"未找到日记文件夹","Please install obsidian-hover-editor plugin first":"请先安装 obsidian-hover-editor 插件","Copied app id successfully":"复制 app id 成功","Please input token first":"请先输入 token","Please enable sync first":"请先启用同步","Init Failed":"初始化失败","Folder not found for the given thino path, is creating a new folder":"未找到承载指定 Thino 的文件夹,正在创建新文件夹","File not found for the given thino path":"未找到承载指定 Thino 的文件","Failed to read current daily note, check if it exists.":"无法读取日记文件,请检查是否存在","Verify successfully":"验证成功","Failed to verify":"验证失败","Failed to save":"保存失败","Failed to login, please login again":"登录已过期,请重新登录","COPY FAILED":"复制失败","COPY SUCCEED":"复制成功","Copy selected text":"复制选中文本","Copy thino":"复制",COPY:"复制","This is a pro feature, please upgrade to pro version to use it.":"这是专业版功能,请升级到专业版来使用它。","You can get pro version from: ":"你可以从这里获取专业版:",Save:"保存",Cancel:"取消","Thino Daily Target":"Thino 每日目标",Input:"输入","#Tag":"#标签","to create tag":"来创建标签","You have verified your account. Congrats!":"你已经验证了你的账户。恭喜!","Pro features":"专业版功能","Target Thino Count":"目标 Thino 数量",on:"在","Switch waterfall view":"切换瀑布流视图","Switch view":"切换视图","Switch list view":"切换列表视图","Set daily target":"设置每日目标","Thino Save To: ":"Thino 保存到:","Enter fullscreen mode":"进入全屏模式","Exit fullscreen mode":"退出全屏模式",words:"字词","Return To Home Page":"返回首页","Open thino in center window":"在中心窗口打开 thino","Open thino in float window":"在浮动窗口打开 thino","Open thino in right sidebar":"在右侧边栏打开 thino","Open thino in left sidebar":"在左侧边栏打开 thino","Show thino editor":"显示 thino 编辑器","Toggle minimal mode":"切换 Minimal 模式","Focus on thino editor":"聚焦到 thino 编辑器","ReSync web thinos to local":"重新同步 web 上的 thino 到本地","Sync local thinos to web":"同步本地的 thino 到 web","Show daily thino":"显示每日 thino 视图","Focus on search bar":"聚焦到搜索栏","Show-thino in popover(Hover editor)":"在弹出框中显示 thino","Center window":"中心窗口","Float window":"浮动窗口","Right sidebar":"右侧边栏","Left sidebar":"左侧边栏","Save thino type when sync local":"同步本地时保存的 thino 类型","Set the default save thino type when sync local, FILE by default.":"设置同步本地时保存的 thino 类型,默认为单文件。","Sync service":"同步服务","Pro verification status":"专业版激活状态","Live-preview":"所见即所得",Source:"源码",General:"通用",Thino:"Thino",Theme:"主题",Share:"分享",Interface:"界面",Advanced:"进阶","Global copy":"全局复制","Set the folder name":"设置文件夹名","Set the filename":"设置文件名","Set the filename for current location file":"设置当前位置文件的文件名","Switch calendar type":"切换日历类型",alphabetical:"标签名称(A-Z)",alphabeticalReverse:"标签名称(Z-A)",byCount:"按使用次数(从高到低)",byCountReverse:"按使用次数(从低到高)","Type here":"在这里输入",Today:"今天",Yesterday:"昨天","Last 7 days":"最近 7 天","Last 30 days":"最近 30 天","Last 90 days":"最近 90 天","Last 180 days":"最近 180 天","Last 365 days":"最近 365 天",Found:"被找到","Copy filtered thinos":"复制筛选的 thino","Bulk delete":"批量删除","Bulk archive":"批量归档","Bulk tag operation":"标签编辑","Bulk restore":"批量恢复","If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.":"如果你禁用了日记插件,可能会导致 thino 无法被正确删除。请启用插件后再试一次。",Preview:"预览","Set and save":"设置并保存","Show day mark in thino list":"在 Thino 列中展示日期标记","Show day mark on the top of daily range thino. False by default.":"在 Thino 列中展示日期标记。默认为关闭","Click to expand or fold, Cmd+Click to show all thinos of the day":"点击展开或折叠,Cmd+点击展示当天所有 thino","You can buy a license from":"你可以从这里购买许可证","No thinos in range":"该范围内没有 thino",Month:"月视图",Week:"周视图",Day:"日视图",Agenda:"日程视图",Tomorrow:"明天",Previous:"往前",Next:"往后","Search all columns...":"搜索所有的列...","Basic Info":"基础信息","Additional Info":"附加信息","Created At":"创建于",Content:"内容","Thino Type":"Thino 类型","Source Type":"来源类型","Row status":"归档状态",Path:"路径","Pinned Status":"置顶状态",Table:"表格",Chat:"聊天",Moments:"动态",Waterfall:"瀑布流",Calendar:"日历","Go to page":"跳转到页",Page:"页",Show:"展示",rows:"行","Temp Filter":"临时筛选器","Set the heading for saving thino":"设置保存 Thino 的标题","# Heading":"# 标题","Open link directly in Thino view":"Thino 视图内直接打开双链","Day mark range":"日期标记范围","Set the range of day mark. Day by default.":"设置日期标记的范围,默认为天","Thino is locked":"Thino 已锁定","Please unlock Thino by input password":"请输入密码来解锁 Thino","Auto Download Image":"自动下载图片","Auto download image when save to thino. 'false' by default":"当保存到 Thino 时自动下载图片。默认为 'false'","Thino Http IP Type":"Thino HTTP 服务器 IP 类型","Set Thino http server ip to listen. 'localhost' by default":"设置 Thino HTTP 服务器 IP。默认为 'localhost'","Password to lock Thino":"锁定 Thino 的密码",Unlock:"解锁",Locked:"已锁定","Password is incorrect":"密码错误",Lock:"锁定","Need password to unlock Thino":"需要密码来解锁 Thino","You have not set a password or enable this feature yet":"你还没有设置密码或者启用该功能",Password:"密码","Password for Thino":"Thino 的密码","Please input your password to change password settings":"请输入原来的密码来修改密码设置","Please input your password":"请输入密码","Lock thino":"锁定 Thino",date:"日期",time:"时间",event:"事件","Add tag position":"添加标签位置","Set the position of the tag when adding tag automatically":"设置自动添加标签的位置","Add tag automatically":"自动添加标签","Add tag to the end or beginning of the thino content when creating a thino and filtering tags":"在创建 Thino 和筛选标签时,将标签添加到 Thino 内容的末尾或开头","Add tag with new line":"添加标签时换行","Add tag with new line when adding tag automatically":"自动添加标签时换行","Input to select more tags":"输入来选择更多标签","Tag Bulk Edit":"标签批量编辑","Tag Bulk Select":"标签批量选择","Exist Tags":"已有标签","Selected Tags":"已选标签","Click to remove exist tag":"点击移除已有标签","Click to remove selected tag":"点击移除已选标签","Select tags":"选择标签","Input to select exist tag":"输入来选择已有标签",Beginning:"开头",End:"末尾","Chat view style":"聊天视图样式","Set the style of chat view":"设置聊天视图的样式","Background image for moments view":"动态视图的背景图","Set the background image for moments view":"设置动态视图的背景图","Icon for moments/chat view/share image":"动态/聊天视图/分享图的头像","Set the icon for moments/chat view/share image":"设置动态/聊天视图/分享图的头像","Quote for moments view/share image":"动态视图/分享图的个性签名","Set the quote for moments view/share image":"设置动态视图/分享图的个性签名","Theme for Thino":"Thino 主题","Set the theme for Thino":"设置 Thino 的主题","Interface Details":"界面详情","Task amount":"任务数量","Thino status":"Thino 状态","Used tags":"使用的标签","Used days":"使用的天数","Most active day":"最活跃的一天","Most active hour":"最活跃的一小时","Thino amount":"Thino 数量","No content to generate.":"没有内容可以生成。","Image generated successfully.":"图片生成成功。","Failed to generate image.":"图片生成失败。","Share filtered thinos as image":"分享筛选的 Thino 为图片","Latest version":"最新版本","Previous version":"之前版本","Thino update info":"Thino 更新信息","Debug info copied to clipboard":"调试信息已复制到剪贴板","Copy debug info":"复制调试信息","Failed to load changelog":"无法加载更新日志","View online":"在线查看",ChangeLog:"更新日志","Please open thino first":"请先打开 Thino","Insert editor":"插入编辑器","Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.":"请在 Thino 设置中为多文件设置不同的路径,日记文件夹与多文件保存路径重复,或者存在被重复读取可能","Default time prefix for thino in daily notes":"日记中 Thino 的默认时间前缀","Set default time prefix for thino in daily notes.":"设置日记中 Thino 的默认时间前缀","Save image successfully":"保存图片成功","User quote":"用户签名","Set user quote for thino":"设置用户签名","User icon":"用户头像","Set user icon for thino. You can input http/https link or file path in vault.":"设置用户头像。你可以设置 http/https 链接或者 vault 中的文件路径。","User info":"用户信息","Copy filtered results":"复制筛选结果","Share image":"分享图片",Default:"默认",Gray:"灰色",Grass:"草绿",Flame:"火焰",Olive:"橄榄",Ice:"冰",Magenta:"品红","Daily notes":"日记相关",Editor:"编辑器","Append/prepend text when share to Thino":"分享到 Thino 时添加/前置文本","Append text when share to Thino":"分享到 Thino 时添加文本","Prepend text when share to Thino":"分享到 Thino 时前置文本","Add newline when append/prepend text":"添加换行符",Prepend:"前置",Append:"后置",Both:"两者",None:"无","Hide pinned group":"隐藏置顶分组","Hide pinned group in thino list. False by default.":"隐藏置顶的 Thino 分组。默认为关闭","Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"设置 Thino 任务类型的标题,如果提供了标题,所有记录的 Thino 内容将统一归类到该标题下。","Different insert target for different type":"不同类型的 Thino 有不同的插入目标","Toggle this to set different insert target for different type of thino, like task or list type of thino":"切换此选项以为不同类型的 Thino 设置不同的插入目标,例如任务或列表类型的 Thino","Set process target":"设置处理目标","You can set whole diary or only part of it":"你可以设置整个日记或者其中的一部分",Custom:"自定义","Whole diary":"整个日记","Set thino insert place":"设置 Thino 插入位置","Set where to insert thino content":"设置 Thino 内容插入位置","End of the diary":"日记的末尾","Custom location":"自定义位置","Setting guide":"设置流程","Details settings":"详细设置","Start Thino":"开始 Thino","About Thino Pro":"关于 Thino 专业版",Enabled:"已启用",Enable:"启用","Daily notes folder":"日记文件夹","Set daily notes folder":"设置日记文件夹","Daily note name format":"日记文件名格式","Set daily note name format":"设置日记文件名格式","Daily note plugin":"日记插件","Enable daily note plugin":"启用日记插件",Selected:"已选择",Select:"选择","A classic theme for Thino with a two-column layout":"Thino 的经典主题,采用两列布局",Classic:"经典","A modern theme for Thino with a three-column layout and some unique features.":"Thino 的现代主题,采用三列布局和一些独特的功能。",Modern:"现代","Go and enjoy Thino":"去享受 Thino 吧","Congrats! All settings done":"恭喜!所有设置已完成","Adjust settings that influence your user experience with Thino.":"调整影响你使用 Thino 的设置。","Set preferences for using Thino":"设置使用 Thino 的偏好","If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.":"如果你使用的是 Thino 基础版,启用日记插件是必须的。配置其设置以有效地使用它。","Go with daily note plugin":"使用日记插件","Choose a theme for Thino.":"选择 Thino 的主题。","Set theme for Thino":"设置 Thino 的主题","Set up your user info for Thino.":"设置你的用户信息。","Get started with Thino":"开始使用 Thino","Skip and start Thino":"跳过并开始 Thino","Next step":"下一步","Back to previous step":"返回上一步","Click to enable =>":"点击启用 =>","This is Thino's sidebar. Navigate to different path or select query filter.":"这是 Thino 的侧边栏。你可以导航到不同的路径或选择查询过滤器。","Click here and go to settings page.":"点击这里并转到设置页面。","Click here and go to different path.":"点击这里并转到不同的路径。","Select or create query filter here.":"在这里选择或创建查询过滤器。","See the status of Thinos here.":"在这里看到 Thino 的状态。","Search your thino quickly here.":"在这里快速搜索你的 Thino。","Edit or create your thino here.":"在这里编辑或创建你的 Thino。","See your thinos here.":"在这里看到你的 Thino。","See your time status of thinos here.":"在这里看到你的 Thino 时间状态。","See your tags here. Tags will be shown when thino contains tags.":"在这里看到你的标签。当 Thino 包含标签时,标签将显示。",Done:"完成","Thino is ready to use. ":"Thino 已准备好使用。","You can start using Thino now. If you want to know more about Thino Pro, click the button below.":"你现在可以开始使用 Thino 了。如果你想了解更多关于 Thino 专业版的信息,请点击下面的按钮。","Default time prefix":"默认时间前缀","Append Text Action":"分享到 Thino 时的后置文本动作","Prepend Text Action":"分享到 Thino 时的前置文本动作",Preset:"预设","Select Tags":"选择标签","It is not available on small view":"在窄的视图中不可用","Append text":"在末尾添加文本","Prepend text":"在开头添加文本","Your daily note folder is not set correctly, please check your settings":"你的日记文件夹设置不正确,请检查你的设置","Default sharing style":"默认分享样式","Set the default style for sharing thino, 'Modern' by default.":"设置 Thino 的默认分享样式,默认为“现代”。",Clean:"清爽",Minimal:"极简",Gradient:"渐变","Thino share":"Thino 分享","Copy to clipboard failed":"复制到剪贴板失败","Copy to clipboard successfully":"复制到剪贴板成功","Your content has been copied to clipboard, and inserted into the editor. Please try it again":"你的内容已经复制到剪贴板,并插入到编辑器中。请再试一次","Share thino":"分享 Thino","Set file name after create thino":"创建 Thino 后设置文件名","You can set file name after create thino. A input box will show when you create thino.":"你可以在创建 Thino 后设置文件名。当你创建 Thino 时,会显示一个输入框。",SPLIT:"分割","Split by Heading 1":"按一级标题分割","Split by Heading 2":"按二级标题分割","Split by Heading 3":"按三级标题分割","Insert task":"插入任务","All settings have been reset to default.":"所有设置已重置为默认值。","Reset all Thino settings":"重置所有 Thino 设置","Reset settings":"重置设置","Reset Thino settings to default settings.":"将 Thino 设置重置为默认设置。","Task Management":"任务管理","Append completed date when task done in thino":"在 Thino 中的任务完成时添加完成日期","Append completed date when task done in thino. False by default":"在 Thino 中的任务完成时添加完成日期。默认为关闭","Set tag for single file that Thino indexes":"Thino 会索引被设置标签的单文件","When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.":"当你在这里设置一个标签时,Thino 会索引包含这个标签的文件,并在列表中显示。不需要添加 `#`。","Set tag for file type file":"为单文件类型文件设置标签","Set tag for multi type file":"为多文件类型文件设置标签","Please input the tag":"请输入标签","Merge thinos in to thino share image":"合并 Thino 到 Thino 分享图片","Custom height for Thino content":"自定义 Thino 内容高度","Set custom height for Thino content. Like 200px or 20rem":"设置 Thino 内容的自定义高度。如 200px 或 20rem","Input height":"输入高度"},WA={},ZA={ar:IA,cs:xA,da:EA,de:CA,en:xx,"en-gb":MA,es:kA,fr:NA,hi:AA,id:FA,it:PA,ja:OA,ko:jA,nl:LA,nn:RA,pl:_A,pt:BA,"pt-br":HA,ro:YA,ru:UA,tr:zA,"zh-cn":VA,"zh-tw":WA},wD=ZA[C.moment.locale()];function E(e){const t=wD&&wD[e]||xx[e];return t===null?t:t||e}const $A=/```([\s\S]*?)```/g,qA=/\*\*(.+?)\*\*/g,GA=/\*(.+?)\*/g,JA=/\[ \] /g,KA=/\[.{1}\] /g,QA=/^[*-]/g,XA=/(\d+)\. /g,bD=/\[\[([^\]]+)\]\]/g,Nb=/\[([^\]]+)\]\((([^\]]+).md)\)/g,e6=(e,t)=>{const n=e.replace($A,"<pre lang=''>$1</pre>").replace(QA,"<span class='counter-block'>•</span>").replace(XA,"<span class='counter-block'>$1.</span>").replace(JA,"<span class='todo-block' data-type='todo'>⬜</span>").replace(KA,"<span class='todo-block' data-type='done'>✅</span>").replace(qA,"<strong>$1</strong>").replace(GA,"<em>$1</em>").replace(/<br>/g,"</p><p>").replace(/&/g,"&");let r=n;if(t){if(bD.test(n)){const o=n.match(bD);for(let i=0;i<o.length;i++)if(!/(jpeg|jpg|gif|png|svg|bmp|wepg)/g.test(o[i])){const a=t6(o[i]);if(/\|/g.test(a)){const[u,d]=a.split("|"),f=Rw(u,d);r=n.replace(o[i],f)}else{const f=Rw(a,"");r=r.replace(o[i],f)}}}if(Nb.test(n)){const o=n.match(Nb);for(let i=0;i<o.length;i++)if(!/(jpeg|jpg|gif|png|svg|bmp|wepg)/g.test(o[i])){const a=r6(o[i]),u=n6(o[i]),d=Rw(a,u);r=n.replace(o[i],d)}}}return r},Rw=(e,t)=>{const{metadataCache:n}=_e.getState().dailyNotesState.app;return n.getFirstLinkpathDest(decodeURIComponent(e),"")instanceof C.TFile?t?`<a data-href="${e}" data-type="link" data-filepath="${e}" class="internal-link">${t}</a>`:`<a data-href="${e}" data-type="link" data-filepath="${e}" class="internal-link">${e}</a>`:t?`<a data-href="${e}" data-type="link" data-filepath="${e}" class="internal-link is-unresolved">${t}</a>`:`<a data-href="${e}" data-type="link" data-filepath="${e}" class="internal-link is-unresolved">${e}</a>`},t6=e=>{var t;return(t=/\[\[([^\]]+)\]\]/g.exec(e))==null?void 0:t[1]},n6=e=>{var t;return(t=Nb.exec(e))==null?void 0:t[1]},r6=e=>{var t;return(t=/\[([^\]]+)\]\((([^\]]+).md)\)/g.exec(e))==null?void 0:t[3]},SD=e=>{const t=document.createElement("div");return t.className="memo-content-text",t.innerHTML=e,t.innerText},o6=e=>e.replace(/\n/g,"<br>"),i6=e=>{const t=document.createElement("div");return t.textContent=e,t.innerHTML},DD="mobile-show-sidebar",Ex=200,fl=3600*24*1e3,gr=/\s#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/g,so=/(<p>|<br>)#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/g,jr=/^#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/gu,Od=/(\s|:|\(|>|^)((http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-]))/g,a6=/\[([\s\S]*?)\]\(([\s\S]*?)\)/gu,jd=/([^\s<\\*>'(]+\.(jpeg|jpg|gif|png|svg))(\]\])?(\))?/g,hc=/\[@(.+?)\]\((.+?)\)/g,s6=/[#*"\/\\<>:|\[\]\?]/gim,l6=/^(-|\*|\d\.)\s(\[.\]\s)?(\d{1,2}:\d{2}(:\d{2})?)\s(.*)/g,km=[{title:"DAILY",icon:"list"},{title:"CANVAS",icon:"layout-dashboard"},{title:"MULTI",icon:"file-text"},{title:"FILE",icon:"edit"}];var Ab;(e=>{function t(){return parseInt(C.moment().format("x"))}e.getNowTimeStamp=t;function n(U){const z=/'’A-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,$=/\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5/.source,te=/[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5]{1}/.source,Q=new RegExp([`(?:[0-9]+(?:(?:,|\\.)[0-9]+)*|[\\-${z}])+`,$,te].join("|"),"g");return(U.match(Q)||[]).length}e.getWordCount=n;function r(U){Mm()&&(U!=null&&U.EnabledLocationList.some(z=>z.value==="DAILY"))&&(U!=null&&U.EnabledLocationList.some(z=>z.value==="MULTI"))&&t0().contains(U==null?void 0:U.MemoOtherSaveLocation.MemoDefaultMultiFilePath)&&new C.Notice(E("Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly."),5e3)}e.checkDailyInMulti=r;function o(){const U=navigator.userAgent;let z="Unknown";return U.indexOf("Win")!=-1?z="Windows":U.indexOf("Mac")!=-1?z="MacOS":U.indexOf("Linux")!=-1&&(z="Linux"),z}e.getOSVersion=o;function i(U){return typeof U=="string"&&(U=U.replaceAll("-","/")),new Date(U).getTime()}e.getTimeStampByDate=i;function a(U){const z=new Date(i(U));return new Date(z.getFullYear(),z.getMonth(),z.getDate()).getTime()}e.getDateStampByDate=a;function u(U){const z=new Date(i(U)),$=z.getFullYear(),te=z.getMonth()+1,Q=z.getDate();return`${$}/${te}/${Q}`}e.getDateString=u;function d(U){const z=new Date(i(U)),$=z.getHours(),te=z.getMinutes(),Q=$<10?"0"+$:$,ue=te<10?"0"+te:te;return`${Q}:${ue}`}e.getTimeString=d;function f(U){const z=new Date(i(U)),$=z.getFullYear(),te=z.getMonth()+1,Q=z.getDate(),ue=z.getHours(),ee=z.getMinutes(),le=z.getSeconds(),W=te<10?"0"+te:te,de=Q<10?"0"+Q:Q,oe=ue<10?"0"+ue:ue,he=ee<10?"0"+ee:ee,K=le<10?"0"+le:le;return`${$}/${W}/${de} ${oe}:${he}:${K}`}e.getDateTimeString=f;function m(U){return Array.from(new Set(U))}e.dedupe=m;function g(U){const z=new Set,$=[];for(const te of U)z.has(te.id)||(z.add(te.id),$.push(te));return $}e.dedupeObjectWithId=g;function v(U,z){let $=null;return()=>{$&&clearTimeout($),$=setTimeout(U,z)}}e.debounce=v;function w(U,z,$=!1,te){let Q=null,ue=!1;function ee(...le){if(Q&&clearTimeout(Q),$&&!ue){const W=U.apply(this,le);te&&typeof te=="function"&&te(W),ue=!0}else Q=setTimeout(()=>{const W=U.apply(this,le);te&&typeof te=="function"&&te(W),ue=!1,Q=null},z)}return ee.cancel=function(){Q&&clearTimeout(Q),Q=null,ue=!1},ee}e.debouncePlus=w;function D(U,z){let $=!0;return()=>{if(!$)return!1;$=!1,setTimeout(()=>{U(),$=!0},z)}}e.throttle=D;function T(U){const z=[],$=Object.keys(U).sort();for(const te of $){const Q=U[te];Q&&(typeof Q=="object"?z.push(...T(Q).split("&")):z.push(`${te}=${Q}`))}return z.join("&")}e.transformObjectToParamsString=T;function I(U){const z={},$=U.split("&");for(const te of $){const[Q,ue]=te.split("=");Q&&ue&&(z[Q]=ue)}return z}e.transformParamsStringToObject=I;function k(U){if(!U)return{};const z={},$=Object.keys(U).sort();for(const te of $){const Q=U[te];if(typeof Q=="object"){const ue=k(JSON.parse(JSON.stringify(Q)));ue&&Object.keys(ue).length>0&&(z[te]=ue)}else Q&&(z[te]=Q)}return z}e.filterObjectNullKeys=k;async function A(U){if(navigator.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(U)}catch(z){console.warn("Copy to clipboard failed.",z)}else console.warn("Copy to clipboard failed, methods not supports.")}e.copyTextToClipboard=A;function R(U){return new Promise(z=>{const $=new Image;$.onload=()=>{const{width:te,height:Q}=$;te>0&&Q>0?z({width:te,height:Q}):z({width:0,height:0})},$.onerror=()=>{z({width:0,height:0})},$.className="hidden",$.src=U,document.body.appendChild($),$.remove()})}e.getImageSize=R;async function j(U){var Q,ue,ee,le;let z;const te=app.plugins.getPlugin("obsidian-memos").settings.UseDailyOrPeriodic==="Daily";try{return!te&&((le=(ee=(ue=(Q=window.app.plugins)==null?void 0:Q.getPlugin("periodic-notes"))==null?void 0:ue.calendarSetManager)==null?void 0:ee.getActiveConfig("day"))!=null&&le.enabled)?(z=await window.app.plugins.getPlugin("periodic-notes").createPeriodicNote("day",U),z):(z=await app.internalPlugins.getPluginById("daily-notes").instance.getDailyNote(U)||await Ix(U),z)}catch(W){return console.error(W),new C.Notice(E("Failed to create daily note. Please check if you created a folder for daily notes.")),null}}e.createDailyNoteCheck=j;function B(U){const z=[];let $=0;for(;$<U;$++)z.push((16*Math.random()|0).toString(16));return z.join("")}e.randomId=B;function L(U){return U.replace(/[\p{P}\p{Z}\p{S}]/gu,"").length}e.countWords=L;async function Z(U){try{const z=await C.requestUrl(U),$=new Uint8Array(z.arrayBuffer);return new Blob([$],{type:"image/png"})}catch(z){return console.error("error in grabImageFromUrl",U,z),new Blob}}e.grabImageFromUrl=Z})(Ab||(Ab={}));const ut=Ab;function u6(){var i,a,u,d,f,m;let e="";const t=app.plugins.getPlugin("obsidian-memos").settings;let n="";const r=(u=(a=(i=window.app.plugins.getPlugin("periodic-notes"))==null?void 0:i.calendarSetManager)==null?void 0:a.getActiveConfig("day"))==null?void 0:u.folder,o=(m=(f=(d=window.app.plugins.getPlugin("periodic-notes"))==null?void 0:d.settings)==null?void 0:f.daily)==null?void 0:m.format;switch(r===void 0?n=o:n=r,(t==null?void 0:t.UseDailyOrPeriodic)||"Daily"){case"Daily":e=oc().format||"YYYY-MM-DD";break;case"Periodic":e=n||"YYYY-MM-DD";break;default:e=oc().format||"YYYY-MM-DD";break}return e===void 0&&new C.Notice(E("You didn't set format for daily notes in both periodic-notes and daily-notes plugins.")),e}function t0(){var i,a,u,d,f,m;let e="";const t=app.plugins.getPlugin("obsidian-memos").settings;let n="";const r=(u=(a=(i=window.app.plugins.getPlugin("periodic-notes"))==null?void 0:i.calendarSetManager)==null?void 0:a.getActiveConfig("day"))==null?void 0:u.folder,o=(m=(f=(d=window.app.plugins.getPlugin("periodic-notes"))==null?void 0:d.settings)==null?void 0:f.daily)==null?void 0:m.folder;switch(r===void 0?n=o:n=r,(t==null?void 0:t.UseDailyOrPeriodic)||"Daily"){case"Daily":e=oc().folder||"";break;case"Periodic":e=n||"";break;default:e=oc().folder||"";break}return e===void 0&&new C.Notice(E("You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.")),e}function c6(){const e=t0();return!(e!==void 0&&!app.vault.getFolderByPath(e))}function Fb(e,t){var r;e=i6(e),e=o6(e).split("<br>").map(o=>`<p>${o!==""?o:"<br>"}</p>`).join(""),e=e6(e,t),e=e.replace(gr,"<span class='tag-span'>#$1</span>").replace(so,"<p><span class='tag-span'>#$2</span>").replace(Od,"$1<a class='link' target='_blank' rel='noreferrer' href='$2'>$2</a>").replace(a6,"<a class='link' target='_blank' rel='noreferrer' href='$2'>$1</a>").replace(hc,"<span class='memo-link-text' data-value='$2'>$1</span>").replace(/\^\S{6}/g,"");const n=document.createElement("div");n.innerHTML=e;for(let o=0;o<n.children.length;o++){const i=n.children[o];if(i.tagName==="P"&&i.textContent===""&&((r=i.firstElementChild)==null?void 0:r.tagName)!=="BR"){i.remove(),o--;continue}}return n.innerHTML}const n0=(e,t)=>{const n=window.atob(e),r=new ArrayBuffer(n.length),o=new Uint8Array(r);for(let i=0;i<n.length;i++)o[i]=n.charCodeAt(i);return new Blob([r],{type:t})};function d6(e,t){switch(t.type){case"SET_MEMOS":{const n=t.payload.memos.sort((o,i)=>{const a=ut.getTimeStampByDate(o.createdAt),u=ut.getTimeStampByDate(i.createdAt);return a===u?i.id.localeCompare(o.id):ut.getTimeStampByDate(i.createdAt)-ut.getTimeStampByDate(o.createdAt)}),r=ut.dedupeObjectWithId(n);return{...e,memos:[...r]}}case"SET_COMMENT_MEMOS":{const n=ut.dedupeObjectWithId(t.payload.commentMemos.sort((r,o)=>ut.getTimeStampByDate(o.createdAt)-ut.getTimeStampByDate(r.createdAt)));return{...e,commentMemos:[...n]}}case"SET_TAGS":return{...e,tags:t.payload.tags,tagsNum:t.payload.tagsNum};case"INSERT_MEMO":{const n=ut.dedupeObjectWithId([t.payload.memo,...e.memos].sort((r,o)=>ut.getTimeStampByDate(o.createdAt)-ut.getTimeStampByDate(r.createdAt)));return{...e,memos:n}}case"INSERT_COMMENT_MEMO":{const n=ut.dedupeObjectWithId([t.payload.memo,...e.commentMemos].sort((r,o)=>ut.getTimeStampByDate(o.createdAt)-ut.getTimeStampByDate(r.createdAt)));return{...e,commentMemos:[...n]}}case"DELETE_MEMO_BY_ID":return{...e,memos:[...e.memos].filter(n=>n.id!==t.payload.id)};case"DELETE_MEMO_BY_ID_BATCH":{const n=[...e.memos];return t.payload.ids.forEach(r=>{n.splice(n.findIndex(o=>o.id===r),1)}),{...e,memos:[...n]}}case"PREPARE_UPDATE_THINO":return{...e,preparingUpdateMemo:[...e.preparingUpdateMemo,{thino:t.payload.thino,originalId:t.payload.originalId}]};case"REMOVE_PREPARE_UPDATE_THINO":return{...e,preparingUpdateMemo:[]};case"REMOVE_PARTICULAR_PREPARE_UPDATE_THINO":return{...e,preparingUpdateMemo:e.preparingUpdateMemo.filter(n=>n.originalId!==t.payload.originalId)};case"CLEAR_MEMOS":return{...Cx};case"EDIT_MEMO":{const n=e.memos.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,memos:[...n]}}case"EDIT_MEMO_PATH":{const n=e.memos.map(r=>r.path===t.payload.path?{...r,...t.payload}:r);return{...e,memos:[...n]}}case"UPDATE_MEMO_BATCH":{const n=e.memos.filter(o=>o.path!==t.payload.path),r=ut.dedupeObjectWithId([...t.payload.memos,...n].sort((o,i)=>ut.getTimeStampByDate(i.createdAt)-ut.getTimeStampByDate(o.createdAt)));return{...e,memos:[...r]}}case"ARCHIVE_MEMO_BY_ID":{const n=e.memos.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,memos:[...n]}}case"ARCHIVE_MEMO_BY_ID_BULK":{const n=e.memos.map(r=>t.payload.some(o=>o.id===r.id)?{...r,...t.payload.filter(o=>o.id===r.id)[0]}:r);return{...e,memos:[...n]}}case"UNARCHIVE_MEMO_BY_ID":{const n=e.memos.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,memos:[...n]}}case"PIN_MEMO":{const n=e.memos.map(r=>r.id===t.payload.id?{...r,pinned:t.payload.pinned}:r);return{...e,memos:[...n]}}case"EDIT_COMMENT_MEMO":{const n=e.commentMemos.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,commentMemos:[...n]}}default:return e}}const Cx={memos:[],commentMemos:[],tags:[],tagsNum:{},preparingUpdateMemo:[]};function f6(e,t){switch(t.type){case"SIGN_IN":return{user:t.payload.user};case"SIGN_OUT":return{user:null};default:return e}}const h6={user:null};function p6(e,t){switch(t.type){case"SET_QUERIES":{const n=ut.dedupeObjectWithId(t.payload.queries.sort((r,o)=>ut.getTimeStampByDate(o.createdAt)-ut.getTimeStampByDate(r.createdAt)).sort((r,o)=>ut.getTimeStampByDate(o.pinnedAt??0)-ut.getTimeStampByDate(r.pinnedAt??0)));return{...e,queries:n}}case"INSERT_QUERY":{const n=ut.dedupeObjectWithId([t.payload.query,...e.queries].sort((r,o)=>ut.getTimeStampByDate(o.createdAt)-ut.getTimeStampByDate(r.createdAt)));return{...e,queries:n}}case"DELETE_QUERY_BY_ID":return{...e,queries:[...e.queries].filter(n=>n.id!==t.payload.id)};case"UPDATE_QUERY":{const n=e.queries.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,queries:n}}default:return e}}const m6={queries:[]};function g6(e,t){var n,r,o,i;switch(t.type){case"SET_DAILY_NOTES":return{...e,dailyNotes:t.payload.dailyNotes};case"SET_APP":return e.app?{...e}:{...e,app:t.payload.app};case"SET_PLUGIN":return e.plugin?{...e}:{...e,plugin:t.payload.plugin};case"SET_EDITOR":return e.editor?{...e}:{...e,editor:t.payload.editor};case"SET_SETTINGS":return e.settings&&e.settings===t.payload.settings?{...e}:{...e,settings:t.payload.settings};case"SET_VIEW":return e.view&&((r=(n=e.view)==null?void 0:n.leaf)==null?void 0:r.id)===((i=(o=t.payload.view)==null?void 0:o.leaf)==null?void 0:i.id)?{...e}:{...e,view:t.payload.view};case"CLEAR_VIEW":return e.view&&e.view.unload(),{...e,view:null};case"CLEAR_FILES":return{...e,dailyNotes:null};case"SET_VERIFY_STATE":return{...e,verifyState:t.payload.verifyState};default:return e}}const y6={dailyNotes:null,app:null,view:null,settings:null,editor:null,plugin:null,verifyState:null},_e=qN({globalState:JN,locationState:cx,memoState:Cx,userState:h6,queryState:m6,dailyNotesState:y6},$N({globalState:GN,locationState:KN,memoState:d6,userState:f6,queryState:p6,dailyNotesState:g6})),Ot=F.createContext(_e.getState());String.prototype.replaceAll||(String.prototype.replaceAll=function(e,t){return Object.prototype.toString.call(e).toLowerCase()==="[object regexp]"?this.replace(e,t):this.replace(new RegExp(e,"g"),t)});class v6{constructor(){De(this,"initialized",!1)}getState(){return _e.getState().dailyNotesState}setApp(t){return _e.dispatch({type:"SET_APP",payload:{app:t}}),t}setPlugin(t){return _e.dispatch({type:"SET_PLUGIN",payload:{plugin:t}}),t}setSettings(t){return _e.dispatch({type:"SET_SETTINGS",payload:{settings:t}}),this.initialized||(this.initialized=!0),t}setView(t){return _e.dispatch({type:"SET_VIEW",payload:{view:t}}),t}setEditor(t){return _e.dispatch({type:"SET_EDITOR",payload:{editor:t}}),t}async updateDailyNotes(t,n){const r=this.getState().dailyNotes,o=lh(t,"day");return n?delete r[`day-${o.format("YYYY-MM-DD")}T00:00:00+08:00}`]:r[`day-${o.format("YYYY-MM-DD")}T00:00:00+08:00}`]=t,_e.dispatch({type:"SET_DAILY_NOTES",payload:{dailyNotes:r}}),r}setVerifyState(t){return _e.dispatch({type:"SET_VERIFY_STATE",payload:{verifyState:t}}),t}async fechLocalDailyNotes(){try{const t=su();return _e.dispatch({type:"SET_DAILY_NOTES",payload:{dailyNotes:t}}),t}catch(t){console.error(t)}}}const yt=new v6;var Wr;(e=>{function t(i){const a={};for(const u of i)try{const d=localStorage.getItem(u);if(d!==null){const f=JSON.parse(d);a[u]=f}}catch(d){console.error("Get storage failed in ",u,d)}return a}e.get=t;function n(i){for(const a in i)try{const u=JSON.stringify(i[a]);localStorage.setItem(a,u)}catch(u){console.error("Save storage failed in ",a,u)}}e.set=n;function r(i){for(const a of i)try{localStorage.removeItem(a)}catch(u){console.error("Remove storage failed in ",a,u)}}e.remove=r;function o(){var a;const i=document.createElement("iframe");i.style.display="none",document.body.appendChild(i),(a=i.contentWindow)==null||a.localStorage.setItem("t",Date.now().toString()),i.remove()}e.emitStorageChangedEvent=o})(Wr||(Wr={}));class w6{constructor(){De(this,"getState",()=>_e.getState().globalState);De(this,"setEditMemoId",t=>{_e.dispatch({type:"SET_EDIT_MEMO_ID",payload:{editMemoId:t}})});De(this,"setRefresh",t=>{_e.dispatch({type:"SET_REFRESH",payload:{refresh:t}})});De(this,"setCommentMemoId",t=>{_e.dispatch({type:"SET_COMMENT_MEMO_ID",payload:{commentMemoId:t}})});De(this,"setMarkMemoId",t=>{_e.dispatch({type:"SET_MARK_MEMO_ID",payload:{markMemoId:t}})});De(this,"setLoaded",t=>{_e.dispatch({type:"SET_LOADED",payload:{loaded:t}})});De(this,"setGlobalEditorShown",t=>{_e.dispatch({type:"SET_GLOBAL_EDITOR_SHOWN",payload:{globalEditorShown:t}})});De(this,"setIsMobileView",t=>{_e.dispatch({type:"SET_MOBILE_VIEW",payload:{isMobileView:t}})});De(this,"setChangedByMemos",t=>{_e.dispatch({type:"SET_CHANGED_BY_MEMOS",payload:{changedByMemos:t}})});De(this,"setShowSiderbarInMobileView",t=>{_e.dispatch({type:"SET_SHOW_SIDEBAR_IN_MOBILE_VIEW",payload:{showSiderbarInMobileView:t}})});De(this,"setAppSetting",t=>{_e.dispatch({type:"SET_APP_SETTING",payload:t}),Wr.set(t)});De(this,"setMemoListView",t=>{_e.dispatch({type:"SET_MEMO_LIST_VIEW",payload:{memoListView:t}})});De(this,"setInstance",(t,n)=>{_e.dispatch({type:"SET_INSTANCE",payload:{id:t,instance:n}})});De(this,"setLocked",t=>{_e.dispatch({type:"SET_LOCKED",payload:{locked:t}})});De(this,"setExitSteps",t=>{_e.dispatch({type:"SET_EXIT_STEPS",payload:{exited:t}})});De(this,"setPluginManifest",t=>{_e.dispatch({type:"SET_MEMO_PLUGIN_MANIFEST",payload:{manifest:t}})});const t=Wr.get(["shouldSplitMemoWord","shouldHideImageUrl","shouldUseMarkdownParser","useTinyUndoHistoryCache"]),n={shouldSplitMemoWord:t.shouldSplitMemoWord||!0,shouldHideImageUrl:t.shouldHideImageUrl||!0,shouldUseMarkdownParser:t.shouldUseMarkdownParser||!0,useTinyUndoHistoryCache:t.useTinyUndoHistoryCache||!1};this.setAppSetting(n)}}const dt=new w6;class b6{constructor(){De(this,"updateStateWithLocation",()=>{const{pathname:t,search:n,hash:r}=window.location,o=new URLSearchParams(n),i={pathname:"/",hash:"",query:{tag:"",duration:null,text:"",type:"",filter:""}};i.query.tag=o.get("tag")||"",i.query.type=o.get("type")??"",i.query.text=o.get("text")??"",i.query.filter=o.get("filter")??"";const a=parseInt(o.get("from")??"0"),u=parseInt(o.get("to")??"0");u>a&&u!==0&&(i.query.duration={from:a,to:u}),i.hash=r,i.pathname=this.getValidPathname(t),_e.dispatch({type:"SET_LOCATION",payload:i})});De(this,"getState",()=>_e.getState().locationState);De(this,"clearQuery",()=>{_e.dispatch({type:"SET_QUERY",payload:{tag:"",duration:null,text:"",type:"",filter:""}})});De(this,"setQuery",t=>{_e.dispatch({type:"SET_QUERY",payload:t})});De(this,"reloadApp",()=>{_e.dispatch({type:"RELOAD"})});De(this,"setHash",t=>{_e.dispatch({type:"SET_HASH",payload:{hash:t}})});De(this,"setPathname",t=>{_e.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})});De(this,"pushHistory",t=>{_e.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})});De(this,"replaceHistory",t=>{_e.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})});De(this,"setMemoTypeQuery",(t="")=>{_e.dispatch({type:"SET_TYPE",payload:{type:t}})});De(this,"setMemoFilter",t=>{_e.dispatch({type:"SET_QUERY_FILTER",payload:t})});De(this,"setTextQuery",t=>{_e.dispatch({type:"SET_TEXT",payload:{text:t}})});De(this,"setTimeQuery",t=>{_e.dispatch({type:"SET_DURATION_QUERY",payload:{duration:t}})});De(this,"setTagQuery",t=>{_e.dispatch({type:"SET_TAG_QUERY",payload:{tag:t}})});De(this,"setFromAndToQuery",(t,n)=>{_e.dispatch({type:"SET_DURATION_QUERY",payload:{duration:{from:t,to:n}}})});De(this,"getValidPathname",t=>["/","/homeboard","/recycle","/setting"].includes(t)?t:"/");this.updateStateWithLocation(),window.onpopstate=()=>{this.updateStateWithLocation()}}}const st=new b6,vd=e=>`${e.vault.configDir}/query.json`,Mx=async(e,t)=>{try{return await e.vault.adapter.read(t),!0}catch(n){return console.error(n),!1}},Mh=async e=>(await Mx(e,vd(e))||await kx(e),JSON.parse(await e.vault.adapter.read(vd(e))).queries||[]),tg=async(e,t)=>{await e.vault.adapter.write(vd(e),JSON.stringify({queries:t},null,2))},kx=async e=>{const t=dt.getState().manifest,n=e.plugins.getPlugin(t.id||"obsidian-memos").settings,r=e.metadataCache.getFirstLinkpathDest(n.QueryFileName,"");if(!r)await e.vault.adapter.write(vd(e),JSON.stringify({queries:[]},null,2));else{const i=(await e.vault.read(r)).split(`
|
|
|
`);i.length===0&&await e.vault.adapter.write(vd(e),JSON.stringify({queries:[]},null,2));const a=[];for(let u=0;u<i.length;u++){const d=u,f="Memos";let m="未命名";const g=i[u];let v=C.moment().format("YYYY/MM/DD HH:mm:ss"),w="[]";const D=g.match(/^\d{14,16}/);D&&(v=C.moment(D[0].slice(0,14),"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:ss"));const T=g.match(/\[\{(.+)\}\]/);T&&(w=T[0]);const I=g.match(/\s(.+)\s\[\{/);I&&(m=I[0].slice(1,-3)),a.push({id:d,pinnedAt:"",createdAt:v,updatedAt:v,title:m,querystring:w,userId:f})}await e.vault.adapter.write(vd(e),JSON.stringify({queries:a},null,2))}},S6=async()=>{const{app:e}=_e.getState().dailyNotesState;return await Mx(e,vd(e))||await kx(e),await Mh(e)||[]},D6=(e,t)=>({createdAt:C.moment().format("YYYY/MM/DD HH:mm:ss"),id:e,pinnedAt:"",querystring:t,title:E("Temp Filter"),updatedAt:C.moment().format("YYYY/MM/DD HH:mm:ss"),userId:"Thino"}),T6=async(e,t)=>{const n=await Mh(_e.getState().dailyNotesState.app)||[],r={createdAt:C.moment().format("YYYY/MM/DD HH:mm:ss"),id:C.moment().format("YYYYMMDDHHmmss")+n.length,pinnedAt:"",querystring:t,title:e,updatedAt:C.moment().format("YYYY/MM/DD HH:mm:ss"),userId:"Thino"};return n.push(r),await tg(_e.getState().dailyNotesState.app,n),r};var wv={exports:{}};wv.exports;(function(e,t){(function(){var n,r="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",f=500,m="__lodash_placeholder__",g=1,v=2,w=4,D=1,T=2,I=1,k=2,A=4,R=8,j=16,B=32,L=64,Z=128,U=256,z=512,$=30,te="...",Q=800,ue=16,ee=1,le=2,W=3,de=1/0,oe=9007199254740991,he=17976931348623157e292,K=NaN,re=4294967295,pe=re-1,Ie=re>>>1,Oe=[["ary",Z],["bind",I],["bindKey",k],["curry",R],["curryRight",j],["flip",z],["partial",B],["partialRight",L],["rearg",U]],Ne="[object Arguments]",Be="[object Array]",Je="[object AsyncFunction]",ze="[object Boolean]",Qe="[object Date]",It="[object DOMException]",Zt="[object Error]",Re="[object Function]",tt="[object GeneratorFunction]",at="[object Map]",gt="[object Number]",Et="[object Null]",Tt="[object Object]",qt="[object Promise]",zt="[object Proxy]",$t="[object RegExp]",Gt="[object Set]",cn="[object String]",Xt="[object Symbol]",Qn="[object Undefined]",En="[object WeakMap]",Cr="[object WeakSet]",yr="[object ArrayBuffer]",Rn="[object DataView]",ji="[object Float32Array]",xo="[object Float64Array]",Uo="[object Int8Array]",Li="[object Int16Array]",Eo="[object Int32Array]",Ri="[object Uint8Array]",ua="[object Uint8ClampedArray]",ui="[object Uint16Array]",_i="[object Uint32Array]",ne=/\b__p \+= '';/g,ge=/\b(__p \+=) '' \+/g,Ae=/(__e\(.*?\)|\b__t\)) \+\n'';/g,He=/&(?:amp|lt|gt|quot|#39);/g,Ye=/[&<>"']/g,et=RegExp(He.source),nt=RegExp(Ye.source),kt=/<%-([\s\S]+?)%>/g,en=/<%([\s\S]+?)%>/g,jn=/<%=([\s\S]+?)%>/g,wn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lr=/^\w*$/,_n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rr=/[\\^$.*+?()[\]{}|]/g,Rr=RegExp(rr.source),ca=/^\s+/,bn=/\s/,co=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,fo=/\{\n\/\* \[wrapped with (.+)\] \*/,Mr=/,? & /,zo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ho=/[()=,{}\[\]\/\s]/,bl=/\\(\\)?/g,Bi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Hi=/\w*$/,cu=/^[-+]0x[0-9a-f]+$/i,Sl=/^0b[01]+$/i,Ba=/^\[object .+?Constructor\]$/,da=/^0o[0-7]+$/i,Ha=/^(?:0|[1-9]\d*)$/,Dl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ya=/($^)/,du=/['\n\r\u2028\u2029\\]/g,Sn="\\ud800-\\udfff",_r="\\u0300-\\u036f",vs="\\ufe20-\\ufe2f",ws="\\u20d0-\\u20ff",Yi=_r+vs+ws,Tl="\\u2700-\\u27bf",ci="a-z\\xdf-\\xf6\\xf8-\\xff",Vo="\\xac\\xb1\\xd7\\xf7",po="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ua="\\u2000-\\u206f",vr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",bs="A-Z\\xc0-\\xd6\\xd8-\\xde",Ss="\\ufe0e\\ufe0f",Ds=Vo+po+Ua+vr,Wo="['’]",za="["+Sn+"]",Ui="["+Ds+"]",Zo="["+Yi+"]",M="\\d+",H="["+Tl+"]",J="["+ci+"]",ae="[^"+Sn+Ds+M+Tl+ci+bs+"]",ke="\\ud83c[\\udffb-\\udfff]",Te="(?:"+Zo+"|"+ke+")",Ue="[^"+Sn+"]",ot="(?:\\ud83c[\\udde6-\\uddff]){2}",ct="[\\ud800-\\udbff][\\udc00-\\udfff]",Nt="["+bs+"]",Yt="\\u200d",Tn="(?:"+J+"|"+ae+")",Co="(?:"+Nt+"|"+ae+")",mo="(?:"+Wo+"(?:d|ll|m|re|s|t|ve))?",Br="(?:"+Wo+"(?:D|LL|M|RE|S|T|VE))?",di=Te+"?",go="["+Ss+"]?",Mo="(?:"+Yt+"(?:"+[Ue,ot,ct].join("|")+")"+go+di+")*",qr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",$o="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",yo=go+di+Mo,fa="(?:"+[H,ot,ct].join("|")+")"+yo,ha="(?:"+[Ue+Zo+"?",Zo,ot,ct,za].join("|")+")",Jh=RegExp(Wo,"g"),_d=RegExp(Zo,"g"),Va=RegExp(ke+"(?="+ke+")|"+ha+yo,"g"),Kh=RegExp([Nt+"?"+J+"+"+mo+"(?="+[Ui,Nt,"$"].join("|")+")",Co+"+"+Br+"(?="+[Ui,Nt+Tn,"$"].join("|")+")",Nt+"?"+Tn+"+"+mo,Nt+"+"+Br,$o,qr,M,fa].join("|"),"g"),fi=RegExp("["+Yt+Sn+Yi+Ss+"]"),Ts=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Il=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Cn=-1,on={};on[ji]=on[xo]=on[Uo]=on[Li]=on[Eo]=on[Ri]=on[ua]=on[ui]=on[_i]=!0,on[Ne]=on[Be]=on[yr]=on[ze]=on[Rn]=on[Qe]=on[Zt]=on[Re]=on[at]=on[gt]=on[Tt]=on[$t]=on[Gt]=on[cn]=on[En]=!1;var an={};an[Ne]=an[Be]=an[yr]=an[Rn]=an[ze]=an[Qe]=an[ji]=an[xo]=an[Uo]=an[Li]=an[Eo]=an[at]=an[gt]=an[Tt]=an[$t]=an[Gt]=an[cn]=an[Xt]=an[Ri]=an[ua]=an[ui]=an[_i]=!0,an[Zt]=an[Re]=an[En]=!1;var hi={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},qo={"&":"&","<":"<",">":">",'"':""","'":"'"},fu={"&":"&","<":"<",">":">",""":'"',"'":"'"},Wa={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},hu=parseFloat,Is=parseInt,xs=typeof Vr=="object"&&Vr&&Vr.Object===Object&&Vr,bc=typeof self=="object"&&self&&self.Object===Object&&self,An=xs||bc||Function("return this")(),Es=t&&!t.nodeType&&t,pi=Es&&!0&&e&&!e.nodeType&&e,Sc=pi&&pi.exports===Es,zi=Sc&&xs.process,kr=function(){try{var be=pi&&pi.require&&pi.require("util").types;return be||zi&&zi.binding&&zi.binding("util")}catch{}}(),Cs=kr&&kr.isArrayBuffer,Nr=kr&&kr.isDate,Za=kr&&kr.isMap,pa=kr&&kr.isRegExp,Ms=kr&&kr.isSet,pu=kr&&kr.isTypedArray;function lr(be,Ve,Pe){switch(Pe.length){case 0:return be.call(Ve);case 1:return be.call(Ve,Pe[0]);case 2:return be.call(Ve,Pe[0],Pe[1]);case 3:return be.call(Ve,Pe[0],Pe[1],Pe[2])}return be.apply(Ve,Pe)}function $a(be,Ve,Pe,pt){for(var Wt=-1,pn=be==null?0:be.length;++Wt<pn;){var ur=be[Wt];Ve(pt,ur,Pe(ur),be)}return pt}function or(be,Ve){for(var Pe=-1,pt=be==null?0:be.length;++Pe<pt&&Ve(be[Pe],Pe,be)!==!1;);return be}function xl(be,Ve){for(var Pe=be==null?0:be.length;Pe--&&Ve(be[Pe],Pe,be)!==!1;);return be}function mu(be,Ve){for(var Pe=-1,pt=be==null?0:be.length;++Pe<pt;)if(!Ve(be[Pe],Pe,be))return!1;return!0}function Vi(be,Ve){for(var Pe=-1,pt=be==null?0:be.length,Wt=0,pn=[];++Pe<pt;){var ur=be[Pe];Ve(ur,Pe,be)&&(pn[Wt++]=ur)}return pn}function ks(be,Ve){var Pe=be==null?0:be.length;return!!Pe&&qa(be,Ve,0)>-1}function Hr(be,Ve,Pe){for(var pt=-1,Wt=be==null?0:be.length;++pt<Wt;)if(Pe(Ve,be[pt]))return!0;return!1}function In(be,Ve){for(var Pe=-1,pt=be==null?0:be.length,Wt=Array(pt);++Pe<pt;)Wt[Pe]=Ve(be[Pe],Pe,be);return Wt}function mi(be,Ve){for(var Pe=-1,pt=Ve.length,Wt=be.length;++Pe<pt;)be[Wt+Pe]=Ve[Pe];return be}function Dc(be,Ve,Pe,pt){var Wt=-1,pn=be==null?0:be.length;for(pt&&pn&&(Pe=be[++Wt]);++Wt<pn;)Pe=Ve(Pe,be[Wt],Wt,be);return Pe}function Bd(be,Ve,Pe,pt){var Wt=be==null?0:be.length;for(pt&&Wt&&(Pe=be[--Wt]);Wt--;)Pe=Ve(Pe,be[Wt],Wt,be);return Pe}function Ns(be,Ve){for(var Pe=-1,pt=be==null?0:be.length;++Pe<pt;)if(Ve(be[Pe],Pe,be))return!0;return!1}var Hd=N("length");function Tc(be){return be.split("")}function gu(be){return be.match(zo)||[]}function El(be,Ve,Pe){var pt;return Pe(be,function(Wt,pn,ur){if(Ve(Wt,pn,ur))return pt=pn,!1}),pt}function Cl(be,Ve,Pe,pt){for(var Wt=be.length,pn=Pe+(pt?1:-1);pt?pn--:++pn<Wt;)if(Ve(be[pn],pn,be))return pn;return-1}function qa(be,Ve,Pe){return Ve===Ve?Ud(be,Ve,Pe):Cl(be,vu,Pe)}function yu(be,Ve,Pe,pt){for(var Wt=Pe-1,pn=be.length;++Wt<pn;)if(pt(be[Wt],Ve))return Wt;return-1}function vu(be){return be!==be}function Ic(be,Ve){var Pe=be==null?0:be.length;return Pe?Fe(be,Ve)/Pe:K}function N(be){return function(Ve){return Ve==null?n:Ve[be]}}function _(be){return function(Ve){return be==null?n:be[Ve]}}function q(be,Ve,Pe,pt,Wt){return Wt(be,function(pn,ur,kn){Pe=pt?(pt=!1,pn):Ve(Pe,pn,ur,kn)}),Pe}function ie(be,Ve){var Pe=be.length;for(be.sort(Ve);Pe--;)be[Pe]=be[Pe].value;return be}function Fe(be,Ve){for(var Pe,pt=-1,Wt=be.length;++pt<Wt;){var pn=Ve(be[pt]);pn!==n&&(Pe=Pe===n?pn:Pe+pn)}return Pe}function xe(be,Ve){for(var Pe=-1,pt=Array(be);++Pe<be;)pt[Pe]=Ve(Pe);return pt}function We(be,Ve){return In(Ve,function(Pe){return[Pe,be[Pe]]})}function rt(be){return be&&be.slice(0,zd(be)+1).replace(ca,"")}function St(be){return function(Ve){return be(Ve)}}function Vt(be,Ve){return In(Ve,function(Pe){return be[Pe]})}function jt(be,Ve){return be.has(Ve)}function Mn(be,Ve){for(var Pe=-1,pt=be.length;++Pe<pt&&qa(Ve,be[Pe],0)>-1;);return Pe}function Yr(be,Ve){for(var Pe=be.length;Pe--&&qa(Ve,be[Pe],0)>-1;);return Pe}function ko(be,Ve){for(var Pe=be.length,pt=0;Pe--;)be[Pe]===Ve&&++pt;return pt}var No=_(hi),Ml=_(qo);function xc(be){return"\\"+Wa[be]}function ma(be,Ve){return be==null?n:be[Ve]}function wu(be){return fi.test(be)}function K0(be){return Ts.test(be)}function Q0(be){for(var Ve,Pe=[];!(Ve=be.next()).done;)Pe.push(Ve.value);return Pe}function Yd(be){var Ve=-1,Pe=Array(be.size);return be.forEach(function(pt,Wt){Pe[++Ve]=[Wt,pt]}),Pe}function Qh(be,Ve){return function(Pe){return be(Ve(Pe))}}function gi(be,Ve){for(var Pe=-1,pt=be.length,Wt=0,pn=[];++Pe<pt;){var ur=be[Pe];(ur===Ve||ur===m)&&(be[Pe]=m,pn[Wt++]=Pe)}return pn}function As(be){var Ve=-1,Pe=Array(be.size);return be.forEach(function(pt){Pe[++Ve]=pt}),Pe}function X0(be){var Ve=-1,Pe=Array(be.size);return be.forEach(function(pt){Pe[++Ve]=[pt,pt]}),Pe}function Ud(be,Ve,Pe){for(var pt=Pe-1,Wt=be.length;++pt<Wt;)if(be[pt]===Ve)return pt;return-1}function ew(be,Ve,Pe){for(var pt=Pe+1;pt--;)if(be[pt]===Ve)return pt;return pt}function kl(be){return wu(be)?Cg(be):Hd(be)}function Go(be){return wu(be)?Mg(be):Tc(be)}function zd(be){for(var Ve=be.length;Ve--&&bn.test(be.charAt(Ve)););return Ve}var Eg=_(fu);function Cg(be){for(var Ve=Va.lastIndex=0;Va.test(be);)++Ve;return Ve}function Mg(be){return be.match(Va)||[]}function tw(be){return be.match(Kh)||[]}var nw=function be(Ve){Ve=Ve==null?An:bu.defaults(An.Object(),Ve,bu.pick(An,Il));var Pe=Ve.Array,pt=Ve.Date,Wt=Ve.Error,pn=Ve.Function,ur=Ve.Math,kn=Ve.Object,Ec=Ve.RegExp,rw=Ve.String,yi=Ve.TypeError,Ga=Pe.prototype,Xh=pn.prototype,ga=kn.prototype,Su=Ve["__core-js_shared__"],Cc=Xh.toString,mn=ga.hasOwnProperty,Du=0,Vd=function(){var c=/[^.]+$/.exec(Su&&Su.keys&&Su.keys.IE_PROTO||"");return c?"Symbol(src)_1."+c:""}(),Mc=ga.toString,Wd=Cc.call(kn),kg=An._,Ng=Ec("^"+Cc.call(mn).replace(rr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),kc=Sc?Ve.Buffer:n,Ja=Ve.Symbol,Nc=Ve.Uint8Array,ep=kc?kc.allocUnsafe:n,Wi=Qh(kn.getPrototypeOf,kn),Zd=kn.create,$d=ga.propertyIsEnumerable,qd=Ga.splice,Ag=Ja?Ja.isConcatSpreadable:n,Ka=Ja?Ja.iterator:n,Nl=Ja?Ja.toStringTag:n,Ac=function(){try{var c=rs(kn,"defineProperty");return c({},"",{}),c}catch{}}(),Fg=Ve.clearTimeout!==An.clearTimeout&&Ve.clearTimeout,Bn=pt&&pt.now!==An.Date.now&&pt.now,tp=Ve.setTimeout!==An.setTimeout&&Ve.setTimeout,Al=ur.ceil,Fs=ur.floor,Gd=kn.getOwnPropertySymbols,np=kc?kc.isBuffer:n,Tu=Ve.isFinite,Jd=Ga.join,Iu=Qh(kn.keys,kn),cr=ur.max,Gr=ur.min,ow=pt.now,Pg=Ve.parseInt,Fc=ur.random,Kd=Ga.reverse,Pc=rs(Ve,"DataView"),Fl=rs(Ve,"Map"),Oc=rs(Ve,"Promise"),Ps=rs(Ve,"Set"),jc=rs(Ve,"WeakMap"),xu=rs(kn,"create"),Qd=jc&&new jc,Eu={},rp=$s(Pc),Os=$s(Fl),Og=$s(Oc),Cu=$s(Ps),ya=$s(jc),js=Ja?Ja.prototype:n,Jo=js?js.valueOf:n,Xd=js?js.toString:n;function G(c){if(fr(c)&&!Qt(c)&&!(c instanceof Jt)){if(c instanceof Jr)return c;if(mn.call(c,"__wrapped__"))return Lp(c)}return new Jr(c)}var Mu=function(){function c(){}return function(h){if(!ar(h))return{};if(Zd)return Zd(h);c.prototype=h;var S=new c;return c.prototype=n,S}}();function va(){}function Jr(c,h){this.__wrapped__=c,this.__actions__=[],this.__chain__=!!h,this.__index__=0,this.__values__=n}G.templateSettings={escape:kt,evaluate:en,interpolate:jn,variable:"",imports:{_:G}},G.prototype=va.prototype,G.prototype.constructor=G,Jr.prototype=Mu(va.prototype),Jr.prototype.constructor=Jr;function Jt(c){this.__wrapped__=c,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=re,this.__views__=[]}function ef(){var c=new Jt(this.__wrapped__);return c.__actions__=bo(this.__actions__),c.__dir__=this.__dir__,c.__filtered__=this.__filtered__,c.__iteratees__=bo(this.__iteratees__),c.__takeCount__=this.__takeCount__,c.__views__=bo(this.__views__),c}function op(){if(this.__filtered__){var c=new Jt(this);c.__dir__=-1,c.__filtered__=!0}else c=this.clone(),c.__dir__*=-1;return c}function ku(){var c=this.__wrapped__.value(),h=this.__dir__,S=Qt(c),O=h<0,Y=S?c.length:0,X=oy(0,Y,this.__views__),fe=X.start,ve=X.end,Se=ve-fe,Ze=O?ve:fe-1,$e=this.__iteratees__,Ke=$e.length,ft=0,Ct=Gr(Se,this.__takeCount__);if(!S||!O&&Y==Se&&Ct==Se)return gp(c,this.__actions__);var _t=[];e:for(;Se--&&ft<Ct;){Ze+=h;for(var rn=-1,Bt=c[Ze];++rn<Ke;){var sn=$e[rn],hn=sn.iteratee,ta=sn.type,ri=hn(Bt);if(ta==le)Bt=ri;else if(!ri){if(ta==ee)continue e;break e}}_t[ft++]=Bt}return _t}Jt.prototype=Mu(va.prototype),Jt.prototype.constructor=Jt;function Ao(c){var h=-1,S=c==null?0:c.length;for(this.clear();++h<S;){var O=c[h];this.set(O[0],O[1])}}function Hn(){this.__data__=xu?xu(null):{},this.size=0}function Ln(c){var h=this.has(c)&&delete this.__data__[c];return this.size-=h?1:0,h}function Ls(c){var h=this.__data__;if(xu){var S=h[c];return S===d?n:S}return mn.call(h,c)?h[c]:n}function Kr(c){var h=this.__data__;return xu?h[c]!==n:mn.call(h,c)}function Fo(c,h){var S=this.__data__;return this.size+=this.has(c)?0:1,S[c]=xu&&h===n?d:h,this}Ao.prototype.clear=Hn,Ao.prototype.delete=Ln,Ao.prototype.get=Ls,Ao.prototype.has=Kr,Ao.prototype.set=Fo;function vo(c){var h=-1,S=c==null?0:c.length;for(this.clear();++h<S;){var O=c[h];this.set(O[0],O[1])}}function Nu(){this.__data__=[],this.size=0}function Po(c){var h=this.__data__,S=Xr(h,c);if(S<0)return!1;var O=h.length-1;return S==O?h.pop():qd.call(h,S,1),--this.size,!0}function tf(c){var h=this.__data__,S=Xr(h,c);return S<0?n:h[S][1]}function jg(c){return Xr(this.__data__,c)>-1}function Lg(c,h){var S=this.__data__,O=Xr(S,c);return O<0?(++this.size,S.push([c,h])):S[O][1]=h,this}vo.prototype.clear=Nu,vo.prototype.delete=Po,vo.prototype.get=tf,vo.prototype.has=jg,vo.prototype.set=Lg;function vi(c){var h=-1,S=c==null?0:c.length;for(this.clear();++h<S;){var O=c[h];this.set(O[0],O[1])}}function Rg(){this.size=0,this.__data__={hash:new Ao,map:new(Fl||vo),string:new Ao}}function Qa(c){var h=kf(this,c).delete(c);return this.size-=h?1:0,h}function nf(c){return kf(this,c).get(c)}function ip(c){return kf(this,c).has(c)}function _g(c,h){var S=kf(this,c),O=S.size;return S.set(c,h),this.size+=S.size==O?0:1,this}vi.prototype.clear=Rg,vi.prototype.delete=Qa,vi.prototype.get=nf,vi.prototype.has=ip,vi.prototype.set=_g;function Pl(c){var h=-1,S=c==null?0:c.length;for(this.__data__=new vi;++h<S;)this.add(c[h])}function Rs(c){return this.__data__.set(c,d),this}function Au(c){return this.__data__.has(c)}Pl.prototype.add=Pl.prototype.push=Rs,Pl.prototype.has=Au;function Qr(c){var h=this.__data__=new vo(c);this.size=h.size}function rf(){this.__data__=new vo,this.size=0}function of(c){var h=this.__data__,S=h.delete(c);return this.size=h.size,S}function wi(c){return this.__data__.get(c)}function bi(c){return this.__data__.has(c)}function Ol(c,h){var S=this.__data__;if(S instanceof vo){var O=S.__data__;if(!Fl||O.length<o-1)return O.push([c,h]),this.size=++S.size,this;S=this.__data__=new vi(O)}return S.set(c,h),this.size=S.size,this}Qr.prototype.clear=rf,Qr.prototype.delete=of,Qr.prototype.get=wi,Qr.prototype.has=bi,Qr.prototype.set=Ol;function wa(c,h){var S=Qt(c),O=!S&&ad(c),Y=!S&&!O&&qu(c),X=!S&&!O&&!Y&&Qf(c),fe=S||O||Y||X,ve=fe?xe(c.length,rw):[],Se=ve.length;for(var Ze in c)(h||mn.call(c,Ze))&&!(fe&&(Ze=="length"||Y&&(Ze=="offset"||Ze=="parent")||X&&(Ze=="buffer"||Ze=="byteLength"||Ze=="byteOffset")||Di(Ze,Se)))&&ve.push(Ze);return ve}function ba(c){var h=c.length;return h?c[zc(0,h-1)]:n}function jl(c,h){return ei(bo(c),Xa(h,0,c.length))}function Bg(c){return ei(bo(c))}function Lc(c,h,S){(S!==n&&!as(c[h],S)||S===n&&!(h in c))&&Sa(c,h,S)}function Ll(c,h,S){var O=c[h];(!(mn.call(c,h)&&as(O,S))||S===n&&!(h in c))&&Sa(c,h,S)}function Xr(c,h){for(var S=c.length;S--;)if(as(c[S][0],h))return S;return-1}function Ko(c,h,S,O){return Ta(c,function(Y,X,fe){h(O,Y,S(Y),fe)}),O}function Yn(c,h){return c&&Ki(h,ao(h),c)}function Zi(c,h){return c&&Ki(h,Ei(h),c)}function Sa(c,h,S){h=="__proto__"&&Ac?Ac(c,h,{configurable:!0,enumerable:!0,value:S,writable:!0}):c[h]=S}function af(c,h){for(var S=-1,O=h.length,Y=Pe(O),X=c==null;++S<O;)Y[S]=X?n:Cw(c,h[S]);return Y}function Xa(c,h,S){return c===c&&(S!==n&&(c=c<=S?c:S),h!==n&&(c=c>=h?c:h)),c}function Oo(c,h,S,O,Y,X){var fe,ve=h&g,Se=h&v,Ze=h&w;if(S&&(fe=Y?S(c,O,Y,X):S(c)),fe!==n)return fe;if(!ar(c))return c;var $e=Qt(c);if($e){if(fe=iy(c),!ve)return bo(c,fe)}else{var Ke=ro(c),ft=Ke==Re||Ke==tt;if(qu(c))return vp(c,ve);if(Ke==Tt||Ke==Ne||ft&&!Y){if(fe=Se||ft?{}:Uu(c),!ve)return Se?aw(c,Zi(fe,c)):Gg(c,Yn(fe,c))}else{if(!an[Ke])return Y?c:{};fe=oo(c,Ke,ve)}}X||(X=new Qr);var Ct=X.get(c);if(Ct)return Ct;X.set(c,fe),nD(c)?c.forEach(function(Bt){fe.add(Oo(Bt,h,S,Bt,c,X))}):eD(c)&&c.forEach(function(Bt,sn){fe.set(sn,Oo(Bt,h,S,sn,c,X))});var _t=Ze?Se?Jc:Mf:Se?Ei:ao,rn=$e?n:_t(c);return or(rn||c,function(Bt,sn){rn&&(sn=Bt,Bt=c[sn]),Ll(fe,sn,Oo(Bt,h,S,sn,c,X))}),fe}function Hg(c){var h=ao(c);return function(S){return Rc(S,c,h)}}function Rc(c,h,S){var O=S.length;if(c==null)return!O;for(c=kn(c);O--;){var Y=S[O],X=h[Y],fe=c[Y];if(fe===n&&!(Y in c)||!X(fe))return!1}return!0}function ap(c,h,S){if(typeof c!="function")throw new yi(a);return Vu(function(){c.apply(n,S)},h)}function Da(c,h,S,O){var Y=-1,X=ks,fe=!0,ve=c.length,Se=[],Ze=h.length;if(!ve)return Se;S&&(h=In(h,St(S))),O?(X=Hr,fe=!1):h.length>=o&&(X=jt,fe=!1,h=new Pl(h));e:for(;++Y<ve;){var $e=c[Y],Ke=S==null?$e:S($e);if($e=O||$e!==0?$e:0,fe&&Ke===Ke){for(var ft=Ze;ft--;)if(h[ft]===Ke)continue e;Se.push($e)}else X(h,Ke,O)||Se.push($e)}return Se}var Ta=Jg(Si),Yg=Jg(_s,!0);function $i(c,h){var S=!0;return Ta(c,function(O,Y,X){return S=!!h(O,Y,X),S}),S}function Rl(c,h,S){for(var O=-1,Y=c.length;++O<Y;){var X=c[O],fe=h(X);if(fe!=null&&(ve===n?fe===fe&&!ea(fe):S(fe,ve)))var ve=fe,Se=X}return Se}function sf(c,h,S,O){var Y=c.length;for(S=nn(S),S<0&&(S=-S>Y?0:Y+S),O=O===n||O>Y?Y:nn(O),O<0&&(O+=Y),O=S>O?0:oD(O);S<O;)c[S++]=h;return c}function _l(c,h){var S=[];return Ta(c,function(O,Y,X){h(O,Y,X)&&S.push(O)}),S}function wr(c,h,S,O,Y){var X=-1,fe=c.length;for(S||(S=uw),Y||(Y=[]);++X<fe;){var ve=c[X];h>0&&S(ve)?h>1?wr(ve,h-1,S,O,Y):mi(Y,ve):O||(Y[Y.length]=ve)}return Y}var _c=Tp(),lf=Tp(!0);function Si(c,h){return c&&_c(c,h,ao)}function _s(c,h){return c&&lf(c,h,ao)}function wo(c,h){return Vi(h,function(S){return Zl(c[S])})}function Qo(c,h){h=es(h,c);for(var S=0,O=h.length;c!=null&&S<O;)c=c[Qi(h[S++])];return S&&S==O?c:n}function uf(c,h,S){var O=h(c);return Qt(c)?O:mi(O,S(c))}function eo(c){return c==null?c===n?Qn:Et:Nl&&Nl in kn(c)?ry(c):uy(c)}function qi(c,h){return c>h}function Bs(c,h){return c!=null&&mn.call(c,h)}function sp(c,h){return c!=null&&h in kn(c)}function Ug(c,h,S){return c>=Gr(h,S)&&c<cr(h,S)}function Gi(c,h,S){for(var O=S?Hr:ks,Y=c[0].length,X=c.length,fe=X,ve=Pe(X),Se=1/0,Ze=[];fe--;){var $e=c[fe];fe&&h&&($e=In($e,St(h))),Se=Gr($e.length,Se),ve[fe]=!S&&(h||Y>=120&&$e.length>=120)?new Pl(fe&&$e):n}$e=c[0];var Ke=-1,ft=ve[0];e:for(;++Ke<Y&&Ze.length<Se;){var Ct=$e[Ke],_t=h?h(Ct):Ct;if(Ct=S||Ct!==0?Ct:0,!(ft?jt(ft,_t):O(Ze,_t,S))){for(fe=X;--fe;){var rn=ve[fe];if(!(rn?jt(rn,_t):O(c[fe],_t,S)))continue e}ft&&ft.push(_t),Ze.push(Ct)}}return Ze}function Hs(c,h,S,O){return Si(c,function(Y,X,fe){h(O,S(Y),X,fe)}),O}function Ys(c,h,S){h=es(h,c),c=Ff(c,h);var O=c==null?c:c[Qi(Ir(h))];return O==null?n:lr(O,c,S)}function lp(c){return fr(c)&&eo(c)==Ne}function cf(c){return fr(c)&&eo(c)==yr}function zg(c){return fr(c)&&eo(c)==Qe}function Fu(c,h,S,O,Y){return c===h?!0:c==null||h==null||!fr(c)&&!fr(h)?c!==c&&h!==h:up(c,h,S,O,Fu,Y)}function up(c,h,S,O,Y,X){var fe=Qt(c),ve=Qt(h),Se=fe?Be:ro(c),Ze=ve?Be:ro(h);Se=Se==Ne?Tt:Se,Ze=Ze==Ne?Tt:Ze;var $e=Se==Tt,Ke=Ze==Tt,ft=Se==Ze;if(ft&&qu(c)){if(!qu(h))return!1;fe=!0,$e=!1}if(ft&&!$e)return X||(X=new Qr),fe||Qf(c)?Cf(c,h,S,O,Y,X):ny(c,h,Se,S,O,Y,X);if(!(S&D)){var Ct=$e&&mn.call(c,"__wrapped__"),_t=Ke&&mn.call(h,"__wrapped__");if(Ct||_t){var rn=Ct?c.value():c,Bt=_t?h.value():h;return X||(X=new Qr),Y(rn,Bt,S,O,X)}}return ft?(X||(X=new Qr),kp(c,h,S,O,Y,X)):!1}function df(c){return fr(c)&&ro(c)==at}function ff(c,h,S,O){var Y=S.length,X=Y,fe=!O;if(c==null)return!X;for(c=kn(c);Y--;){var ve=S[Y];if(fe&&ve[2]?ve[1]!==c[ve[0]]:!(ve[0]in c))return!1}for(;++Y<X;){ve=S[Y];var Se=ve[0],Ze=c[Se],$e=ve[1];if(fe&&ve[2]){if(Ze===n&&!(Se in c))return!1}else{var Ke=new Qr;if(O)var ft=O(Ze,$e,Se,c,h,Ke);if(!(ft===n?Fu($e,Ze,D|T,O,Ke):ft))return!1}}return!0}function cp(c){if(!ar(c)||Pp(c))return!1;var h=Zl(c)?Ng:Ba;return h.test($s(c))}function Vg(c){return fr(c)&&eo(c)==$t}function dp(c){return fr(c)&&ro(c)==Gt}function Bc(c){return fr(c)&&xy(c.length)&&!!on[eo(c)]}function Hc(c){return typeof c=="function"?c:c==null?Ci:typeof c=="object"?Qt(c)?Ji(c[0],c[1]):Pu(c):mD(c)}function hf(c){if(!Xc(c))return Iu(c);var h=[];for(var S in kn(c))mn.call(c,S)&&S!="constructor"&&h.push(S);return h}function Wg(c){if(!ar(c))return ly(c);var h=Xc(c),S=[];for(var O in c)O=="constructor"&&(h||!mn.call(c,O))||S.push(O);return S}function Us(c,h){return c<h}function fp(c,h){var S=-1,O=xi(c)?Pe(c.length):[];return Ta(c,function(Y,X,fe){O[++S]=h(Y,X,fe)}),O}function Pu(c){var h=Nf(c);return h.length==1&&h[0][2]?ed(h[0][0],h[0][1]):function(S){return S===c||ff(S,c,h)}}function Ji(c,h){return Fp(c)&&zu(h)?ed(Qi(c),h):function(S){var O=Cw(S,c);return O===n&&O===h?Mw(S,c):Fu(h,O,D|T)}}function zs(c,h,S,O,Y){c!==h&&_c(h,function(X,fe){if(Y||(Y=new Qr),ar(X))Yc(c,h,fe,S,zs,O,Y);else{var ve=O?O(Xo(c,fe),X,fe+"",c,h,Y):n;ve===n&&(ve=X),Lc(c,fe,ve)}},Ei)}function Yc(c,h,S,O,Y,X,fe){var ve=Xo(c,S),Se=Xo(h,S),Ze=fe.get(Se);if(Ze){Lc(c,S,Ze);return}var $e=X?X(ve,Se,S+"",c,h,fe):n,Ke=$e===n;if(Ke){var ft=Qt(Se),Ct=!ft&&qu(Se),_t=!ft&&!Ct&&Qf(Se);$e=Se,ft||Ct||_t?Qt(ve)?$e=ve:xr(ve)?$e=bo(ve):Ct?(Ke=!1,$e=vp(Se,!0)):_t?(Ke=!1,$e=bp(Se,!0)):$e=[]:em(Se)||ad(Se)?($e=ve,ad(ve)?$e=iD(ve):(!ar(ve)||Zl(ve))&&($e=Uu(Se))):Ke=!1}Ke&&(fe.set(Se,$e),Y($e,Se,O,X,fe),fe.delete(Se)),Lc(c,S,$e)}function Vs(c,h){var S=c.length;if(S)return h+=h<0?S:0,Di(h,S)?c[h]:n}function pf(c,h,S){h.length?h=In(h,function(X){return Qt(X)?function(fe){return Qo(fe,X.length===1?X[0]:X)}:X}):h=[Ci];var O=-1;h=In(h,St(At()));var Y=fp(c,function(X,fe,ve){var Se=In(h,function(Ze){return Ze(X)});return{criteria:Se,index:++O,value:X}});return ie(Y,function(X,fe){return qg(X,fe,S)})}function Ou(c,h){return hp(c,h,function(S,O){return Mw(c,O)})}function hp(c,h,S){for(var O=-1,Y=h.length,X={};++O<Y;){var fe=h[O],ve=Qo(c,fe);S(ve,fe)&&Zn(X,es(fe,c),ve)}return X}function pp(c){return function(h){return Qo(h,c)}}function Un(c,h,S,O){var Y=O?yu:qa,X=-1,fe=h.length,ve=c;for(c===h&&(h=bo(h)),S&&(ve=In(c,St(S)));++X<fe;)for(var Se=0,Ze=h[X],$e=S?S(Ze):Ze;(Se=Y(ve,$e,Se,O))>-1;)ve!==c&&qd.call(ve,Se,1),qd.call(c,Se,1);return c}function Uc(c,h){for(var S=c?h.length:0,O=S-1;S--;){var Y=h[S];if(S==O||Y!==X){var X=Y;Di(Y)?qd.call(c,Y,1):Hl(c,Y)}}return c}function zc(c,h){return c+Fs(Fc()*(h-c+1))}function mp(c,h,S,O){for(var Y=-1,X=cr(Al((h-c)/(S||1)),0),fe=Pe(X);X--;)fe[O?X:++Y]=c,c+=S;return fe}function ju(c,h){var S="";if(!c||h<1||h>oe)return S;do h%2&&(S+=c),h=Fs(h/2),h&&(c+=c);while(h);return S}function Kt(c,h){return Pf(Af(c,h,Ci),c+"")}function Bl(c){return ba(Xf(c))}function Wn(c,h){var S=Xf(c);return ei(S,Xa(h,0,S.length))}function Zn(c,h,S,O){if(!ar(c))return c;h=es(h,c);for(var Y=-1,X=h.length,fe=X-1,ve=c;ve!=null&&++Y<X;){var Se=Qi(h[Y]),Ze=S;if(Se==="__proto__"||Se==="constructor"||Se==="prototype")return c;if(Y!=fe){var $e=ve[Se];Ze=O?O($e,Se,ve):n,Ze===n&&(Ze=ar($e)?$e:Di(h[Y+1])?[]:{})}Ll(ve,Se,Ze),ve=ve[Se]}return c}var br=Qd?function(c,h){return Qd.set(c,h),c}:Ci,mf=Ac?function(c,h){return Ac(c,"toString",{configurable:!0,enumerable:!1,value:Nw(h),writable:!0})}:Ci;function Vc(c){return ei(Xf(c))}function to(c,h,S){var O=-1,Y=c.length;h<0&&(h=-h>Y?0:Y+h),S=S>Y?Y:S,S<0&&(S+=Y),Y=h>S?0:S-h>>>0,h>>>=0;for(var X=Pe(Y);++O<Y;)X[O]=c[O+h];return X}function iw(c,h){var S;return Ta(c,function(O,Y,X){return S=h(O,Y,X),!S}),!!S}function Sr(c,h,S){var O=0,Y=c==null?O:c.length;if(typeof h=="number"&&h===h&&Y<=Ie){for(;O<Y;){var X=O+Y>>>1,fe=c[X];fe!==null&&!ea(fe)&&(S?fe<=h:fe<h)?O=X+1:Y=X}return Y}return Wc(c,h,Ci,S)}function Wc(c,h,S,O){var Y=0,X=c==null?0:c.length;if(X===0)return 0;h=S(h);for(var fe=h!==h,ve=h===null,Se=ea(h),Ze=h===n;Y<X;){var $e=Fs((Y+X)/2),Ke=S(c[$e]),ft=Ke!==n,Ct=Ke===null,_t=Ke===Ke,rn=ea(Ke);if(fe)var Bt=O||_t;else Ze?Bt=_t&&(O||ft):ve?Bt=_t&&ft&&(O||!Ct):Se?Bt=_t&&ft&&!Ct&&(O||!rn):Ct||rn?Bt=!1:Bt=O?Ke<=h:Ke<h;Bt?Y=$e+1:X=$e}return Gr(X,pe)}function gf(c,h){for(var S=-1,O=c.length,Y=0,X=[];++S<O;){var fe=c[S],ve=h?h(fe):fe;if(!S||!as(ve,Se)){var Se=ve;X[Y++]=fe===0?0:fe}}return X}function yf(c){return typeof c=="number"?c:ea(c)?K:+c}function Xn(c){if(typeof c=="string")return c;if(Qt(c))return In(c,Xn)+"";if(ea(c))return Xd?Xd.call(c):"";var h=c+"";return h=="0"&&1/c==-de?"-0":h}function Dr(c,h,S){var O=-1,Y=ks,X=c.length,fe=!0,ve=[],Se=ve;if(S)fe=!1,Y=Hr;else if(X>=o){var Ze=h?null:So(c);if(Ze)return As(Ze);fe=!1,Y=jt,Se=new Pl}else Se=h?[]:ve;e:for(;++O<X;){var $e=c[O],Ke=h?h($e):$e;if($e=S||$e!==0?$e:0,fe&&Ke===Ke){for(var ft=Se.length;ft--;)if(Se[ft]===Ke)continue e;h&&Se.push(Ke),ve.push($e)}else Y(Se,Ke,S)||(Se!==ve&&Se.push(Ke),ve.push($e))}return ve}function Hl(c,h){return h=es(h,c),c=Ff(c,h),c==null||delete c[Qi(Ir(h))]}function vf(c,h,S,O){return Zn(c,h,S(Qo(c,h)),O)}function Lu(c,h,S,O){for(var Y=c.length,X=O?Y:-1;(O?X--:++X<Y)&&h(c[X],X,c););return S?to(c,O?0:X,O?X+1:Y):to(c,O?X+1:0,O?Y:X)}function gp(c,h){var S=c;return S instanceof Jt&&(S=S.value()),Dc(h,function(O,Y){return Y.func.apply(Y.thisArg,mi([O],Y.args))},S)}function wf(c,h,S){var O=c.length;if(O<2)return O?Dr(c[0]):[];for(var Y=-1,X=Pe(O);++Y<O;)for(var fe=c[Y],ve=-1;++ve<O;)ve!=Y&&(X[Y]=Da(X[Y]||fe,c[ve],h,S));return Dr(wr(X,1),h,S)}function yp(c,h,S){for(var O=-1,Y=c.length,X=h.length,fe={};++O<Y;){var ve=O<X?h[O]:n;S(fe,c[O],ve)}return fe}function bf(c){return xr(c)?c:[]}function Sf(c){return typeof c=="function"?c:Ci}function es(c,h){return Qt(c)?c:Fp(c,h)?[c]:cy(Nn(c))}var Zg=Kt;function ts(c,h,S){var O=c.length;return S=S===n?O:S,!h&&S>=O?c:to(c,h,S)}var Ru=Fg||function(c){return An.clearTimeout(c)};function vp(c,h){if(h)return c.slice();var S=c.length,O=ep?ep(S):new c.constructor(S);return c.copy(O),O}function _u(c){var h=new c.constructor(c.byteLength);return new Nc(h).set(new Nc(c)),h}function Df(c,h){var S=h?_u(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.byteLength)}function $g(c){var h=new c.constructor(c.source,Hi.exec(c));return h.lastIndex=c.lastIndex,h}function wp(c){return Jo?kn(Jo.call(c)):{}}function bp(c,h){var S=h?_u(c.buffer):c.buffer;return new c.constructor(S,c.byteOffset,c.length)}function Sp(c,h){if(c!==h){var S=c!==n,O=c===null,Y=c===c,X=ea(c),fe=h!==n,ve=h===null,Se=h===h,Ze=ea(h);if(!ve&&!Ze&&!X&&c>h||X&&fe&&Se&&!ve&&!Ze||O&&fe&&Se||!S&&Se||!Y)return 1;if(!O&&!X&&!Ze&&c<h||Ze&&S&&Y&&!O&&!X||ve&&S&&Y||!fe&&Y||!Se)return-1}return 0}function qg(c,h,S){for(var O=-1,Y=c.criteria,X=h.criteria,fe=Y.length,ve=S.length;++O<fe;){var Se=Sp(Y[O],X[O]);if(Se){if(O>=ve)return Se;var Ze=S[O];return Se*(Ze=="desc"?-1:1)}}return c.index-h.index}function Dp(c,h,S,O){for(var Y=-1,X=c.length,fe=S.length,ve=-1,Se=h.length,Ze=cr(X-fe,0),$e=Pe(Se+Ze),Ke=!O;++ve<Se;)$e[ve]=h[ve];for(;++Y<fe;)(Ke||Y<X)&&($e[S[Y]]=c[Y]);for(;Ze--;)$e[ve++]=c[Y++];return $e}function Tf(c,h,S,O){for(var Y=-1,X=c.length,fe=-1,ve=S.length,Se=-1,Ze=h.length,$e=cr(X-ve,0),Ke=Pe($e+Ze),ft=!O;++Y<$e;)Ke[Y]=c[Y];for(var Ct=Y;++Se<Ze;)Ke[Ct+Se]=h[Se];for(;++fe<ve;)(ft||Y<X)&&(Ke[Ct+S[fe]]=c[Y++]);return Ke}function bo(c,h){var S=-1,O=c.length;for(h||(h=Pe(O));++S<O;)h[S]=c[S];return h}function Ki(c,h,S,O){var Y=!S;S||(S={});for(var X=-1,fe=h.length;++X<fe;){var ve=h[X],Se=O?O(S[ve],c[ve],ve,S,c):n;Se===n&&(Se=c[ve]),Y?Sa(S,ve,Se):Ll(S,ve,Se)}return S}function Gg(c,h){return Ki(c,Yu(c),h)}function aw(c,h){return Ki(c,Ea(c),h)}function Zc(c,h){return function(S,O){var Y=Qt(S)?$a:Ko,X=h?h():{};return Y(S,c,At(O,2),X)}}function Bu(c){return Kt(function(h,S){var O=-1,Y=S.length,X=Y>1?S[Y-1]:n,fe=Y>2?S[2]:n;for(X=c.length>3&&typeof X=="function"?(Y--,X):n,fe&&Dn(S[0],S[1],fe)&&(X=Y<3?n:X,Y=1),h=kn(h);++O<Y;){var ve=S[O];ve&&c(h,ve,O,X)}return h})}function Jg(c,h){return function(S,O){if(S==null)return S;if(!xi(S))return c(S,O);for(var Y=S.length,X=h?Y:-1,fe=kn(S);(h?X--:++X<Y)&&O(fe[X],X,fe)!==!1;);return S}}function Tp(c){return function(h,S,O){for(var Y=-1,X=kn(h),fe=O(h),ve=fe.length;ve--;){var Se=fe[c?ve:++Y];if(S(X[Se],Se,X)===!1)break}return h}}function Kg(c,h,S){var O=h&I,Y=$c(c);function X(){var fe=this&&this!==An&&this instanceof X?Y:c;return fe.apply(O?S:this,arguments)}return X}function Ip(c){return function(h){h=Nn(h);var S=wu(h)?Go(h):n,O=S?S[0]:h.charAt(0),Y=S?ts(S,1).join(""):h.slice(1);return O[c]()+Y}}function ns(c){return function(h){return Dc(hD(fD(h).replace(Jh,"")),c,"")}}function $c(c){return function(){var h=arguments;switch(h.length){case 0:return new c;case 1:return new c(h[0]);case 2:return new c(h[0],h[1]);case 3:return new c(h[0],h[1],h[2]);case 4:return new c(h[0],h[1],h[2],h[3]);case 5:return new c(h[0],h[1],h[2],h[3],h[4]);case 6:return new c(h[0],h[1],h[2],h[3],h[4],h[5]);case 7:return new c(h[0],h[1],h[2],h[3],h[4],h[5],h[6])}var S=Mu(c.prototype),O=c.apply(S,h);return ar(O)?O:S}}function sw(c,h,S){var O=$c(c);function Y(){for(var X=arguments.length,fe=Pe(X),ve=X,Se=Ws(Y);ve--;)fe[ve]=arguments[ve];var Ze=X<3&&fe[0]!==Se&&fe[X-1]!==Se?[]:gi(fe,Se);if(X-=Ze.length,X<S)return ey(c,h,Hu,Y.placeholder,n,fe,Ze,n,n,S-X);var $e=this&&this!==An&&this instanceof Y?O:c;return lr($e,this,fe)}return Y}function Qg(c){return function(h,S,O){var Y=kn(h);if(!xi(h)){var X=At(S,3);h=ao(h),S=function(ve){return X(Y[ve],ve,Y)}}var fe=c(h,S,O);return fe>-1?Y[X?h[fe]:fe]:n}}function Yl(c){return xa(function(h){var S=h.length,O=S,Y=Jr.prototype.thru;for(c&&h.reverse();O--;){var X=h[O];if(typeof X!="function")throw new yi(a);if(Y&&!fe&&Qc(X)=="wrapper")var fe=new Jr([],!0)}for(O=fe?O:S;++O<S;){X=h[O];var ve=Qc(X),Se=ve=="wrapper"?Kc(X):n;Se&&Zs(Se[0])&&Se[1]==(Z|R|B|U)&&!Se[4].length&&Se[9]==1?fe=fe[Qc(Se[0])].apply(fe,Se[3]):fe=X.length==1&&Zs(X)?fe[ve]():fe.thru(X)}return function(){var Ze=arguments,$e=Ze[0];if(fe&&Ze.length==1&&Qt($e))return fe.plant($e).value();for(var Ke=0,ft=S?h[Ke].apply(this,Ze):$e;++Ke<S;)ft=h[Ke].call(this,ft);return ft}})}function Hu(c,h,S,O,Y,X,fe,ve,Se,Ze){var $e=h&Z,Ke=h&I,ft=h&k,Ct=h&(R|j),_t=h&z,rn=ft?n:$c(c);function Bt(){for(var sn=arguments.length,hn=Pe(sn),ta=sn;ta--;)hn[ta]=arguments[ta];if(Ct)var ri=Ws(Bt),na=ko(hn,ri);if(O&&(hn=Dp(hn,O,Y,Ct)),X&&(hn=Tf(hn,X,fe,Ct)),sn-=na,Ct&&sn<Ze){var Er=gi(hn,ri);return ey(c,h,Hu,Bt.placeholder,S,hn,Er,ve,Se,Ze-sn)}var ss=Ke?S:this,ql=ft?ss[c]:c;return sn=hn.length,ve?hn=Ur(hn,ve):_t&&sn>1&&hn.reverse(),$e&&Se<sn&&(hn.length=Se),this&&this!==An&&this instanceof Bt&&(ql=rn||$c(ql)),ql.apply(ss,hn)}return Bt}function If(c,h){return function(S,O){return Hs(S,c,h(O),{})}}function xf(c,h){return function(S,O){var Y;if(S===n&&O===n)return h;if(S!==n&&(Y=S),O!==n){if(Y===n)return O;typeof S=="string"||typeof O=="string"?(S=Xn(S),O=Xn(O)):(S=yf(S),O=yf(O)),Y=c(S,O)}return Y}}function Ef(c){return xa(function(h){return h=In(h,St(At())),Kt(function(S){var O=this;return c(h,function(Y){return lr(Y,O,S)})})})}function qc(c,h){h=h===n?" ":Xn(h);var S=h.length;if(S<2)return S?ju(h,c):h;var O=ju(h,Al(c/kl(h)));return wu(h)?ts(Go(O),0,c).join(""):O.slice(0,c)}function Xg(c,h,S,O){var Y=h&I,X=$c(c);function fe(){for(var ve=-1,Se=arguments.length,Ze=-1,$e=O.length,Ke=Pe($e+Se),ft=this&&this!==An&&this instanceof fe?X:c;++Ze<$e;)Ke[Ze]=O[Ze];for(;Se--;)Ke[Ze++]=arguments[++ve];return lr(ft,Y?S:this,Ke)}return fe}function xp(c){return function(h,S,O){return O&&typeof O!="number"&&Dn(h,S,O)&&(S=O=n),h=$l(h),S===n?(S=h,h=0):S=$l(S),O=O===n?h<S?1:-1:$l(O),mp(h,S,O,c)}}function Gc(c){return function(h,S){return typeof h=="string"&&typeof S=="string"||(h=Ca(h),S=Ca(S)),c(h,S)}}function ey(c,h,S,O,Y,X,fe,ve,Se,Ze){var $e=h&R,Ke=$e?fe:n,ft=$e?n:fe,Ct=$e?X:n,_t=$e?n:X;h|=$e?B:L,h&=~($e?L:B),h&A||(h&=~(I|k));var rn=[c,h,Y,Ct,Ke,_t,ft,ve,Se,Ze],Bt=S.apply(n,rn);return Zs(c)&&os(Bt,rn),Bt.placeholder=O,Ti(Bt,c,h)}function no(c){var h=ur[c];return function(S,O){if(S=Ca(S),O=O==null?0:Gr(nn(O),292),O&&Tu(S)){var Y=(Nn(S)+"e").split("e"),X=h(Y[0]+"e"+(+Y[1]+O));return Y=(Nn(X)+"e").split("e"),+(Y[0]+"e"+(+Y[1]-O))}return h(S)}}var So=Ps&&1/As(new Ps([,-0]))[1]==de?function(c){return new Ps(c)}:Pw;function Ep(c){return function(h){var S=ro(h);return S==at?Yd(h):S==Gt?X0(h):We(h,c(h))}}function Ia(c,h,S,O,Y,X,fe,ve){var Se=h&k;if(!Se&&typeof c!="function")throw new yi(a);var Ze=O?O.length:0;if(Ze||(h&=~(B|L),O=Y=n),fe=fe===n?fe:cr(nn(fe),0),ve=ve===n?ve:nn(ve),Ze-=Y?Y.length:0,h&L){var $e=O,Ke=Y;O=Y=n}var ft=Se?n:Kc(c),Ct=[c,h,S,O,Y,$e,Ke,X,fe,ve];if(ft&&sy(Ct,ft),c=Ct[0],h=Ct[1],S=Ct[2],O=Ct[3],Y=Ct[4],ve=Ct[9]=Ct[9]===n?Se?0:c.length:cr(Ct[9]-Ze,0),!ve&&h&(R|j)&&(h&=~(R|j)),!h||h==I)var _t=Kg(c,h,S);else h==R||h==j?_t=sw(c,h,ve):(h==B||h==(I|B))&&!Y.length?_t=Xg(c,h,S,O):_t=Hu.apply(n,Ct);var rn=ft?br:os;return Ti(rn(_t,Ct),c,h)}function Cp(c,h,S,O){return c===n||as(c,ga[S])&&!mn.call(O,S)?h:c}function Mp(c,h,S,O,Y,X){return ar(c)&&ar(h)&&(X.set(h,c),zs(c,h,n,Mp,X),X.delete(h)),c}function ty(c){return em(c)?n:c}function Cf(c,h,S,O,Y,X){var fe=S&D,ve=c.length,Se=h.length;if(ve!=Se&&!(fe&&Se>ve))return!1;var Ze=X.get(c),$e=X.get(h);if(Ze&&$e)return Ze==h&&$e==c;var Ke=-1,ft=!0,Ct=S&T?new Pl:n;for(X.set(c,h),X.set(h,c);++Ke<ve;){var _t=c[Ke],rn=h[Ke];if(O)var Bt=fe?O(rn,_t,Ke,h,c,X):O(_t,rn,Ke,c,h,X);if(Bt!==n){if(Bt)continue;ft=!1;break}if(Ct){if(!Ns(h,function(sn,hn){if(!jt(Ct,hn)&&(_t===sn||Y(_t,sn,S,O,X)))return Ct.push(hn)})){ft=!1;break}}else if(!(_t===rn||Y(_t,rn,S,O,X))){ft=!1;break}}return X.delete(c),X.delete(h),ft}function ny(c,h,S,O,Y,X,fe){switch(S){case Rn:if(c.byteLength!=h.byteLength||c.byteOffset!=h.byteOffset)return!1;c=c.buffer,h=h.buffer;case yr:return!(c.byteLength!=h.byteLength||!X(new Nc(c),new Nc(h)));case ze:case Qe:case gt:return as(+c,+h);case Zt:return c.name==h.name&&c.message==h.message;case $t:case cn:return c==h+"";case at:var ve=Yd;case Gt:var Se=O&D;if(ve||(ve=As),c.size!=h.size&&!Se)return!1;var Ze=fe.get(c);if(Ze)return Ze==h;O|=T,fe.set(c,h);var $e=Cf(ve(c),ve(h),O,Y,X,fe);return fe.delete(c),$e;case Xt:if(Jo)return Jo.call(c)==Jo.call(h)}return!1}function kp(c,h,S,O,Y,X){var fe=S&D,ve=Mf(c),Se=ve.length,Ze=Mf(h),$e=Ze.length;if(Se!=$e&&!fe)return!1;for(var Ke=Se;Ke--;){var ft=ve[Ke];if(!(fe?ft in h:mn.call(h,ft)))return!1}var Ct=X.get(c),_t=X.get(h);if(Ct&&_t)return Ct==h&&_t==c;var rn=!0;X.set(c,h),X.set(h,c);for(var Bt=fe;++Ke<Se;){ft=ve[Ke];var sn=c[ft],hn=h[ft];if(O)var ta=fe?O(hn,sn,ft,h,c,X):O(sn,hn,ft,c,h,X);if(!(ta===n?sn===hn||Y(sn,hn,S,O,X):ta)){rn=!1;break}Bt||(Bt=ft=="constructor")}if(rn&&!Bt){var ri=c.constructor,na=h.constructor;ri!=na&&"constructor"in c&&"constructor"in h&&!(typeof ri=="function"&&ri instanceof ri&&typeof na=="function"&&na instanceof na)&&(rn=!1)}return X.delete(c),X.delete(h),rn}function xa(c){return Pf(Af(c,n,td),c+"")}function Mf(c){return uf(c,ao,Yu)}function Jc(c){return uf(c,Ei,Ea)}var Kc=Qd?function(c){return Qd.get(c)}:Pw;function Qc(c){for(var h=c.name+"",S=Eu[h],O=mn.call(Eu,h)?S.length:0;O--;){var Y=S[O],X=Y.func;if(X==null||X==c)return Y.name}return h}function Ws(c){var h=mn.call(G,"placeholder")?G:c;return h.placeholder}function At(){var c=G.iteratee||Aw;return c=c===Aw?Hc:c,arguments.length?c(arguments[0],arguments[1]):c}function kf(c,h){var S=c.__data__;return vt(h)?S[typeof h=="string"?"string":"hash"]:S.map}function Nf(c){for(var h=ao(c),S=h.length;S--;){var O=h[S],Y=c[O];h[S]=[O,Y,zu(Y)]}return h}function rs(c,h){var S=ma(c,h);return cp(S)?S:n}function ry(c){var h=mn.call(c,Nl),S=c[Nl];try{c[Nl]=n;var O=!0}catch{}var Y=Mc.call(c);return O&&(h?c[Nl]=S:delete c[Nl]),Y}var Yu=Gd?function(c){return c==null?[]:(c=kn(c),Vi(Gd(c),function(h){return $d.call(c,h)}))}:Ow,Ea=Gd?function(c){for(var h=[];c;)mi(h,Yu(c)),c=Wi(c);return h}:Ow,ro=eo;(Pc&&ro(new Pc(new ArrayBuffer(1)))!=Rn||Fl&&ro(new Fl)!=at||Oc&&ro(Oc.resolve())!=qt||Ps&&ro(new Ps)!=Gt||jc&&ro(new jc)!=En)&&(ro=function(c){var h=eo(c),S=h==Tt?c.constructor:n,O=S?$s(S):"";if(O)switch(O){case rp:return Rn;case Os:return at;case Og:return qt;case Cu:return Gt;case ya:return En}return h});function oy(c,h,S){for(var O=-1,Y=S.length;++O<Y;){var X=S[O],fe=X.size;switch(X.type){case"drop":c+=fe;break;case"dropRight":h-=fe;break;case"take":h=Gr(h,c+fe);break;case"takeRight":c=cr(c,h-fe);break}}return{start:c,end:h}}function Np(c){var h=c.match(fo);return h?h[1].split(Mr):[]}function Ap(c,h,S){h=es(h,c);for(var O=-1,Y=h.length,X=!1;++O<Y;){var fe=Qi(h[O]);if(!(X=c!=null&&S(c,fe)))break;c=c[fe]}return X||++O!=Y?X:(Y=c==null?0:c.length,!!Y&&xy(Y)&&Di(fe,Y)&&(Qt(c)||ad(c)))}function iy(c){var h=c.length,S=new c.constructor(h);return h&&typeof c[0]=="string"&&mn.call(c,"index")&&(S.index=c.index,S.input=c.input),S}function Uu(c){return typeof c.constructor=="function"&&!Xc(c)?Mu(Wi(c)):{}}function oo(c,h,S){var O=c.constructor;switch(h){case yr:return _u(c);case ze:case Qe:return new O(+c);case Rn:return Df(c,S);case ji:case xo:case Uo:case Li:case Eo:case Ri:case ua:case ui:case _i:return bp(c,S);case at:return new O;case gt:case cn:return new O(c);case $t:return $g(c);case Gt:return new O;case Xt:return wp(c)}}function lw(c,h){var S=h.length;if(!S)return c;var O=S-1;return h[O]=(S>1?"& ":"")+h[O],h=h.join(S>2?", ":" "),c.replace(co,`{
|
|
|
/* [wrapped with `+h+`] */
|
|
|
`)}function uw(c){return Qt(c)||ad(c)||!!(Ag&&c&&c[Ag])}function Di(c,h){var S=typeof c;return h=h??oe,!!h&&(S=="number"||S!="symbol"&&Ha.test(c))&&c>-1&&c%1==0&&c<h}function Dn(c,h,S){if(!ar(S))return!1;var O=typeof h;return(O=="number"?xi(S)&&Di(h,S.length):O=="string"&&h in S)?as(S[h],c):!1}function Fp(c,h){if(Qt(c))return!1;var S=typeof c;return S=="number"||S=="symbol"||S=="boolean"||c==null||ea(c)?!0:Lr.test(c)||!wn.test(c)||h!=null&&c in kn(h)}function vt(c){var h=typeof c;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?c!=="__proto__":c===null}function Zs(c){var h=Qc(c),S=G[h];if(typeof S!="function"||!(h in Jt.prototype))return!1;if(c===S)return!0;var O=Kc(S);return!!O&&c===O[0]}function Pp(c){return!!Vd&&Vd in c}var ay=Su?Zl:jw;function Xc(c){var h=c&&c.constructor,S=typeof h=="function"&&h.prototype||ga;return c===S}function zu(c){return c===c&&!ar(c)}function ed(c,h){return function(S){return S==null?!1:S[c]===h&&(h!==n||c in kn(S))}}function Op(c){var h=we(c,function(O){return S.size===f&&S.clear(),O}),S=h.cache;return h}function sy(c,h){var S=c[1],O=h[1],Y=S|O,X=Y<(I|k|Z),fe=O==Z&&S==R||O==Z&&S==U&&c[7].length<=h[8]||O==(Z|U)&&h[7].length<=h[8]&&S==R;if(!(X||fe))return c;O&I&&(c[2]=h[2],Y|=S&I?0:A);var ve=h[3];if(ve){var Se=c[3];c[3]=Se?Dp(Se,ve,h[4]):ve,c[4]=Se?gi(c[3],m):h[4]}return ve=h[5],ve&&(Se=c[5],c[5]=Se?Tf(Se,ve,h[6]):ve,c[6]=Se?gi(c[5],m):h[6]),ve=h[7],ve&&(c[7]=ve),O&Z&&(c[8]=c[8]==null?h[8]:Gr(c[8],h[8])),c[9]==null&&(c[9]=h[9]),c[0]=h[0],c[1]=Y,c}function ly(c){var h=[];if(c!=null)for(var S in kn(c))h.push(S);return h}function uy(c){return Mc.call(c)}function Af(c,h,S){return h=cr(h===n?c.length-1:h,0),function(){for(var O=arguments,Y=-1,X=cr(O.length-h,0),fe=Pe(X);++Y<X;)fe[Y]=O[h+Y];Y=-1;for(var ve=Pe(h+1);++Y<h;)ve[Y]=O[Y];return ve[h]=S(fe),lr(c,this,ve)}}function Ff(c,h){return h.length<2?c:Qo(c,to(h,0,-1))}function Ur(c,h){for(var S=c.length,O=Gr(h.length,S),Y=bo(c);O--;){var X=h[O];c[O]=Di(X,S)?Y[X]:n}return c}function Xo(c,h){if(!(h==="constructor"&&typeof c[h]=="function")&&h!="__proto__")return c[h]}var os=jp(br),Vu=tp||function(c,h){return An.setTimeout(c,h)},Pf=jp(mf);function Ti(c,h,S){var O=h+"";return Pf(c,lw(O,dy(Np(O),S)))}function jp(c){var h=0,S=0;return function(){var O=ow(),Y=ue-(O-S);if(S=O,Y>0){if(++h>=Q)return arguments[0]}else h=0;return c.apply(n,arguments)}}function ei(c,h){var S=-1,O=c.length,Y=O-1;for(h=h===n?O:h;++S<h;){var X=zc(S,Y),fe=c[X];c[X]=c[S],c[S]=fe}return c.length=h,c}var cy=Op(function(c){var h=[];return c.charCodeAt(0)===46&&h.push(""),c.replace(_n,function(S,O,Y,X){h.push(Y?X.replace(bl,"$1"):O||S)}),h});function Qi(c){if(typeof c=="string"||ea(c))return c;var h=c+"";return h=="0"&&1/c==-de?"-0":h}function $s(c){if(c!=null){try{return Cc.call(c)}catch{}try{return c+""}catch{}}return""}function dy(c,h){return or(Oe,function(S){var O="_."+S[0];h&S[1]&&!ks(c,O)&&c.push(O)}),c.sort()}function Lp(c){if(c instanceof Jt)return c.clone();var h=new Jr(c.__wrapped__,c.__chain__);return h.__actions__=bo(c.__actions__),h.__index__=c.__index__,h.__values__=c.__values__,h}function cw(c,h,S){(S?Dn(c,h,S):h===n)?h=1:h=cr(nn(h),0);var O=c==null?0:c.length;if(!O||h<1)return[];for(var Y=0,X=0,fe=Pe(Al(O/h));Y<O;)fe[X++]=to(c,Y,Y+=h);return fe}function Of(c){for(var h=-1,S=c==null?0:c.length,O=0,Y=[];++h<S;){var X=c[h];X&&(Y[O++]=X)}return Y}function Rp(){var c=arguments.length;if(!c)return[];for(var h=Pe(c-1),S=arguments[0],O=c;O--;)h[O-1]=arguments[O];return mi(Qt(S)?bo(S):[S],wr(h,1))}var Ii=Kt(function(c,h){return xr(c)?Da(c,wr(h,1,xr,!0)):[]}),fn=Kt(function(c,h){var S=Ir(h);return xr(S)&&(S=n),xr(c)?Da(c,wr(h,1,xr,!0),At(S,2)):[]}),Ar=Kt(function(c,h){var S=Ir(h);return xr(S)&&(S=n),xr(c)?Da(c,wr(h,1,xr,!0),n,S):[]});function dr(c,h,S){var O=c==null?0:c.length;return O?(h=S||h===n?1:nn(h),to(c,h<0?0:h,O)):[]}function zr(c,h,S){var O=c==null?0:c.length;return O?(h=S||h===n?1:nn(h),h=O-h,to(c,0,h<0?0:h)):[]}function ti(c,h){return c&&c.length?Lu(c,At(h,3),!0,!0):[]}function Wu(c,h){return c&&c.length?Lu(c,At(h,3),!0):[]}function Tr(c,h,S,O){var Y=c==null?0:c.length;return Y?(S&&typeof S!="number"&&Dn(c,h,S)&&(S=0,O=Y),sf(c,h,S,O)):[]}function Zu(c,h,S){var O=c==null?0:c.length;if(!O)return-1;var Y=S==null?0:nn(S);return Y<0&&(Y=cr(O+Y,0)),Cl(c,At(h,3),Y)}function qs(c,h,S){var O=c==null?0:c.length;if(!O)return-1;var Y=O-1;return S!==n&&(Y=nn(S),Y=S<0?cr(O+Y,0):Gr(Y,O-1)),Cl(c,At(h,3),Y,!0)}function td(c){var h=c==null?0:c.length;return h?wr(c,1):[]}function _p(c){var h=c==null?0:c.length;return h?wr(c,de):[]}function nd(c,h){var S=c==null?0:c.length;return S?(h=h===n?1:nn(h),wr(c,h)):[]}function jo(c){for(var h=-1,S=c==null?0:c.length,O={};++h<S;){var Y=c[h];O[Y[0]]=Y[1]}return O}function jf(c){return c&&c.length?c[0]:n}function $u(c,h,S){var O=c==null?0:c.length;if(!O)return-1;var Y=S==null?0:nn(S);return Y<0&&(Y=cr(O+Y,0)),qa(c,h,Y)}function is(c){var h=c==null?0:c.length;return h?to(c,0,-1):[]}var Lf=Kt(function(c){var h=In(c,bf);return h.length&&h[0]===c[0]?Gi(h):[]}),Bp=Kt(function(c){var h=Ir(c),S=In(c,bf);return h===Ir(S)?h=n:S.pop(),S.length&&S[0]===c[0]?Gi(S,At(h,2)):[]}),Gs=Kt(function(c){var h=Ir(c),S=In(c,bf);return h=typeof h=="function"?h:n,h&&S.pop(),S.length&&S[0]===c[0]?Gi(S,n,h):[]});function Rf(c,h){return c==null?"":Jd.call(c,h)}function Ir(c){var h=c==null?0:c.length;return h?c[h-1]:n}function _f(c,h,S){var O=c==null?0:c.length;if(!O)return-1;var Y=O;return S!==n&&(Y=nn(S),Y=Y<0?cr(O+Y,0):Gr(Y,O-1)),h===h?ew(c,h,Y):Cl(c,vu,Y,!0)}function rd(c,h){return c&&c.length?Vs(c,nn(h)):n}var Hp=Kt(od);function od(c,h){return c&&c.length&&h&&h.length?Un(c,h):c}function Bf(c,h,S){return c&&c.length&&h&&h.length?Un(c,h,At(S,2)):c}function Do(c,h,S){return c&&c.length&&h&&h.length?Un(c,h,n,S):c}var Js=xa(function(c,h){var S=c==null?0:c.length,O=af(c,h);return Uc(c,In(h,function(Y){return Di(Y,S)?+Y:Y}).sort(Sp)),O});function Xi(c,h){var S=[];if(!(c&&c.length))return S;var O=-1,Y=[],X=c.length;for(h=At(h,3);++O<X;){var fe=c[O];h(fe,O,c)&&(S.push(fe),Y.push(O))}return Uc(c,Y),S}function io(c){return c==null?c:Kd.call(c)}function fy(c,h,S){var O=c==null?0:c.length;return O?(S&&typeof S!="number"&&Dn(c,h,S)?(h=0,S=O):(h=h==null?0:nn(h),S=S===n?O:nn(S)),to(c,h,S)):[]}function Yp(c,h){return Sr(c,h)}function Up(c,h,S){return Wc(c,h,At(S,2))}function dw(c,h){var S=c==null?0:c.length;if(S){var O=Sr(c,h);if(O<S&&as(c[O],h))return O}return-1}function Ks(c,h){return Sr(c,h,!0)}function hy(c,h,S){return Wc(c,h,At(S,2),!0)}function zp(c,h){var S=c==null?0:c.length;if(S){var O=Sr(c,h,!0)-1;if(as(c[O],h))return O}return-1}function Ul(c){return c&&c.length?gf(c):[]}function Vp(c,h){return c&&c.length?gf(c,At(h,2)):[]}function zl(c){var h=c==null?0:c.length;return h?to(c,1,h):[]}function py(c,h,S){return c&&c.length?(h=S||h===n?1:nn(h),to(c,0,h<0?0:h)):[]}function my(c,h,S){var O=c==null?0:c.length;return O?(h=S||h===n?1:nn(h),h=O-h,to(c,h<0?0:h,O)):[]}function Wp(c,h){return c&&c.length?Lu(c,At(h,3),!1,!0):[]}function Hf(c,h){return c&&c.length?Lu(c,At(h,3)):[]}var fw=Kt(function(c){return Dr(wr(c,1,xr,!0))}),hw=Kt(function(c){var h=Ir(c);return xr(h)&&(h=n),Dr(wr(c,1,xr,!0),At(h,2))}),gy=Kt(function(c){var h=Ir(c);return h=typeof h=="function"?h:n,Dr(wr(c,1,xr,!0),n,h)});function yy(c){return c&&c.length?Dr(c):[]}function Vl(c,h){return c&&c.length?Dr(c,At(h,2)):[]}function pw(c,h){return h=typeof h=="function"?h:n,c&&c.length?Dr(c,n,h):[]}function Qs(c){if(!(c&&c.length))return[];var h=0;return c=Vi(c,function(S){if(xr(S))return h=cr(S.length,h),!0}),xe(h,function(S){return In(c,N(S))})}function Zp(c,h){if(!(c&&c.length))return[];var S=Qs(c);return h==null?S:In(S,function(O){return lr(h,n,O)})}var er=Kt(function(c,h){return xr(c)?Da(c,h):[]}),mw=Kt(function(c){return wf(Vi(c,xr))}),vy=Kt(function(c){var h=Ir(c);return xr(h)&&(h=n),wf(Vi(c,xr),At(h,2))}),gw=Kt(function(c){var h=Ir(c);return h=typeof h=="function"?h:n,wf(Vi(c,xr),n,h)}),yw=Kt(Qs);function wy(c,h){return yp(c||[],h||[],Ll)}function by(c,h){return yp(c||[],h||[],Zn)}var vw=Kt(function(c){var h=c.length,S=h>1?c[h-1]:n;return S=typeof S=="function"?(c.pop(),S):n,Zp(c,S)});function ni(c){var h=G(c);return h.__chain__=!0,h}function $p(c,h){return h(c),c}function Yf(c,h){return h(c)}var Xs=xa(function(c){var h=c.length,S=h?c[0]:0,O=this.__wrapped__,Y=function(X){return af(X,c)};return h>1||this.__actions__.length||!(O instanceof Jt)||!Di(S)?this.thru(Y):(O=O.slice(S,+S+(h?1:0)),O.__actions__.push({func:Yf,args:[Y],thisArg:n}),new Jr(O,this.__chain__).thru(function(X){return h&&!X.length&&X.push(n),X}))});function Uf(){return ni(this)}function Wl(){return new Jr(this.value(),this.__chain__)}function zf(){this.__values__===n&&(this.__values__=rD(this.value()));var c=this.__index__>=this.__values__.length,h=c?n:this.__values__[this.__index__++];return{done:c,value:h}}function qp(){return this}function Gp(c){for(var h,S=this;S instanceof va;){var O=Lp(S);O.__index__=0,O.__values__=n,h?Y.__wrapped__=O:h=O;var Y=O;S=S.__wrapped__}return Y.__wrapped__=c,h}function ww(){var c=this.__wrapped__;if(c instanceof Jt){var h=c;return this.__actions__.length&&(h=new Jt(this)),h=h.reverse(),h.__actions__.push({func:Yf,args:[io],thisArg:n}),new Jr(h,this.__chain__)}return this.thru(io)}function Jp(){return gp(this.__wrapped__,this.__actions__)}var bw=Zc(function(c,h,S){mn.call(c,S)?++c[S]:Sa(c,S,1)});function Sy(c,h,S){var O=Qt(c)?mu:$i;return S&&Dn(c,h,S)&&(h=n),O(c,At(h,3))}function Dy(c,h){var S=Qt(c)?Vi:_l;return S(c,At(h,3))}var Vf=Qg(Zu),Wf=Qg(qs);function Ty(c,h){return wr(Gf(c,h),1)}function Kp(c,h){return wr(Gf(c,h),de)}function Sw(c,h,S){return S=S===n?1:nn(S),wr(Gf(c,h),S)}function Qp(c,h){var S=Qt(c)?or:Ta;return S(c,At(h,3))}function Zf(c,h){var S=Qt(c)?xl:Yg;return S(c,At(h,3))}var $f=Zc(function(c,h,S){mn.call(c,S)?c[S].push(h):Sa(c,S,[h])});function Xp(c,h,S,O){c=xi(c)?c:Xf(c),S=S&&!O?nn(S):0;var Y=c.length;return S<0&&(S=cr(Y+S,0)),Ey(c)?S<=Y&&c.indexOf(h,S)>-1:!!Y&&qa(c,h,S)>-1}var qf=Kt(function(c,h,S){var O=-1,Y=typeof h=="function",X=xi(c)?Pe(c.length):[];return Ta(c,function(fe){X[++O]=Y?lr(h,fe,S):Ys(fe,h,S)}),X}),Iy=Zc(function(c,h,S){Sa(c,S,h)});function Gf(c,h){var S=Qt(c)?In:fp;return S(c,At(h,3))}function Jf(c,h,S,O){return c==null?[]:(Qt(h)||(h=h==null?[]:[h]),S=O?n:S,Qt(S)||(S=S==null?[]:[S]),pf(c,h,S))}var Dw=Zc(function(c,h,S){c[S?0:1].push(h)},function(){return[[],[]]});function id(c,h,S){var O=Qt(c)?Dc:q,Y=arguments.length<3;return O(c,At(h,4),S,Y,Ta)}function Tw(c,h,S){var O=Qt(c)?Bd:q,Y=arguments.length<3;return O(c,At(h,4),S,Y,Yg)}function Kf(c,h){var S=Qt(c)?Vi:_l;return S(c,Ce(At(h,3)))}function s(c){var h=Qt(c)?ba:Bl;return h(c)}function l(c,h,S){(S?Dn(c,h,S):h===n)?h=1:h=nn(h);var O=Qt(c)?jl:Wn;return O(c,h)}function p(c){var h=Qt(c)?Bg:Vc;return h(c)}function b(c){if(c==null)return 0;if(xi(c))return Ey(c)?kl(c):c.length;var h=ro(c);return h==at||h==Gt?c.size:hf(c).length}function x(c,h,S){var O=Qt(c)?Ns:iw;return S&&Dn(c,h,S)&&(h=n),O(c,At(h,3))}var P=Kt(function(c,h){if(c==null)return[];var S=h.length;return S>1&&Dn(c,h[0],h[1])?h=[]:S>2&&Dn(h[0],h[1],h[2])&&(h=[h[0]]),pf(c,wr(h,1),[])}),V=Bn||function(){return An.Date.now()};function ce(c,h){if(typeof h!="function")throw new yi(a);return c=nn(c),function(){if(--c<1)return h.apply(this,arguments)}}function ye(c,h,S){return h=S?n:h,h=c&&h==null?c.length:h,Ia(c,Z,n,n,n,n,h)}function Le(c,h){var S;if(typeof h!="function")throw new yi(a);return c=nn(c),function(){return--c>0&&(S=h.apply(this,arguments)),c<=1&&(h=n),S}}var Ge=Kt(function(c,h,S){var O=I;if(S.length){var Y=gi(S,Ws(Ge));O|=B}return Ia(c,O,h,S,Y)}),Xe=Kt(function(c,h,S){var O=I|k;if(S.length){var Y=gi(S,Ws(Xe));O|=B}return Ia(h,O,c,S,Y)});function qe(c,h,S){h=S?n:h;var O=Ia(c,R,n,n,n,n,n,h);return O.placeholder=qe.placeholder,O}function mt(c,h,S){h=S?n:h;var O=Ia(c,j,n,n,n,n,n,h);return O.placeholder=mt.placeholder,O}function bt(c,h,S){var O,Y,X,fe,ve,Se,Ze=0,$e=!1,Ke=!1,ft=!0;if(typeof c!="function")throw new yi(a);h=Ca(h)||0,ar(S)&&($e=!!S.leading,Ke="maxWait"in S,X=Ke?cr(Ca(S.maxWait)||0,h):X,ft="trailing"in S?!!S.trailing:ft);function Ct(Er){var ss=O,ql=Y;return O=Y=n,Ze=Er,fe=c.apply(ql,ss),fe}function _t(Er){return Ze=Er,ve=Vu(sn,h),$e?Ct(Er):fe}function rn(Er){var ss=Er-Se,ql=Er-Ze,gD=h-ss;return Ke?Gr(gD,X-ql):gD}function Bt(Er){var ss=Er-Se,ql=Er-Ze;return Se===n||ss>=h||ss<0||Ke&&ql>=X}function sn(){var Er=V();if(Bt(Er))return hn(Er);ve=Vu(sn,rn(Er))}function hn(Er){return ve=n,ft&&O?Ct(Er):(O=Y=n,fe)}function ta(){ve!==n&&Ru(ve),Ze=0,O=Se=Y=ve=n}function ri(){return ve===n?fe:hn(V())}function na(){var Er=V(),ss=Bt(Er);if(O=arguments,Y=this,Se=Er,ss){if(ve===n)return _t(Se);if(Ke)return Ru(ve),ve=Vu(sn,h),Ct(Se)}return ve===n&&(ve=Vu(sn,h)),fe}return na.cancel=ta,na.flush=ri,na}var Dt=Kt(function(c,h){return ap(c,1,h)}),ir=Kt(function(c,h,S){return ap(c,Ca(h)||0,S)});function Ee(c){return Ia(c,z)}function we(c,h){if(typeof c!="function"||h!=null&&typeof h!="function")throw new yi(a);var S=function(){var O=arguments,Y=h?h.apply(this,O):O[0],X=S.cache;if(X.has(Y))return X.get(Y);var fe=c.apply(this,O);return S.cache=X.set(Y,fe)||X,fe};return S.cache=new(we.Cache||vi),S}we.Cache=vi;function Ce(c){if(typeof c!="function")throw new yi(a);return function(){var h=arguments;switch(h.length){case 0:return!c.call(this);case 1:return!c.call(this,h[0]);case 2:return!c.call(this,h[0],h[1]);case 3:return!c.call(this,h[0],h[1],h[2])}return!c.apply(this,h)}}function it(c){return Le(2,c)}var xt=Zg(function(c,h){h=h.length==1&&Qt(h[0])?In(h[0],St(At())):In(wr(h,1),St(At()));var S=h.length;return Kt(function(O){for(var Y=-1,X=Gr(O.length,S);++Y<X;)O[Y]=h[Y].call(this,O[Y]);return lr(c,this,O)})}),Ft=Kt(function(c,h){var S=gi(h,Ws(Ft));return Ia(c,B,n,h,S)}),Pt=Kt(function(c,h){var S=gi(h,Ws(Pt));return Ia(c,L,n,h,S)}),Ht=xa(function(c,h){return Ia(c,U,n,n,n,h)});function Fr(c,h){if(typeof c!="function")throw new yi(a);return h=h===n?h:nn(h),Kt(c,h)}function gn(c,h){if(typeof c!="function")throw new yi(a);return h=h==null?0:cr(nn(h),0),Kt(function(S){var O=S[h],Y=ts(S,0,h);return O&&mi(Y,O),lr(c,this,Y)})}function el(c,h,S){var O=!0,Y=!0;if(typeof c!="function")throw new yi(a);return ar(S)&&(O="leading"in S?!!S.leading:O,Y="trailing"in S?!!S.trailing:Y),bt(c,h,{leading:O,maxWait:h,trailing:Y})}function Iw(c){return ye(c,1)}function wk(c,h){return Ft(Sf(h),c)}function bk(){if(!arguments.length)return[];var c=arguments[0];return Qt(c)?c:[c]}function Sk(c){return Oo(c,w)}function Dk(c,h){return h=typeof h=="function"?h:n,Oo(c,w,h)}function Tk(c){return Oo(c,g|w)}function Ik(c,h){return h=typeof h=="function"?h:n,Oo(c,g|w,h)}function xk(c,h){return h==null||Rc(c,h,ao(h))}function as(c,h){return c===h||c!==c&&h!==h}var Ek=Gc(qi),Ck=Gc(function(c,h){return c>=h}),ad=lp(function(){return arguments}())?lp:function(c){return fr(c)&&mn.call(c,"callee")&&!$d.call(c,"callee")},Qt=Pe.isArray,Mk=Cs?St(Cs):cf;function xi(c){return c!=null&&xy(c.length)&&!Zl(c)}function xr(c){return fr(c)&&xi(c)}function kk(c){return c===!0||c===!1||fr(c)&&eo(c)==ze}var qu=np||jw,Nk=Nr?St(Nr):zg;function Ak(c){return fr(c)&&c.nodeType===1&&!em(c)}function Fk(c){if(c==null)return!0;if(xi(c)&&(Qt(c)||typeof c=="string"||typeof c.splice=="function"||qu(c)||Qf(c)||ad(c)))return!c.length;var h=ro(c);if(h==at||h==Gt)return!c.size;if(Xc(c))return!hf(c).length;for(var S in c)if(mn.call(c,S))return!1;return!0}function Pk(c,h){return Fu(c,h)}function Ok(c,h,S){S=typeof S=="function"?S:n;var O=S?S(c,h):n;return O===n?Fu(c,h,n,S):!!O}function xw(c){if(!fr(c))return!1;var h=eo(c);return h==Zt||h==It||typeof c.message=="string"&&typeof c.name=="string"&&!em(c)}function jk(c){return typeof c=="number"&&Tu(c)}function Zl(c){if(!ar(c))return!1;var h=eo(c);return h==Re||h==tt||h==Je||h==zt}function XS(c){return typeof c=="number"&&c==nn(c)}function xy(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=oe}function ar(c){var h=typeof c;return c!=null&&(h=="object"||h=="function")}function fr(c){return c!=null&&typeof c=="object"}var eD=Za?St(Za):df;function Lk(c,h){return c===h||ff(c,h,Nf(h))}function Rk(c,h,S){return S=typeof S=="function"?S:n,ff(c,h,Nf(h),S)}function _k(c){return tD(c)&&c!=+c}function Bk(c){if(ay(c))throw new Wt(i);return cp(c)}function Hk(c){return c===null}function Yk(c){return c==null}function tD(c){return typeof c=="number"||fr(c)&&eo(c)==gt}function em(c){if(!fr(c)||eo(c)!=Tt)return!1;var h=Wi(c);if(h===null)return!0;var S=mn.call(h,"constructor")&&h.constructor;return typeof S=="function"&&S instanceof S&&Cc.call(S)==Wd}var Ew=pa?St(pa):Vg;function Uk(c){return XS(c)&&c>=-oe&&c<=oe}var nD=Ms?St(Ms):dp;function Ey(c){return typeof c=="string"||!Qt(c)&&fr(c)&&eo(c)==cn}function ea(c){return typeof c=="symbol"||fr(c)&&eo(c)==Xt}var Qf=pu?St(pu):Bc;function zk(c){return c===n}function Vk(c){return fr(c)&&ro(c)==En}function Wk(c){return fr(c)&&eo(c)==Cr}var Zk=Gc(Us),$k=Gc(function(c,h){return c<=h});function rD(c){if(!c)return[];if(xi(c))return Ey(c)?Go(c):bo(c);if(Ka&&c[Ka])return Q0(c[Ka]());var h=ro(c),S=h==at?Yd:h==Gt?As:Xf;return S(c)}function $l(c){if(!c)return c===0?c:0;if(c=Ca(c),c===de||c===-de){var h=c<0?-1:1;return h*he}return c===c?c:0}function nn(c){var h=$l(c),S=h%1;return h===h?S?h-S:h:0}function oD(c){return c?Xa(nn(c),0,re):0}function Ca(c){if(typeof c=="number")return c;if(ea(c))return K;if(ar(c)){var h=typeof c.valueOf=="function"?c.valueOf():c;c=ar(h)?h+"":h}if(typeof c!="string")return c===0?c:+c;c=rt(c);var S=Sl.test(c);return S||da.test(c)?Is(c.slice(2),S?2:8):cu.test(c)?K:+c}function iD(c){return Ki(c,Ei(c))}function qk(c){return c?Xa(nn(c),-oe,oe):c===0?c:0}function Nn(c){return c==null?"":Xn(c)}var Gk=Bu(function(c,h){if(Xc(h)||xi(h)){Ki(h,ao(h),c);return}for(var S in h)mn.call(h,S)&&Ll(c,S,h[S])}),aD=Bu(function(c,h){Ki(h,Ei(h),c)}),Cy=Bu(function(c,h,S,O){Ki(h,Ei(h),c,O)}),Jk=Bu(function(c,h,S,O){Ki(h,ao(h),c,O)}),Kk=xa(af);function Qk(c,h){var S=Mu(c);return h==null?S:Yn(S,h)}var Xk=Kt(function(c,h){c=kn(c);var S=-1,O=h.length,Y=O>2?h[2]:n;for(Y&&Dn(h[0],h[1],Y)&&(O=1);++S<O;)for(var X=h[S],fe=Ei(X),ve=-1,Se=fe.length;++ve<Se;){var Ze=fe[ve],$e=c[Ze];($e===n||as($e,ga[Ze])&&!mn.call(c,Ze))&&(c[Ze]=X[Ze])}return c}),e4=Kt(function(c){return c.push(n,Mp),lr(sD,n,c)});function t4(c,h){return El(c,At(h,3),Si)}function n4(c,h){return El(c,At(h,3),_s)}function r4(c,h){return c==null?c:_c(c,At(h,3),Ei)}function o4(c,h){return c==null?c:lf(c,At(h,3),Ei)}function i4(c,h){return c&&Si(c,At(h,3))}function a4(c,h){return c&&_s(c,At(h,3))}function s4(c){return c==null?[]:wo(c,ao(c))}function l4(c){return c==null?[]:wo(c,Ei(c))}function Cw(c,h,S){var O=c==null?n:Qo(c,h);return O===n?S:O}function u4(c,h){return c!=null&&Ap(c,h,Bs)}function Mw(c,h){return c!=null&&Ap(c,h,sp)}var c4=If(function(c,h,S){h!=null&&typeof h.toString!="function"&&(h=Mc.call(h)),c[h]=S},Nw(Ci)),d4=If(function(c,h,S){h!=null&&typeof h.toString!="function"&&(h=Mc.call(h)),mn.call(c,h)?c[h].push(S):c[h]=[S]},At),f4=Kt(Ys);function ao(c){return xi(c)?wa(c):hf(c)}function Ei(c){return xi(c)?wa(c,!0):Wg(c)}function h4(c,h){var S={};return h=At(h,3),Si(c,function(O,Y,X){Sa(S,h(O,Y,X),O)}),S}function p4(c,h){var S={};return h=At(h,3),Si(c,function(O,Y,X){Sa(S,Y,h(O,Y,X))}),S}var m4=Bu(function(c,h,S){zs(c,h,S)}),sD=Bu(function(c,h,S,O){zs(c,h,S,O)}),g4=xa(function(c,h){var S={};if(c==null)return S;var O=!1;h=In(h,function(X){return X=es(X,c),O||(O=X.length>1),X}),Ki(c,Jc(c),S),O&&(S=Oo(S,g|v|w,ty));for(var Y=h.length;Y--;)Hl(S,h[Y]);return S});function y4(c,h){return lD(c,Ce(At(h)))}var v4=xa(function(c,h){return c==null?{}:Ou(c,h)});function lD(c,h){if(c==null)return{};var S=In(Jc(c),function(O){return[O]});return h=At(h),hp(c,S,function(O,Y){return h(O,Y[0])})}function w4(c,h,S){h=es(h,c);var O=-1,Y=h.length;for(Y||(Y=1,c=n);++O<Y;){var X=c==null?n:c[Qi(h[O])];X===n&&(O=Y,X=S),c=Zl(X)?X.call(c):X}return c}function b4(c,h,S){return c==null?c:Zn(c,h,S)}function S4(c,h,S,O){return O=typeof O=="function"?O:n,c==null?c:Zn(c,h,S,O)}var uD=Ep(ao),cD=Ep(Ei);function D4(c,h,S){var O=Qt(c),Y=O||qu(c)||Qf(c);if(h=At(h,4),S==null){var X=c&&c.constructor;Y?S=O?new X:[]:ar(c)?S=Zl(X)?Mu(Wi(c)):{}:S={}}return(Y?or:Si)(c,function(fe,ve,Se){return h(S,fe,ve,Se)}),S}function T4(c,h){return c==null?!0:Hl(c,h)}function I4(c,h,S){return c==null?c:vf(c,h,Sf(S))}function x4(c,h,S,O){return O=typeof O=="function"?O:n,c==null?c:vf(c,h,Sf(S),O)}function Xf(c){return c==null?[]:Vt(c,ao(c))}function E4(c){return c==null?[]:Vt(c,Ei(c))}function C4(c,h,S){return S===n&&(S=h,h=n),S!==n&&(S=Ca(S),S=S===S?S:0),h!==n&&(h=Ca(h),h=h===h?h:0),Xa(Ca(c),h,S)}function M4(c,h,S){return h=$l(h),S===n?(S=h,h=0):S=$l(S),c=Ca(c),Ug(c,h,S)}function k4(c,h,S){if(S&&typeof S!="boolean"&&Dn(c,h,S)&&(h=S=n),S===n&&(typeof h=="boolean"?(S=h,h=n):typeof c=="boolean"&&(S=c,c=n)),c===n&&h===n?(c=0,h=1):(c=$l(c),h===n?(h=c,c=0):h=$l(h)),c>h){var O=c;c=h,h=O}if(S||c%1||h%1){var Y=Fc();return Gr(c+Y*(h-c+hu("1e-"+((Y+"").length-1))),h)}return zc(c,h)}var N4=ns(function(c,h,S){return h=h.toLowerCase(),c+(S?dD(h):h)});function dD(c){return kw(Nn(c).toLowerCase())}function fD(c){return c=Nn(c),c&&c.replace(Dl,No).replace(_d,"")}function A4(c,h,S){c=Nn(c),h=Xn(h);var O=c.length;S=S===n?O:Xa(nn(S),0,O);var Y=S;return S-=h.length,S>=0&&c.slice(S,Y)==h}function F4(c){return c=Nn(c),c&&nt.test(c)?c.replace(Ye,Ml):c}function P4(c){return c=Nn(c),c&&Rr.test(c)?c.replace(rr,"\\$&"):c}var O4=ns(function(c,h,S){return c+(S?"-":"")+h.toLowerCase()}),j4=ns(function(c,h,S){return c+(S?" ":"")+h.toLowerCase()}),L4=Ip("toLowerCase");function R4(c,h,S){c=Nn(c),h=nn(h);var O=h?kl(c):0;if(!h||O>=h)return c;var Y=(h-O)/2;return qc(Fs(Y),S)+c+qc(Al(Y),S)}function _4(c,h,S){c=Nn(c),h=nn(h);var O=h?kl(c):0;return h&&O<h?c+qc(h-O,S):c}function B4(c,h,S){c=Nn(c),h=nn(h);var O=h?kl(c):0;return h&&O<h?qc(h-O,S)+c:c}function H4(c,h,S){return S||h==null?h=0:h&&(h=+h),Pg(Nn(c).replace(ca,""),h||0)}function Y4(c,h,S){return(S?Dn(c,h,S):h===n)?h=1:h=nn(h),ju(Nn(c),h)}function U4(){var c=arguments,h=Nn(c[0]);return c.length<3?h:h.replace(c[1],c[2])}var z4=ns(function(c,h,S){return c+(S?"_":"")+h.toLowerCase()});function V4(c,h,S){return S&&typeof S!="number"&&Dn(c,h,S)&&(h=S=n),S=S===n?re:S>>>0,S?(c=Nn(c),c&&(typeof h=="string"||h!=null&&!Ew(h))&&(h=Xn(h),!h&&wu(c))?ts(Go(c),0,S):c.split(h,S)):[]}var W4=ns(function(c,h,S){return c+(S?" ":"")+kw(h)});function Z4(c,h,S){return c=Nn(c),S=S==null?0:Xa(nn(S),0,c.length),h=Xn(h),c.slice(S,S+h.length)==h}function $4(c,h,S){var O=G.templateSettings;S&&Dn(c,h,S)&&(h=n),c=Nn(c),h=Cy({},h,O,Cp);var Y=Cy({},h.imports,O.imports,Cp),X=ao(Y),fe=Vt(Y,X),ve,Se,Ze=0,$e=h.interpolate||Ya,Ke="__p += '",ft=Ec((h.escape||Ya).source+"|"+$e.source+"|"+($e===jn?Bi:Ya).source+"|"+(h.evaluate||Ya).source+"|$","g"),Ct="//# sourceURL="+(mn.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Cn+"]")+`
|
|
|
`;c.replace(ft,function(Bt,sn,hn,ta,ri,na){return hn||(hn=ta),Ke+=c.slice(Ze,na).replace(du,xc),sn&&(ve=!0,Ke+=`' +
|
|
|
__e(`+sn+`) +
|
|
|
'`),ri&&(Se=!0,Ke+=`';
|
|
|
`+ri+`;
|
|
|
__p += '`),hn&&(Ke+=`' +
|
|
|
((__t = (`+hn+`)) == null ? '' : __t) +
|
|
|
'`),Ze=na+Bt.length,Bt}),Ke+=`';
|
|
|
`;var _t=mn.call(h,"variable")&&h.variable;if(!_t)Ke=`with (obj) {
|
|
|
`+Ke+`
|
|
|
}
|
|
|
`;else if(ho.test(_t))throw new Wt(u);Ke=(Se?Ke.replace(ne,""):Ke).replace(ge,"$1").replace(Ae,"$1;"),Ke="function("+(_t||"obj")+`) {
|
|
|
`+(_t?"":`obj || (obj = {});
|
|
|
`)+"var __t, __p = ''"+(ve?", __e = _.escape":"")+(Se?`, __j = Array.prototype.join;
|
|
|
function print() { __p += __j.call(arguments, '') }
|
|
|
`:`;
|
|
|
`)+Ke+`return __p
|
|
|
}`;var rn=pD(function(){return pn(X,Ct+"return "+Ke).apply(n,fe)});if(rn.source=Ke,xw(rn))throw rn;return rn}function q4(c){return Nn(c).toLowerCase()}function G4(c){return Nn(c).toUpperCase()}function J4(c,h,S){if(c=Nn(c),c&&(S||h===n))return rt(c);if(!c||!(h=Xn(h)))return c;var O=Go(c),Y=Go(h),X=Mn(O,Y),fe=Yr(O,Y)+1;return ts(O,X,fe).join("")}function K4(c,h,S){if(c=Nn(c),c&&(S||h===n))return c.slice(0,zd(c)+1);if(!c||!(h=Xn(h)))return c;var O=Go(c),Y=Yr(O,Go(h))+1;return ts(O,0,Y).join("")}function Q4(c,h,S){if(c=Nn(c),c&&(S||h===n))return c.replace(ca,"");if(!c||!(h=Xn(h)))return c;var O=Go(c),Y=Mn(O,Go(h));return ts(O,Y).join("")}function X4(c,h){var S=$,O=te;if(ar(h)){var Y="separator"in h?h.separator:Y;S="length"in h?nn(h.length):S,O="omission"in h?Xn(h.omission):O}c=Nn(c);var X=c.length;if(wu(c)){var fe=Go(c);X=fe.length}if(S>=X)return c;var ve=S-kl(O);if(ve<1)return O;var Se=fe?ts(fe,0,ve).join(""):c.slice(0,ve);if(Y===n)return Se+O;if(fe&&(ve+=Se.length-ve),Ew(Y)){if(c.slice(ve).search(Y)){var Ze,$e=Se;for(Y.global||(Y=Ec(Y.source,Nn(Hi.exec(Y))+"g")),Y.lastIndex=0;Ze=Y.exec($e);)var Ke=Ze.index;Se=Se.slice(0,Ke===n?ve:Ke)}}else if(c.indexOf(Xn(Y),ve)!=ve){var ft=Se.lastIndexOf(Y);ft>-1&&(Se=Se.slice(0,ft))}return Se+O}function eN(c){return c=Nn(c),c&&et.test(c)?c.replace(He,Eg):c}var tN=ns(function(c,h,S){return c+(S?" ":"")+h.toUpperCase()}),kw=Ip("toUpperCase");function hD(c,h,S){return c=Nn(c),h=S?n:h,h===n?K0(c)?tw(c):gu(c):c.match(h)||[]}var pD=Kt(function(c,h){try{return lr(c,n,h)}catch(S){return xw(S)?S:new Wt(S)}}),nN=xa(function(c,h){return or(h,function(S){S=Qi(S),Sa(c,S,Ge(c[S],c))}),c});function rN(c){var h=c==null?0:c.length,S=At();return c=h?In(c,function(O){if(typeof O[1]!="function")throw new yi(a);return[S(O[0]),O[1]]}):[],Kt(function(O){for(var Y=-1;++Y<h;){var X=c[Y];if(lr(X[0],this,O))return lr(X[1],this,O)}})}function oN(c){return Hg(Oo(c,g))}function Nw(c){return function(){return c}}function iN(c,h){return c==null||c!==c?h:c}var aN=Yl(),sN=Yl(!0);function Ci(c){return c}function Aw(c){return Hc(typeof c=="function"?c:Oo(c,g))}function lN(c){return Pu(Oo(c,g))}function uN(c,h){return Ji(c,Oo(h,g))}var cN=Kt(function(c,h){return function(S){return Ys(S,c,h)}}),dN=Kt(function(c,h){return function(S){return Ys(c,S,h)}});function Fw(c,h,S){var O=ao(h),Y=wo(h,O);S==null&&!(ar(h)&&(Y.length||!O.length))&&(S=h,h=c,c=this,Y=wo(h,ao(h)));var X=!(ar(S)&&"chain"in S)||!!S.chain,fe=Zl(c);return or(Y,function(ve){var Se=h[ve];c[ve]=Se,fe&&(c.prototype[ve]=function(){var Ze=this.__chain__;if(X||Ze){var $e=c(this.__wrapped__),Ke=$e.__actions__=bo(this.__actions__);return Ke.push({func:Se,args:arguments,thisArg:c}),$e.__chain__=Ze,$e}return Se.apply(c,mi([this.value()],arguments))})}),c}function fN(){return An._===this&&(An._=kg),this}function Pw(){}function hN(c){return c=nn(c),Kt(function(h){return Vs(h,c)})}var pN=Ef(In),mN=Ef(mu),gN=Ef(Ns);function mD(c){return Fp(c)?N(Qi(c)):pp(c)}function yN(c){return function(h){return c==null?n:Qo(c,h)}}var vN=xp(),wN=xp(!0);function Ow(){return[]}function jw(){return!1}function bN(){return{}}function SN(){return""}function DN(){return!0}function TN(c,h){if(c=nn(c),c<1||c>oe)return[];var S=re,O=Gr(c,re);h=At(h),c-=re;for(var Y=xe(O,h);++S<c;)h(S);return Y}function IN(c){return Qt(c)?In(c,Qi):ea(c)?[c]:bo(cy(Nn(c)))}function xN(c){var h=++Du;return Nn(c)+h}var EN=xf(function(c,h){return c+h},0),CN=no("ceil"),MN=xf(function(c,h){return c/h},1),kN=no("floor");function NN(c){return c&&c.length?Rl(c,Ci,qi):n}function AN(c,h){return c&&c.length?Rl(c,At(h,2),qi):n}function FN(c){return Ic(c,Ci)}function PN(c,h){return Ic(c,At(h,2))}function ON(c){return c&&c.length?Rl(c,Ci,Us):n}function jN(c,h){return c&&c.length?Rl(c,At(h,2),Us):n}var LN=xf(function(c,h){return c*h},1),RN=no("round"),_N=xf(function(c,h){return c-h},0);function BN(c){return c&&c.length?Fe(c,Ci):0}function HN(c,h){return c&&c.length?Fe(c,At(h,2)):0}return G.after=ce,G.ary=ye,G.assign=Gk,G.assignIn=aD,G.assignInWith=Cy,G.assignWith=Jk,G.at=Kk,G.before=Le,G.bind=Ge,G.bindAll=nN,G.bindKey=Xe,G.castArray=bk,G.chain=ni,G.chunk=cw,G.compact=Of,G.concat=Rp,G.cond=rN,G.conforms=oN,G.constant=Nw,G.countBy=bw,G.create=Qk,G.curry=qe,G.curryRight=mt,G.debounce=bt,G.defaults=Xk,G.defaultsDeep=e4,G.defer=Dt,G.delay=ir,G.difference=Ii,G.differenceBy=fn,G.differenceWith=Ar,G.drop=dr,G.dropRight=zr,G.dropRightWhile=ti,G.dropWhile=Wu,G.fill=Tr,G.filter=Dy,G.flatMap=Ty,G.flatMapDeep=Kp,G.flatMapDepth=Sw,G.flatten=td,G.flattenDeep=_p,G.flattenDepth=nd,G.flip=Ee,G.flow=aN,G.flowRight=sN,G.fromPairs=jo,G.functions=s4,G.functionsIn=l4,G.groupBy=$f,G.initial=is,G.intersection=Lf,G.intersectionBy=Bp,G.intersectionWith=Gs,G.invert=c4,G.invertBy=d4,G.invokeMap=qf,G.iteratee=Aw,G.keyBy=Iy,G.keys=ao,G.keysIn=Ei,G.map=Gf,G.mapKeys=h4,G.mapValues=p4,G.matches=lN,G.matchesProperty=uN,G.memoize=we,G.merge=m4,G.mergeWith=sD,G.method=cN,G.methodOf=dN,G.mixin=Fw,G.negate=Ce,G.nthArg=hN,G.omit=g4,G.omitBy=y4,G.once=it,G.orderBy=Jf,G.over=pN,G.overArgs=xt,G.overEvery=mN,G.overSome=gN,G.partial=Ft,G.partialRight=Pt,G.partition=Dw,G.pick=v4,G.pickBy=lD,G.property=mD,G.propertyOf=yN,G.pull=Hp,G.pullAll=od,G.pullAllBy=Bf,G.pullAllWith=Do,G.pullAt=Js,G.range=vN,G.rangeRight=wN,G.rearg=Ht,G.reject=Kf,G.remove=Xi,G.rest=Fr,G.reverse=io,G.sampleSize=l,G.set=b4,G.setWith=S4,G.shuffle=p,G.slice=fy,G.sortBy=P,G.sortedUniq=Ul,G.sortedUniqBy=Vp,G.split=V4,G.spread=gn,G.tail=zl,G.take=py,G.takeRight=my,G.takeRightWhile=Wp,G.takeWhile=Hf,G.tap=$p,G.throttle=el,G.thru=Yf,G.toArray=rD,G.toPairs=uD,G.toPairsIn=cD,G.toPath=IN,G.toPlainObject=iD,G.transform=D4,G.unary=Iw,G.union=fw,G.unionBy=hw,G.unionWith=gy,G.uniq=yy,G.uniqBy=Vl,G.uniqWith=pw,G.unset=T4,G.unzip=Qs,G.unzipWith=Zp,G.update=I4,G.updateWith=x4,G.values=Xf,G.valuesIn=E4,G.without=er,G.words=hD,G.wrap=wk,G.xor=mw,G.xorBy=vy,G.xorWith=gw,G.zip=yw,G.zipObject=wy,G.zipObjectDeep=by,G.zipWith=vw,G.entries=uD,G.entriesIn=cD,G.extend=aD,G.extendWith=Cy,Fw(G,G),G.add=EN,G.attempt=pD,G.camelCase=N4,G.capitalize=dD,G.ceil=CN,G.clamp=C4,G.clone=Sk,G.cloneDeep=Tk,G.cloneDeepWith=Ik,G.cloneWith=Dk,G.conformsTo=xk,G.deburr=fD,G.defaultTo=iN,G.divide=MN,G.endsWith=A4,G.eq=as,G.escape=F4,G.escapeRegExp=P4,G.every=Sy,G.find=Vf,G.findIndex=Zu,G.findKey=t4,G.findLast=Wf,G.findLastIndex=qs,G.findLastKey=n4,G.floor=kN,G.forEach=Qp,G.forEachRight=Zf,G.forIn=r4,G.forInRight=o4,G.forOwn=i4,G.forOwnRight=a4,G.get=Cw,G.gt=Ek,G.gte=Ck,G.has=u4,G.hasIn=Mw,G.head=jf,G.identity=Ci,G.includes=Xp,G.indexOf=$u,G.inRange=M4,G.invoke=f4,G.isArguments=ad,G.isArray=Qt,G.isArrayBuffer=Mk,G.isArrayLike=xi,G.isArrayLikeObject=xr,G.isBoolean=kk,G.isBuffer=qu,G.isDate=Nk,G.isElement=Ak,G.isEmpty=Fk,G.isEqual=Pk,G.isEqualWith=Ok,G.isError=xw,G.isFinite=jk,G.isFunction=Zl,G.isInteger=XS,G.isLength=xy,G.isMap=eD,G.isMatch=Lk,G.isMatchWith=Rk,G.isNaN=_k,G.isNative=Bk,G.isNil=Yk,G.isNull=Hk,G.isNumber=tD,G.isObject=ar,G.isObjectLike=fr,G.isPlainObject=em,G.isRegExp=Ew,G.isSafeInteger=Uk,G.isSet=nD,G.isString=Ey,G.isSymbol=ea,G.isTypedArray=Qf,G.isUndefined=zk,G.isWeakMap=Vk,G.isWeakSet=Wk,G.join=Rf,G.kebabCase=O4,G.last=Ir,G.lastIndexOf=_f,G.lowerCase=j4,G.lowerFirst=L4,G.lt=Zk,G.lte=$k,G.max=NN,G.maxBy=AN,G.mean=FN,G.meanBy=PN,G.min=ON,G.minBy=jN,G.stubArray=Ow,G.stubFalse=jw,G.stubObject=bN,G.stubString=SN,G.stubTrue=DN,G.multiply=LN,G.nth=rd,G.noConflict=fN,G.noop=Pw,G.now=V,G.pad=R4,G.padEnd=_4,G.padStart=B4,G.parseInt=H4,G.random=k4,G.reduce=id,G.reduceRight=Tw,G.repeat=Y4,G.replace=U4,G.result=w4,G.round=RN,G.runInContext=be,G.sample=s,G.size=b,G.snakeCase=z4,G.some=x,G.sortedIndex=Yp,G.sortedIndexBy=Up,G.sortedIndexOf=dw,G.sortedLastIndex=Ks,G.sortedLastIndexBy=hy,G.sortedLastIndexOf=zp,G.startCase=W4,G.startsWith=Z4,G.subtract=_N,G.sum=BN,G.sumBy=HN,G.template=$4,G.times=TN,G.toFinite=$l,G.toInteger=nn,G.toLength=oD,G.toLower=q4,G.toNumber=Ca,G.toSafeInteger=qk,G.toString=Nn,G.toUpper=G4,G.trim=J4,G.trimEnd=K4,G.trimStart=Q4,G.truncate=X4,G.unescape=eN,G.uniqueId=xN,G.upperCase=tN,G.upperFirst=kw,G.each=Qp,G.eachRight=Zf,G.first=jf,Fw(G,function(){var c={};return Si(G,function(h,S){mn.call(G.prototype,S)||(c[S]=h)}),c}(),{chain:!1}),G.VERSION=r,or(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){G[c].placeholder=G}),or(["drop","take"],function(c,h){Jt.prototype[c]=function(S){S=S===n?1:cr(nn(S),0);var O=this.__filtered__&&!h?new Jt(this):this.clone();return O.__filtered__?O.__takeCount__=Gr(S,O.__takeCount__):O.__views__.push({size:Gr(S,re),type:c+(O.__dir__<0?"Right":"")}),O},Jt.prototype[c+"Right"]=function(S){return this.reverse()[c](S).reverse()}}),or(["filter","map","takeWhile"],function(c,h){var S=h+1,O=S==ee||S==W;Jt.prototype[c]=function(Y){var X=this.clone();return X.__iteratees__.push({iteratee:At(Y,3),type:S}),X.__filtered__=X.__filtered__||O,X}}),or(["head","last"],function(c,h){var S="take"+(h?"Right":"");Jt.prototype[c]=function(){return this[S](1).value()[0]}}),or(["initial","tail"],function(c,h){var S="drop"+(h?"":"Right");Jt.prototype[c]=function(){return this.__filtered__?new Jt(this):this[S](1)}}),Jt.prototype.compact=function(){return this.filter(Ci)},Jt.prototype.find=function(c){return this.filter(c).head()},Jt.prototype.findLast=function(c){return this.reverse().find(c)},Jt.prototype.invokeMap=Kt(function(c,h){return typeof c=="function"?new Jt(this):this.map(function(S){return Ys(S,c,h)})}),Jt.prototype.reject=function(c){return this.filter(Ce(At(c)))},Jt.prototype.slice=function(c,h){c=nn(c);var S=this;return S.__filtered__&&(c>0||h<0)?new Jt(S):(c<0?S=S.takeRight(-c):c&&(S=S.drop(c)),h!==n&&(h=nn(h),S=h<0?S.dropRight(-h):S.take(h-c)),S)},Jt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Jt.prototype.toArray=function(){return this.take(re)},Si(Jt.prototype,function(c,h){var S=/^(?:filter|find|map|reject)|While$/.test(h),O=/^(?:head|last)$/.test(h),Y=G[O?"take"+(h=="last"?"Right":""):h],X=O||/^find/.test(h);Y&&(G.prototype[h]=function(){var fe=this.__wrapped__,ve=O?[1]:arguments,Se=fe instanceof Jt,Ze=ve[0],$e=Se||Qt(fe),Ke=function(sn){var hn=Y.apply(G,mi([sn],ve));return O&&ft?hn[0]:hn};$e&&S&&typeof Ze=="function"&&Ze.length!=1&&(Se=$e=!1);var ft=this.__chain__,Ct=!!this.__actions__.length,_t=X&&!ft,rn=Se&&!Ct;if(!X&&$e){fe=rn?fe:new Jt(this);var Bt=c.apply(fe,ve);return Bt.__actions__.push({func:Yf,args:[Ke],thisArg:n}),new Jr(Bt,ft)}return _t&&rn?c.apply(this,ve):(Bt=this.thru(Ke),_t?O?Bt.value()[0]:Bt.value():Bt)})}),or(["pop","push","shift","sort","splice","unshift"],function(c){var h=Ga[c],S=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",O=/^(?:pop|shift)$/.test(c);G.prototype[c]=function(){var Y=arguments;if(O&&!this.__chain__){var X=this.value();return h.apply(Qt(X)?X:[],Y)}return this[S](function(fe){return h.apply(Qt(fe)?fe:[],Y)})}}),Si(Jt.prototype,function(c,h){var S=G[h];if(S){var O=S.name+"";mn.call(Eu,O)||(Eu[O]=[]),Eu[O].push({name:h,func:S})}}),Eu[Hu(n,k).name]=[{name:"wrapper",func:n}],Jt.prototype.clone=ef,Jt.prototype.reverse=op,Jt.prototype.value=ku,G.prototype.at=Xs,G.prototype.chain=Uf,G.prototype.commit=Wl,G.prototype.next=zf,G.prototype.plant=Gp,G.prototype.reverse=ww,G.prototype.toJSON=G.prototype.valueOf=G.prototype.value=Jp,G.prototype.first=G.prototype.head,Ka&&(G.prototype[Ka]=qp),G},bu=nw();pi?((pi.exports=bu)._=bu,Es._=bu):An._=bu}).call(Vr)})(wv,wv.exports);var Nx=wv.exports;function My(e){const t=e.match(/^#+/);return t?t[0].length:0}function TD(e,t){const n=e.split(`
|
|
|
`);let r="",o=[],i=!1,a=1;for(let u=0;u<n.length;u++){const d=n[u];if(d.startsWith("#")&&/^#{1,6}\s/g.test(d)){if(i&&My(d)<=My(t))break;r=d,r===t?(i=!0,a=u+1):i&&My(d)>My(t)?o.push(d):(i=!1,o=[])}else i&&o.push(d)}return t?Nx.isEmpty(o)?{content:"",startLine:-1}:{content:o.join(`
|
|
|
`),startLine:a}:{content:e,startLine:0}}function Ax(e){const t={};for(const n of e)n.parent&&n.parent>0&&(t[n.position.start.line]=n.parent);return t}function I6(e,t,n){var g;const r={},o=(v,w)=>{for(;v[w]!==void 0&&v[w]!==w;)w=v[w];return w},i=yt.getState().app,a=n.split(`
|
|
|
`),u=t+a.length-1,d=(g=i.metadataCache.getFileCache(e))==null?void 0:g.listItems,f={};if(!d)return[];d.forEach(v=>{var T,I;const w=v.position.start.line,D=v.position.end.line;if(w>=t&&D<=u){const k=w-t,A=D-t,R=a.slice(k,A+1),j=R.join(`
|
|
|
`);if(v.parent&&v.parent>0&&(r[v.position.start.line]=v.parent),v.parent&&f[v.parent]){if(w-v.parent===1){const L=(T=a[k])==null?void 0:T.match(/^(\s*)/);L&&(f[v.parent].indent=L[0])}const B=new RegExp("^"+f[v.parent].indent);f[v.parent].content+=`
|
|
|
`+j.split(`
|
|
|
`).map(L=>L==null?void 0:L.replace(B,"")).join(`
|
|
|
`)}else if(v.parent&&f[o(r,v.parent)]){const B=new RegExp("^"+f[o(r,v.parent)].indent);f[o(r,v.parent)].content+=`
|
|
|
`+j.split(`
|
|
|
`).map(L=>L==null?void 0:L.replace(B,"")).join(`
|
|
|
`)}else if(new RegExp(l6).test(j)){f[w]||(f[w]={content:"",indent:""});const B=R.length>1&&((I=R[1])==null?void 0:I.match(/^(\s*)/));B&&(f[w].indent=B[0]),f[w].content=j.split(`
|
|
|
`).map(L=>L==null?void 0:L.replace(f[w].indent,"")).join(`
|
|
|
`)}}}),e.path.includes("2024-04-07");const m=Object.keys(f).map(v=>({line:f[v].content,index:parseInt(v)}));return e.path.includes("2024-04-07"),m}async function x6(e,t){let n=t.vault.getAbstractFileByPath(e);return n||(new C.Notice(E("File not found for the given thino path, is creating a new file")),n=await t.vault.create(e,'{"nodes": [], "edges": []}'),dt.setChangedByMemos(!0)),n}async function E6(e,t){var o;let n;try{n=await t.vault.read(e)}catch(i){console.error(i),n=await t.vault.cachedRead(e)}const r=(o=t.metadataCache.getFileCache(e))==null?void 0:o.frontmatterPosition;return r?n.slice(r.end.offset+1):n}function C6(e){const t=e.split(/\r?\n/),n=[];let r="",o=[],i=0;for(let a=0;a<t.length;a++){const u=t[a];u.startsWith("#")?(r&&n.push({header:r,content:o.join(`
|
|
|
`).trim(),pos:{start:i,end:a-1}}),r=u,o=[],i=a):o.push(u)}return r&&n.push({header:r,content:o.join(`
|
|
|
`).trim(),pos:{start:i,end:t.length-1}}),n}function M6(e){const t=e.split(/\r?\n/),n=[];let r=!1,o=[],i="";for(let a=0;a<t.length;a++){const u=t[a];u.startsWith("> [!thino]")?(r&&(n.push({metadata:i,content:o.join(`
|
|
|
`).trim()}),o=[]),r=!0,i=u.replace("> [!thino]","").trim()):r&&u.startsWith(">")?o.push(u.replace(/^> /,"")):r&&!u.startsWith(">")&&(r=!1,n.push({metadata:i,content:o.join(`
|
|
|
`).trim()}),o=[],i="")}return r&&n.push({metadata:i,content:o.join(`
|
|
|
`).trim()}),n}const k6=e=>{let t;switch(e){case" ":t="TASK-TODO";break;case"x":case"X":t="TASK-DONE";break;default:t="TASK-"+e;break}return t};async function N6(e,t){if(!t)return 0;const{vault:n}=_e.getState().dailyNotesState.app,r=e==null?void 0:e.DefaultMemoComposition,o=e!=null&&e.ProcessEntriesBelow&&(e==null?void 0:e.ProcessContentTarget)!=="whole"?e==null?void 0:e.ProcessEntriesBelow:"",i=(e==null?void 0:e.ProcessContentTarget)!=="whole"?e!=null&&e.DifferentInsertTarget?e!=null&&e.InsertAfterForTask?e==null?void 0:e.InsertAfterForTask:"":o:"";let a;try{a=await n.read(t)}catch(D){console.error(D),a=await n.cachedRead(t)}let u;r!=""&&/{TIME}/g.test(r)&&/{CONTENT}/g.test(r)?u="(-|\\*) (\\[(.{1})\\]\\s)?"+r.replace(/{TIME}/g,"((\\<time\\>)?\\d{1,2}:\\d{2}(\\:\\d{2})?)?").replace(/ {CONTENT}/g,""):u="(-|\\*) (\\[(.{1})\\]\\s)?((\\<time\\>)?\\d{1,2}\\:\\d{2}(\\:\\d{2})?)?";const d=new RegExp(u,"g"),f=(a.match(d)||[]).length,m=new RegExp(o.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g"),g=new RegExp(i.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g"),v=(a.match(m)||[]).length,w=(a.match(g)||[]).length;return a=null,v||w?f:0}function ID(e,t,n,r,o){var d,f,m;const i=lh(o,"day")||C.moment(o.stat.ctime);let a;const u=I6(o,n,t);for(const g of u){const v=O6(e.DefaultMemoComposition,g.line),w=j6(e.DefaultMemoComposition,g.line),D=L6(g.line);let T=A6(g.line);if(i.hours(parseInt(v)),i.minutes(parseInt(w)),D&&i.seconds(parseInt(D)),!D&&i.seconds(0),/^\s*[-*]\s(\[(.)\])\s/g.test(g.line)){const U=R6(g.line);T=F6(e.DefaultMemoComposition,g.line),a=k6(U)}else a="JOURNAL";o.path.includes("2024-04-07");let I=T.trim().replaceAll(/<br>/g,`
|
|
|
`);const k=new RegExp(/\[(pinned|PINNED)::true\]/,"g").test(T),A=new RegExp(/\[(archived|ARCHIVED)::true\]/,"g").test(T),R=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").test(T),j=(d=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").exec(T))==null?void 0:d[2],B=(f=new RegExp(/\[(webId|WEBID)::([^\]]*)\]/,"g").exec(T))==null?void 0:f[2],L=new RegExp(/\[(visibility|VISIBILITY)::("PROTECT"|"PUBLIC")\]/,"g").test(T)?"PUBLIC":"PRIVATE",Z=(m=new RegExp(/(\s|^)\^([0-9a-zA-Z-]+)($|\n)/).exec(T))==null?void 0:m[2];o.path.includes("2024-04-07"),I=I.replace(/\s\[pinned::[^\]]+\]/g,"").replace(/\s\[visibility::[^\]]+\]/g,"").replace(/\s\[archived::[^\]]+\]/g,"").replace(/\s\[deleted::[^\]]+\]/g,"").replace(/\s\[webId::[^\]]+\]/g,"").replace(/(\s|^)\^([0-9a-zA-Z-]+)($|\n)/g,""),r.push({id:i.format("YYYYMMDDHHmmss")+`${g.index}`,content:I,createdAt:i.format("YYYY/MM/DD HH:mm:ss"),updatedAt:i.format("YYYY/MM/DD HH:mm:ss"),thinoType:a,hasId:Z||"",linkId:"",path:o.path,deletedAt:R?C.moment(j,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",rowStatus:A?"ARCHIVED":"NORMAL",visibility:L,pinned:k,creatorName:"Memo",resourceList:[],sourceType:"DAILY",webId:B})}}function A6(e){return e.replace(/^(-|\*|\d\.) (\d{1,2}:\d{2}(:\d{2})?)\s(.*)/g,"$4")}function F6(e,t){return P6(e,t)}const P6=(e,t)=>{var o;let n;n="^(-|\\*|\\d\\.)\\s+\\[.\\]\\s(\\d{1,2}:\\d{2}(:\\d{2})?)\\s([\\w\\W]*)";const r=new RegExp(n,"");return t.contains(`
|
|
|
`),(o=r.exec(t))==null?void 0:o[4]},O6=(e,t)=>{var o;let n;return e!=""&&/{TIME}/g.test(e)&&/{CONTENT}/g.test(e)?n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?"+e.replace(/{TIME}/g,"(\\<time\\>)?(\\d{1,2})\\:(\\d{2})(\\:\\d{2})?").replace(/{CONTENT}/g,"(.*)"):n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\<time\\>)?(\\d{1,2})\\:(\\d{2})(.*)",(o=new RegExp(n,"").exec(t))==null?void 0:o[6]},j6=(e,t)=>{var o;let n;return e!=""&&/{TIME}/g.test(e)&&/{CONTENT}/g.test(e)?n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?"+e.replace(/{TIME}/g,"(\\<time\\>)?(\\d{1,2})\\:(\\d{2})(\\:\\d{2})?").replace(/{CONTENT}/g,"(.*)"):n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\<time\\>)?(\\d{1,2})\\:(\\d{2})(.*)",(o=new RegExp(n,"").exec(t))==null?void 0:o[7]},L6=e=>{var r;const t="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\d{1,2})\\:(\\d{2})\\:(\\d{2})(.*)";return(r=new RegExp(t,"").exec(e))==null?void 0:r[7]},R6=e=>{var t;return(t=/^\s*[\-\*]\s(\[(.{1})\])\s(.*)/.exec(e))==null?void 0:t[2]},Fx=()=>Mm()?!0:(new C.Notice(E("Check if you opened Daily Notes Plugin Or Periodic Notes Plugin")),!1);async function Px(e,t){if(!e)return t;const n=_e.getState().dailyNotesState.app||window.app,r=await E6(e,n);let o=C.moment(e.stat.ctime).format("YYYY/MM/DD HH:mm:ss");await n.fileManager.processFrontMatter(e,i=>{if(i.id||(i.id=ut.randomId(16)),i.createdAt?o=C.moment(i.createdAt,"YYYY/MM/DD HH:mm:ss").isValid()?i.createdAt:o:i.createdAt=o,!r.trim())return t;const a=!!i.pinned,u=i.rowStatus&&i.rowStatus==="ARCHIVED",d=!!i.deletedAt,f=i.deletedAt?i.deletedAt:"",m=i.visibility?i.visibility:"PRIVATE",g=i.thinoType?i.thinoType:"JOURNAL",v=i.webId?i.webId:"",w=i.id?i.id:"",D=i.hasId?i.hasId:"",T=i.linkId?i.linkId:"",I=e.path,k="Memo",A="MULTI",R=[];return t.push({id:w,content:r,createdAt:o,updatedAt:o,deletedAt:d?C.moment(f,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",pinned:a,rowStatus:u?"ARCHIVED":"NORMAL",visibility:m,thinoType:g,hasId:D,linkId:T,path:I,creatorName:k,sourceType:A,resourceList:R,webId:v}),t})}async function Pb(e,t){var w,D,T,I,k,A;if(!e)return t;const{vault:n}=_e.getState().dailyNotesState.app||window.app;let r;try{r=await n.read(e)}catch(R){console.error(R),r=await n.cachedRead(e)}if(!r)return;const o=C.moment(e.stat.ctime).format("YYYY/MM/DD HH:mm:ss"),i=C.moment(e.stat.mtime).format("YYYY/MM/DD HH:mm:ss"),a=e.path,u="Thino",d="FILE",f="",m="",g=[],v=await C6(r);for(const R of v){const j=M6(R.content);for(const B of j){const L=B.metadata.match(/\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2}/g);if(!L)continue;const Z=(D=(w=B.metadata.match(/id::([^\]]*)/g))==null?void 0:w[0])==null?void 0:D.replace("id::","");if(!Z)continue;const U=L?L[0]:o,z=L?L[0]:i,$=B.metadata.match(/webId::([^\]]*)/g)?(I=(T=B.metadata.match(/webId::([^\]]*)/g))==null?void 0:T[0])==null?void 0:I.replace("webId::",""):"",te=B.metadata.contains("[pinned::true]"),Q=B.metadata.contains("[archived::true]"),ue=B.metadata.contains("[deleted::"),ee=(k=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").exec(B.metadata))==null?void 0:k[2],le=new RegExp(/\[(visibility|VISIBILITY)::("PROTECT"|"PUBLIC")\]/,"g").test(B.metadata)?"PUBLIC":"PRIVATE",W=(A=new RegExp(/\[(thinoType|THINOTYPE)::([^\]]*)\]/,"g").exec(B.metadata))==null?void 0:A[2];t.push({id:Z,content:B.content,createdAt:U,updatedAt:z,deletedAt:ue?C.moment(ee,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",pinned:te,rowStatus:Q?"ARCHIVED":"NORMAL",visibility:le,thinoType:W||"JOURNAL",hasId:f,linkId:m,path:a,creatorName:u,sourceType:d,resourceList:g,webId:$})}}return t}async function Ox(e,t){if(!e)return[];const n=_e.getState().dailyNotesState.settings,{vault:r}=_e.getState().dailyNotesState.app||window.app;if(await N6(n,e)===0)return;let i;try{i=await r.read(e)}catch(g){console.error(g),i=await r.cachedRead(e)}const{content:a,startLine:u}=TD(i,(n==null?void 0:n.ProcessContentTarget)==="whole"?"":n.ProcessEntriesBelow);let d="",f=0;if(n.DifferentInsertTarget&&(n==null?void 0:n.ProcessContentTarget)!=="whole"&&n.InsertAfterForTask&&!a.includes(n.InsertAfterForTask)){const{content:g,startLine:v}=TD(i,n.InsertAfterForTask);d=g,f=v}const m=[];ID(n,a,u,m,e),n.DifferentInsertTarget&&d&&ID(n,d,f,m,e),m.length!==0&&t.push(...m.sort((g,v)=>g.createdAt>v.createdAt?-1:1))}async function jx(e,t){const n=_e.getState().dailyNotesState.app||app;if(!(e instanceof C.TFile))return;let r;try{r=await n.vault.read(e)}catch(a){console.error(a),r=await n.vault.cachedRead(e)}if(!r)return;const o=JSON.parse(r),i=o==null?void 0:o.nodes;for(const a of i){if(a.type==="group"||a.createdAt===void 0||a.text.trim()==="")continue;const u=C.moment(a==null?void 0:a.createdAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"),d=C.moment(a==null?void 0:a.updatedAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"),f=a!=null&&a.deletedAt?C.moment(a==null?void 0:a.deletedAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",m=!!(a!=null&&a.pinned),g=a!=null&&a.archived?"ARCHIVED":"NORMAL",v=a!=null&&a.visibility?a==null?void 0:a.visibility:"PRIVATE",w=a!=null&&a.thinoType?a==null?void 0:a.thinoType:"JOURNAL",D=a!=null&&a.text?a==null?void 0:a.text:"",T=a!=null&&a.id?a==null?void 0:a.id:"",I=a!=null&&a.hasId?a==null?void 0:a.hasId:"",k=a!=null&&a.linkId?a==null?void 0:a.linkId:"",A=e.path,R="Memo",j="CANVAS",B=[],L=a!=null&&a.webId?a==null?void 0:a.webId:void 0;t.push({id:T,content:D,createdAt:u,updatedAt:d,deletedAt:f,pinned:m,rowStatus:g,visibility:v,thinoType:w,hasId:I,linkId:k,path:A,creatorName:R,sourceType:j,resourceList:B,webId:L})}}async function xD(e=[]){const t=[],n=[],r=_e.getState().dailyNotesState.app||app,{vault:o}=r,{settings:i}=_e.getState().dailyNotesState,a=r.loadLocalStorage("tokenForSync"),u=async(d,f)=>{for(const m of d)try{await f(m,t,i)}catch(g){console.error(g),new C.Notice(g)}};if(e.includes("CANVAS")){const d=_6(o);await u(d,jx)}if(e.includes("MULTI")){const d=B6(o,r,i);await u(d,Px)}if(e.includes("DAILY")){const d=await H6(o);await u(d,Ox)}if(e.includes("FILE")||a){const d=Y6(o,r,i);await u(d,Pb)}return{memos:t,commentMemos:n}}function _6(e){return e.getAllLoadedFiles().filter(t=>t instanceof C.TFile&&t.extension==="canvas"&&t.name.includes(".thino"))}function B6(e,t,n){const r=e.getMarkdownFiles(),o=r.filter(a=>{var u,d;return((u=a.parent)==null?void 0:u.path.includes(n.MemoOtherSaveLocation.MemoDefaultMultiFilePath.trim()))&&!((d=a.path)!=null&&d.endsWith("thino.md"))}),i=n.TagForMultiTypeFiles?r.filter(a=>{var u,d;return!((u=a.parent)!=null&&u.path.includes(n.MemoOtherSaveLocation.MemoDefaultMultiFilePath.trim())&&!((d=a.path)!=null&&d.endsWith("thino.md")))&&C.getAllTags(t.metadataCache.getFileCache(a)).contains("#"+n.TagForMultiTypeFiles.replace("#",""))}):[];return[...o,...i]}async function H6(e){const t=t0();t===void 0&&new C.Notice(E("Please check your daily note plugin OR periodic notes plugin settings")+"folder path is empty or undefined"),e.getAbstractFileByPath(C.normalizePath(t))||new C.Notice(E("Failed to find daily notes folder"));const r=su();return Object.values(r).filter(o=>o instanceof C.TFile&&o.extension==="md")}function Y6(e,t,n){const r=e.getMarkdownFiles(),o=r.filter(a=>a.name.trim().includes("thino")),i=n.TagForFileTypeFiles?r.filter(a=>!a.name.trim().includes("thino")&&C.getAllTags(t.metadataCache.getFileCache(a)).contains("#"+n.TagForFileTypeFiles.replace("#",""))):[];return[...o,...i]}const U6=async(e,t,n)=>{const r=await Mh(_e.getState().dailyNotesState.app)||[],o=r.find(u=>u.id===e),i={...o,title:t,querystring:n},a=r.findIndex(u=>u.id===e);return r[a]=i,await tg(_e.getState().dailyNotesState.app,r),[o]},z6="https://api.thino.pkmer.cn/test",kh=z6,V6="unknown",W6=/!\[(?<content>[^\]]+)\]\((?<link>[^)]+)\)/g;function Z6(e){return e.substring(e.lastIndexOf(".")+1)}function $6(e){return{id:e.id,createdAt:Date.now().toString(),filename:e.id,type:`${Z6(e.id)}`,size:e.size.toString()}}function q6(e){const t=e==null?void 0:e.matchAll(W6);return t?Array.from(t).map(n=>{var r;return $6({url:(r=n.groups)==null?void 0:r.link,id:V6,size:0,mtime:""})}).filter(n=>n.type!="html"):[]}function ng(e){var t;return{id:e.id,createdAt:C.moment(e.ctime.toString(),"x").format("YYYY/MM/DD HH:mm:ss"),updatedAt:C.moment(e.mtime.toString(),"x").format("YYYY/MM/DD HH:mm:ss"),deletedAt:(t=e.ttime)!=null&&t.toString()?C.moment(e.ttime.toString(),"x").format("YYYY-MM-DD HH:mm:ss"):"",rowStatus:e.rowStatus,content:e.content,pinned:e.pinned,resourceList:q6(e.content),creatorName:"thino",sourceType:(e==null?void 0:e.thinoType)||"FILE",visibility:"PUBLIC",localId:e.originalId,deleted:!!e.dtime}}async function G6(e){const n={url:`${kh}/thino/getThinos${e?`?since=${e}&includeDeleted=true`:""}`,method:"GET",headers:{Authorization:`Bearer ${Nh()}`}};return C.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to fetch memos: ${r.status}`);try{return r.json.payload.map(i=>ng(i))}catch(o){console.error(`Error processing memo response: ${o}`)}}).catch(r=>(console.error(r),[]))}function Nh(){const e=_e.getState().dailyNotesState.app||app;return(e==null?void 0:e.loadLocalStorage("tokenForSync"))||""}async function M1(e){const t=`${kh}/thino/createThino`,n={content:e.content,thinoType:(e==null?void 0:e.thinoType)||"FILE",pinned:!1,rowStatus:"NORMAL",encrypted:!1},r={url:t,method:"POST",contentType:"application/json",body:JSON.stringify(n),headers:{Authorization:`Bearer ${Nh()}`}};return C.requestUrl(r).then(o=>{o.status>=400&&console.error(`Failed to create memo: ${o.status}`);try{const i=o.json;return ng(i.payload)}catch(i){console.error(`Error processing memo creation response: ${i}`)}}).catch(o=>(console.error(o),null))}function J6(e){return{id:e.id,ctime:C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").valueOf(),mtime:C.moment(e.updatedAt,"YYYY/MM/DD HH:mm:ss").valueOf(),ttime:e.deletedAt?C.moment(e.deletedAt,"YYYY/MM/DD HH:mm:ss").valueOf():void 0,rowStatus:e.rowStatus,content:e.content,pinned:e.pinned,encrypted:!1,thinoType:e.sourceType==="DAILY"?"DAILY":"FILE",tags:[]}}async function K6(e){const t=`${kh}/thino/createThinosByData`,n=e.map(o=>J6(o)),r={url:t,method:"POST",contentType:"application/json",body:JSON.stringify(n),headers:{Authorization:`Bearer ${Nh()}`}};return C.requestUrl(r).then(o=>{o.status>=400&&console.error(`Failed to create thinos: ${o.status}`);try{return o.json.payload.map(u=>ng(u))}catch(i){console.error(`Error processing thinos creation response: ${i}`)}}).catch(o=>(console.error(o),[]))}async function _w(e){const n={url:`${kh}/thino/updateThinoById/${e.id}`,method:"POST",contentType:"application/json",body:JSON.stringify(e),headers:{Authorization:`Bearer ${Nh()}`}};return C.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to update memo: ${r.status}`);try{const o=r.json;return ng(o.payload)}catch(o){console.error(`Error processing memo update response: ${o}`)}}).catch(r=>(console.error(r),null))}async function Lx(e){const n={url:`${kh}/thino/recoverThinoFromTrash/${e}`,method:"POST",headers:{Authorization:`Bearer ${Nh()}`}};return C.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to recover memo: ${r.status}`);try{const o=r.json;return ng(o.payload)}catch(o){console.error(`Error processing memo recovery response: ${o}`)}}).catch(r=>(console.error(r),null))}async function Q6(e){const n={url:`${kh}/thino/deleteThinoById/${e}`,method:"DELETE",headers:{Authorization:`Bearer ${Nh()}`}};return C.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to delete memo: ${r.status}`)}).catch(r=>(console.error(r),null))}function X6(e){return(e==null?void 0:e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))||e}function e8(e){const t=[];let n=e;for(;n.contains(`
|
|
|
`);){const r=n.indexOf(`
|
|
|
`);t.push(n.slice(0,r)),n=n.slice(r+1)}return t.push(n),t}async function t8({content:e,isList:t,name:n}){const r=_e.getState().dailyNotesState.settings,o=C.moment(),i=ut.randomId(16),a=(r==null?void 0:r.MemoOtherSaveLocation.MemoDefaultMultiFilePath)||"Thino",u=n||`${o.format("YYYYMMDD")}-${i}`,d=`${a}/${u}.md`,f={id:i,content:e,deletedAt:"",path:d,createdAt:o.format("YYYY/MM/DD HH:mm:ss"),updatedAt:o.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:"",pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"MULTI"},m=yt.getState().app,{vault:g,fileManager:v}=m,w=g.getAbstractFileByPath(a);(!w||!(w instanceof C.TFolder))&&(new C.Notice(E("Folder not found for the given thino path, is creating a new folder")),await g.createFolder(a)),dt.setChangedByMemos(!0);let D;const T=m.vault.getFileByPath(d);return T?D=await g.create(`${a}/${o.format("YYYYMMDD")}-${i}.md`,e):D=await g.create(d,e),await v.processFrontMatter(D,I=>{I.id=i,I.createdAt=o.format("YYYY/MM/DD HH:mm:ss"),I.updatedAt=o.format("YYYY/MM/DD HH:mm:ss"),I.thinoType=t?"JOURNAL":"TASK-TODO"}),(!n||T)&&(r!=null&&r.SetFileNameAfterCreate)&&m.fileManager.promptForFileRename(D),f}async function n8({content:e,isList:t}){const n=_e.getState().dailyNotesState.settings,r=C.moment(),o=ut.randomId(16),i=(n==null?void 0:n.MemoOtherSaveLocation.MemoDefaultSingleFilePath)||"basic.thino.md",a={id:o,content:e,deletedAt:"",path:i,createdAt:r.format("YYYY/MM/DD HH:mm:ss"),updatedAt:r.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:"",pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"FILE"},u=yt.getState().app,{vault:d}=u;let f=d.getAbstractFileByPath(i);(!f||!(f instanceof C.TFile))&&(new C.Notice(E("File not found for the given thino path, is creating a new file")),f=await d.create(i,""));let m="";try{m=await d.read(f)||await d.cachedRead(f)}catch(k){console.error(k),new C.Notice(E("Failed to read current daily note, check if it exists."))}const g=m.indexOf(`# ${r.format("YYYY-MM-DD")}`);let v=m.indexOf(`
|
|
|
#`,g+1);v===-1&&(v=m.length);const w=`> [!thino] ${r.format("YYYY/MM/DD HH:mm:ss")} %% [id::${o}] [thinoType::${t?"JOURNAL":"TASK-TODO"}] %%`,D=e.replace(/\n/g,`
|
|
|
> `),T=`
|
|
|
${w}
|
|
|
> ${D}
|
|
|
`;let I;if(g===-1){const k=`# ${r.format("YYYY-MM-DD")}`;I=`${m.substring(0,v)}
|
|
|
${k}${T}
|
|
|
${m.substring(v)}`}else I=`${m.substring(0,v)}${T}${m.substring(v)}`;return setTimeout(async()=>{dt.setChangedByMemos(!0),await d.modify(f,I)},200),a}async function ED(e){const t=_e.getState().dailyNotesState.settings,n=C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"),r=e.id,o=(t==null?void 0:t.MemoOtherSaveLocation.MemoDefaultSingleFilePath)||"basic.thino.md",i={id:r,content:e.content,deletedAt:e.deletedAt||"",path:o,createdAt:n.format("YYYY/MM/DD HH:mm:ss"),updatedAt:n.format("YYYY/MM/DD HH:mm:ss"),thinoType:"JOURNAL",hasId:"",linkId:"",pinned:e.pinned,visibility:"PUBLIC",rowStatus:e.rowStatus||"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"FILE",webId:e.id},a=yt.getState().app,{vault:u}=a;let d=u.getAbstractFileByPath(o);(!d||!(d instanceof C.TFile))&&(new C.Notice(E("File not found for the given thino path, is creating a new file")),d=await u.create(o,""));let f="";try{f=await u.read(d)||await u.cachedRead(d)}catch(I){console.error(I),new C.Notice(E("Failed to read current daily note, check if it exists."))}const m=f.indexOf(`# ${n.format("YYYY-MM-DD")}`);let g=f.indexOf(`
|
|
|
#`,m+1);g===-1&&(g=f.length);const v=`> [!thino] ${n.format("YYYY/MM/DD HH:mm:ss")} %% [id::${r}] [thinoType::JOURNAL]${e.rowStatus==="ARCHIVED"?" [archived::true]":""}${e.pinned===!0?" [pinned::true]":""}${e.deletedAt?` [deleted::${e.deletedAt}]`:""}${e.id?` [webId::${e.id}]`:""} %%`,w=e.content.replace(/\n/g,`
|
|
|
> `),D=`
|
|
|
${v}
|
|
|
> ${w}
|
|
|
`;let T;if(m===-1){const I=`# ${n.format("YYYY-MM-DD")}`;T=`${f.substring(0,g)}
|
|
|
${I}${D}
|
|
|
${f.substring(g)}`}else T=`${f.substring(0,g)}${D}${f.substring(g)}`;return dt.setChangedByMemos(!0),await u.modify(d,T),i}async function r8({content:e,isList:t}){const n=_e.getState().dailyNotesState.settings,r=(n==null?void 0:n.MemoOtherSaveLocation.MemoDefaultCanvasPath)||"basic.thino.canvas",o=C.moment(),i=ut.randomId(16),a={id:i,content:e,deletedAt:"",path:r,createdAt:o.format("YYYY/MM/DD HH:mm:ss"),updatedAt:o.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:"",pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"CANVAS"},u=yt.getState().app,{vault:d}=u,f=await x6(r,u);if(!f||!(f instanceof C.TFile)){new C.Notice(E("File not found for the given thino path, is creating a new file"));return}const m=await d.read(f),g=JSON.parse(m);if(g.nodes.find(I=>I.id===a.id))return;let w;g.nodes.length>0&&(w=[...g.nodes].reduce((I,k)=>{if(!I.createdAt)return k;const A=C.moment(I.createdAt,"YYYY/MM/DD HH:mm:ss"),R=C.moment(k.createdAt,"YYYY/MM/DD HH:mm:ss");return A.isAfter(R)?I:k}));const D=w?{x:w.x,y:w.y+100,width:w.width,height:w.height}:{x:0,y:0,width:200,height:100};g.nodes.push({...D,type:"text",id:i,text:e,deletedAt:"",createdAt:o.format("YYYY/MM/DD HH:mm:ss"),updatedAt:o.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:"",pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[]}),dt.setChangedByMemos(!0);const T=JSON.stringify(g,null,2);return await d.modify(f,T),a}async function CD(e,t,n){var $;const{vault:r}=_e.getState().dailyNotesState.app||app,o=_e.getState().dailyNotesState.app||app,i=_e.getState().dailyNotesState.settings,a=o.vault.getConfig("useTab")===void 0||app.vault.getConfig("useTab")===!0,u=a?1:o.vault.getConfig("tabSize"),d=(a?" ":" ").repeat(u),f=e.split(`
|
|
|
`).join(`
|
|
|
`+d),m=n||C.moment(),{DifferentInsertTarget:g,InsertAfterForTask:v,InsertType:w}=i,D=m.format(i.DefaultTimePrefix||"HH:mm"),T=o==null?void 0:o.loadLocalStorage("tokenForSync");let I="";try{e&&T&&i.startSync&&(I=(await M1({content:e,thinoType:"DAILY"})).id)}catch(te){console.error(te)}const k=t?"- ":"- [ ] ",A=i!=null&&i.DefaultMemoComposition?`${k}${($=i==null?void 0:i.DefaultMemoComposition)==null?void 0:$.replace(/{TIME}/g,D).replace(/{CONTENT}/g,(f.split(`
|
|
|
`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(f)?`
|
|
|
`+d:"")+f)}${f.split(`
|
|
|
`).length>1&&/```/g.test(f.split(`
|
|
|
`)[f.split(`
|
|
|
`).length-1])&&I?`
|
|
|
`+d:" "}${I?`[webId::${I}]`:""}`:`${k}${D} ${f.split(`
|
|
|
`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(f)?`
|
|
|
`+d:""}${f}${f.split(`
|
|
|
`).length>1&&/```/g.test(f.split(`
|
|
|
`)[f.split(`
|
|
|
`).length-1])&&I?`
|
|
|
`+d:" "}${I?`[webId::${I}]`:""}`,R=su(),j=e0(m,R);let B;if(j?B=j:B=await ut.createDailyNoteCheck(m),!B){new C.Notice(E("Failed to create daily note, check if it exists."));return}j||await yt.fechLocalDailyNotes();let L="";try{L=await r.read(B)||await r.cachedRead(B)}catch(te){console.error(te),new C.Notice(E("Failed to read current daily note, check if it exists."))}const Z=w==="end"?"":t?i.InsertAfter:g&&v||i.InsertAfter,U=await Rx(Z,A,L);await r.modify(B,U.content);const z=U.posNum===-1?_x(U.content).length-(A.split(`
|
|
|
`).length-1)-1:U.posNum+1;return dt.setChangedByMemos(!0),{id:m.format("YYYYMMDDHHmm")+"00"+z,content:e,deletedAt:"",createdAt:m.format("YYYY/MM/DD HH:mm:ss"),updatedAt:m.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",path:B.path,hasId:"",linkId:"",webId:I,pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"DAILY"}}async function o8(e){const{vault:t}=_e.getState().dailyNotesState.app??app,n=_e.getState().dailyNotesState.app||app,{DefaultMemoComposition:r,InsertAfter:o,DefaultTimePrefix:i,DifferentInsertTarget:a,InsertAfterForTask:u,InsertType:d}=_e.getState().dailyNotesState.settings;let f=(e.pinned?" [pinned::true]":"")+(e.rowStatus==="ARCHIVED"?" [archived::true]":"")+(e.visibility==="PRIVATE"?' [visibility::"PRIVATE"]':"");if(e.id){const $=" [webId::"+e.id+"]";f+=$}const m=C.moment();if(e.deletedAt){const $=" [deleted::"+m.format("YYYYMMDDHHmmss")+"]";f+=$}const g=n.vault.getConfig("useTab")===void 0||app.vault.getConfig("useTab")===!0,v=g?1:n.vault.getConfig("tabSize"),w=(g?" ":" ").repeat(v),D=e.content.split(`
|
|
|
`).join(`
|
|
|
`+w),T=C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"),I=T.format(i||"HH:mm"),k=e.thinoType?"- [ ] ":"- ",A=r?`${k}${r==null?void 0:r.replace(/{TIME}/g,I).replace(/{CONTENT}/g,(D.split(`
|
|
|
`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(D)?`
|
|
|
`+w:"")+D)}${D.split(`
|
|
|
`).length>1&&/```/g.test(D.split(`
|
|
|
`)[D.split(`
|
|
|
`).length-1])&&f.trim()?`
|
|
|
`+w:" "}${f}`:`${k}${I} ${D.split(`
|
|
|
`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(D)?`
|
|
|
`+w:""}${D}${D.split(`
|
|
|
`).length>1&&/```/g.test(D.split(`
|
|
|
`)[D.split(`
|
|
|
`).length-1])&&f.trim()?`
|
|
|
`+w:" "}${f}`,R=su(),j=e0(T,R);let B;if(j?B=j:B=await ut.createDailyNoteCheck(T),!B){new C.Notice(E("Failed to create daily note, check if it exists.")),new C.Notice(E("Your content has been copied to clipboard, and inserted into the editor. Please try it again")),await navigator.clipboard.writeText(e.content);const $=this.app.workspace.getLeavesOfType("thino_view").first();n.workspace.trigger("send-to-thino",e.content,$);return}j||await yt.fechLocalDailyNotes();let L="";try{L=await t.read(B)||await t.cachedRead(B)}catch($){console.error($),new C.Notice(E("Failed to read current daily note, check if it exists."))}const Z=d==="end"?"":e.thinoType&&a&&u||o,U=await Rx(Z,A,L);await t.modify(B,U.content);const z=U.posNum===-1?_x(U.content).length-1:U.posNum+1;return dt.setChangedByMemos(!0),{id:T.format("YYYYMMDDHHmm")+"00"+z,content:e.content,deletedAt:e.deletedAt??"",createdAt:T.format("YYYY/MM/DD HH:mm:ss"),updatedAt:T.format("YYYY/MM/DD HH:mm:ss"),thinoType:e.thinoType??"JOURNAL",path:B.path,hasId:"",linkId:"",pinned:e.pinned??!1,visibility:"PUBLIC",rowStatus:e.rowStatus??"NORMAL",webId:e.id,creatorName:"Thino",resourceList:[],sourceType:"DAILY"}}async function Rx(e,t,n){const r=new RegExp(`s*${await X6(e)}s*`),o=e8(n),i=o.findIndex(f=>r.test(f)),a=(e==null?void 0:e.trim())===""?!0:i===-1;a&&console.error("unable to find insert after line in file.");const u=o.slice(i+1).findIndex(f=>/^#+ |---/.test(f)),d=u!==-1;if(d){let f;for(let m=u+i;m>i;m--)if(!/^[\s\n ]*$/.test(o[m])){f=m;break}return f||(f=i),await MD(t,n,a?-1:f,d)}else return await MD(t,n,o.length-1,d)}async function MD(e,t,n,r){if(n<-1)throw new Error("Invalid position");if(n===-1)return{content:`${t}
|
|
|
${e}`,posNum:-1};const o=t.split(`
|
|
|
`),i=o.slice(0,n+1).join(`
|
|
|
`),a=o.slice(n+1).join(`
|
|
|
`),u=a.trim().length>0;return{content:`${i}${!u&&!r||!i.endsWith(`
|
|
|
`)?`
|
|
|
`:""}${e}${(u||r?`
|
|
|
`:"")+a}`,posNum:n}}const _x=e=>e.split(/\r?\n/);async function i8(e){const t=_e.getState().dailyNotesState.app,n=t.vault.getAbstractFileByPath(e.path);if(!(n instanceof C.TFile)){new C.Notice(E("File not found for the given thino path"));return}await t.vault.delete(n)}async function a8(e){const t=_e.getState().dailyNotesState.app,n=t.vault.getAbstractFileByPath(e.path);if(!(n instanceof C.TFile)){new C.Notice(E("File not found for the given thino path"));return}const o=(await t.vault.read(n)).split(`
|
|
|
`),i=o.findIndex(d=>d.includes(e.id));if(i===-1){new C.Notice(E("Thino not found"));return}const a=o.findIndex((d,f)=>f>i&&d.trim()==="");a===-1?o.splice(i,o.length-i):o.splice(i,a-i);const u=o.join(`
|
|
|
`);if(!u){new C.Notice(E("Thino not found"));return}dt.setChangedByMemos(!0),await t.vault.modify(n,u)}async function s8(e){const t=_e.getState().dailyNotesState.app,n=t.metadataCache.getFirstLinkpathDest("",e.path);if(!n){new C.Notice(E("File not found for the given thino path"));return}const r=await t.vault.read(n),o=JSON.parse(r),i=o.nodes,a=i.findIndex(m=>m.id===e.id);if(a===-1){new C.Notice(E("Thino not found"));return}i.splice(a,1);const u=o.edges;u.filter(m=>m.fromNode===e.id||m.toNode===e.id).forEach(m=>{const g=u.findIndex(v=>v.id===m.id);g!==-1&&u.splice(g,1)}),dt.setChangedByMemos(!0);const f=JSON.stringify(o,null,2);await t.vault.modify(n,f)}async function l8(e){Fx()||new C.Notice(E("If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again."),5e3);const{vault:t,metadataCache:n}=_e.getState().dailyNotesState.app,r=e.id.toString().slice(0,14),o=C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(C.moment(r,"YYYYMMDDHHmmss"))?C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"):C.moment(r,"YYYYMMDDHHmmss");C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(o,"day");const i=e.path,a=t.getAbstractFileByPath(i);if(!a){new C.Notice(E("Please check your daily note plugin OR periodic notes plugin settings"));return}const u=await t.read(a),d=u.split(`
|
|
|
`),f=n.getFileCache(a),m=(f==null?void 0:f.listItems)||[],g=parseInt(e.id.slice(14));let v=g;function w(k,A){let R=[];for(const j in A)A[j]===k&&R.push(parseInt(j),...w(parseInt(j),A));return R}const D=Ax(m),T=m.find(k=>k.position.start.line===g),I=w(g,D);if(I.length>0){const k=I.map(A=>{const R=m.find(j=>j.position.start.line===A);return R?R.position.end.line:-1});v=Math.max(...k,T.position.end.line)}else v=T.position.end.line;if(!u){new C.Notice(E("Thino not found"));return}dt.setChangedByMemos(!0),d.splice(g,v-g+1),await t.modify(a,d.join(`
|
|
|
`))}async function u8(){const{vault:e,metadataCache:t}=_e.getState().dailyNotesState.app,n=_e.getState().dailyNotesState.settings,o=t0()+"/"+n.DeleteFileName+".md",i=[],a=t.getFirstLinkpathDest("",o);if(a instanceof C.TFile){let u=await e.read(a),d=c8(u);if(d.length===0)return i;for(let f=0;f<d.length;f++){const m=d[f];if(/- /.test(m)){const v=d8(m).slice(0,13),w=C.moment(v,"YYYYMMDDHHmmss"),D=h8(d[f]),T=C.moment(D.slice(0,13),"YYYYMMDDHHmmss"),I=f8(d[f]);i.push({id:D,content:I,user_id:1,createdAt:w.format("YYYY/MM/DD HH:mm:SS"),updatedAt:w.format("YYYY/MM/DD HH:mm:SS"),deletedAt:T})}else continue}d=null,u=null}return i}const c8=e=>e.split(/\r?\n/),d8=e=>{var t;return(t=/^- (\d{14})(\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e))==null?void 0:t[1]},f8=e=>{var t;return(t=/^- (\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e))==null?void 0:t[2]},h8=e=>{var t;return(t=/^- (\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e))==null?void 0:t[4]};async function p8(e){const t=await Mh(_e.getState().dailyNotesState.app)||[],n=t.findIndex(r=>r.id===e);t.splice(n,1),await tg(_e.getState().dailyNotesState.app,t)}const m8=async e=>{const{app:t}=_e.getState().dailyNotesState,n=await Mh(t)||[],r=n.find(o=>o.id===e);if(r){const o=C.moment().format("YYYY/MM/DD HH:mm:ss");return r.pinnedAt=o,await tg(t,n),o}else{new C.Notice(E("Query not found"));return}},g8=async e=>{const{app:t}=_e.getState().dailyNotesState,n=await Mh(t)||[],r=n.find(o=>o.id===e);if(r){r.pinnedAt="",await tg(t,n);return}else{new C.Notice(E("Query not found"));return}};function y8(e,t){const n=/%%(.*?)%%/,r=e.match(n);if(!r)return e;const o=r[1].trim(),i={};o.split(" ").forEach(u=>{const[d,f]=u.slice(1,-1).split("::");i[d]=f});for(const u of Object.keys(t))if(u!=="id"&&u!=="content"){if(u==="rowStatus"&&t.rowStatus==="ARCHIVED"){i.archived="true";continue}else if(u==="rowStatus"&&t.rowStatus==="NORMAL"){delete i.archived;continue}if(u==="deleted"&&t.deleted){const d=C.moment().format("YYYYMMDDHHmmss");i.deleted=d}else typeof t[u]=="boolean"?t[u]?i[u]="true":delete i[u]:t[u]&&(i[u]=t[u])}const a=Object.entries(i).map(([u,d])=>`[${u}::${d}]`).join(" ");return e.replace(n,`%% ${a} %%`)}async function fs(e,t){if(!e.sourceType||e.sourceType!=="MULTI")return e;const{vault:n,fileManager:r}=_e.getState().dailyNotesState.app,o=n.getAbstractFileByPath(e.path);if(!o)return e;const i=C.moment();if(await r.processFrontMatter(o,a=>{(t.pinned!==void 0||t.thinoType||t.rowStatus||t.visibility||t.deleted)&&dt.setChangedByMemos(!0),t.id&&(a.id=t.id),t.thinoType&&(a.thinoType=t.thinoType),t.rowStatus&&(a.rowStatus=t.rowStatus),t.visibility&&(a.visibility=t.visibility),t.webId&&(a.webId=t.webId),t.pinned!==void 0&&(a.pinned=t.pinned),t.deleted!==void 0&&(a.deletedAt=t.deleted?i.format("YYYY/MM/DD HH:mm:ss"):""),a.createdAt||(a.createdAt=i.format("YYYY/MM/DD HH:mm:ss")),a.updatedAt=i.format("YYYY/MM/DD HH:mm:ss")}),t.content){const a=await n.read(o);let u=a;const d=t.content.replace(/\$/g,"$$$$");u=a.replace(e.content,d),await n.modify(o,u)}return dt.setChangedByMemos(!0),{...e,id:t.id||e.id,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt||i.format("YYYY/MM/DD HH:mm:ss"),updatedAt:e.updatedAt,content:t.content||e.content,rowStatus:t.rowStatus||e.rowStatus,visibility:t.visibility||e.visibility,pinned:t.pinned!==void 0?t.pinned:e.pinned,webId:t.webId||e.webId,deletedAt:t.deleted?i.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}async function ol(e,t){if(!e.sourceType||e.sourceType!=="FILE")return e;const{vault:n}=_e.getState().dailyNotesState.app,r=n.getAbstractFileByPath(e.path);if(!r)return e;const o=C.moment();let i="";try{i=await n.read(r)}catch(k){console.error(k),i=await n.cachedRead(r)}const a=i.split(/\r?\n/),u=a.findIndex(k=>k.includes(e.id)||e.webId&&k.includes(e.webId)),d=a[u];if(!d)return e;const f=y8(d,t);if(!d)return e;const m=f+`
|
|
|
`,g=a.findIndex((k,A)=>A>u&&k.trim()==="");let v="";g===-1&&(v=a.slice(u+1).join(`
|
|
|
`)),g!==-1&&(v=a.slice(u+1,g).join(`
|
|
|
`));let w=v;t!=null&&t.content&&(w=t.content.split(/\r?\n/).map(j=>"> "+j).join(`
|
|
|
`));const T=(m+w).split(/\r?\n/);a.splice(u,g?g-u:a.length-u,...T);const I=a.join(`
|
|
|
`);return await n.modify(r,I),dt.setChangedByMemos(!0),{...e,id:t.id||e.id,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt||o.format("YYYY/MM/DD HH:mm:ss"),updatedAt:e.updatedAt,content:t.content||e.content,rowStatus:t.rowStatus||e.rowStatus,visibility:t.visibility||e.visibility,pinned:t.pinned!==void 0?t.pinned:e.pinned,webId:t.webId||e.webId,deletedAt:t.deleted?o.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}async function il(e,t){if(!e.sourceType||e.sourceType!=="CANVAS")return e;const{vault:n}=_e.getState().dailyNotesState.app,r=n.getAbstractFileByPath(e.path);if(!r)return e;const o=await n.read(r),i=JSON.parse(o),a=i.nodes.find(f=>f.id===e.id);if(!a)return e;t.content&&(a.text=t.content),t.thinoType&&(a.thinoType=t.thinoType),t.rowStatus&&(a.rowStatus=t.rowStatus),t.visibility&&(a.visibility=t.visibility),t.pinned!==void 0&&(a.pinned=t.pinned),t.webId&&(a.webId=t.webId);const u=C.moment();t.deleted!==void 0&&(a.deletedAt=t.deleted?u.format("YYYY/MM/DD HH:mm:ss"):""),a.updatedAt=u.format("YYYY/MM/DD HH:mm:ss");const d=JSON.stringify(i,null,2);return await n.modify(r,d),dt.setChangedByMemos(!0),{...e,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt,updatedAt:e.updatedAt,content:t.content??e.content,rowStatus:t.rowStatus??e.rowStatus,visibility:t.visibility??e.visibility,pinned:t.pinned??e.pinned,webId:t.webId??e.webId,deletedAt:t.deleted?u.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}async function al(e,t){var ue;Fx()||new C.Notice(E("If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again."));const{vault:n,metadataCache:r}=_e.getState().dailyNotesState.app,o=_e.getState().dailyNotesState.app,{settings:i}=_e.getState().dailyNotesState,a=e.id.toString().slice(0,14),u=C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(C.moment(a,"YYYYMMDDHHmmss"))?C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"):C.moment(a,"YYYYMMDDHHmmss"),d=C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(u,"day"),f=e.path,m=n.getAbstractFileByPath(f)||n.getAbstractFileByPath(e.path);if(!m)return new C.Notice(E("Please check your daily note plugin OR periodic notes plugin settings")),e;const v=(await n.read(m)).split(`
|
|
|
`),w=r.getFileCache(m),D=(w==null?void 0:w.listItems)||[];if(D.length===0)return new C.Notice(E("Thino not found")),e;const T=parseInt(e.id.slice(14));let I=T;function k(ee,le){let W=[];for(const de in le)le[de]===ee&&W.push(parseInt(de),...k(parseInt(de),le));return W}const A=Ax(D),R=D.find(ee=>ee.position.start.line===T);if(!R)return new C.Notice(E("Thino not found")),e;const j=k(T,A);if(j.length>0){const ee=j.map(le=>{const W=D.find(de=>de.position.start.line===le);return W?W.position.end.line:-1});I=Math.max(...ee,R.position.end.line)}else I=R.position.end.line;const B=v.slice(T,I+1);let L=B.join(`
|
|
|
`);const Z=d?C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm"):(parseInt(e.id.toString().slice(10,12))+24).toString()+":"+e.id.toString().slice(12,14);if(!L)return new C.Notice(E("Thino not found")),e;const U=o.vault.getConfig("useTab")===void 0||app.vault.getConfig("useTab")===!0,z=U?1:o.vault.getConfig("tabSize"),$=(U?" ":" ").repeat(z);let te=Z;if(i.DefaultTimePrefix!=="HH:mm"&&(te=C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format(i.DefaultTimePrefix)),t.content){const ee=e.thinoType==="TASK-TODO"?"- [ ] ":e.thinoType==="TASK-DONE"?"- [x] ":e.thinoType.startsWith("TASK")?`- [${e.thinoType.slice(5)}] `:"- ",le=(e.pinned?" [pinned::true]":"")+(e.deletedAt?` [deleted::${e.deletedAt}]`:"")+(e.rowStatus==="ARCHIVED"?" [archived::true]":"")+(e.webId?" [webId::"+e.webId+"]":""),W=t.content.trim().split(`
|
|
|
`)[t.content.trim().split(`
|
|
|
`).length-1].trim(),de=e.hasId&&t.content.trim().split(`
|
|
|
`).length>1&&new RegExp(/(-|\*|\d{1,2}\.)\s/g).test(W)?" ^"+e.hasId:" ";L=`${ee}${te}${de}${t.content.trim().split(`
|
|
|
`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(t.content)?`
|
|
|
`+$:""}${t.content.trim().split(`
|
|
|
`).join(`
|
|
|
`+$)}${t.content.split(`
|
|
|
`).length>1&&/```/g.test(t.content.split(`
|
|
|
`)[t.content.split(`
|
|
|
`).length-1])?`
|
|
|
`+$:" "}${le}`}if(t.thinoType){const ee=t.thinoType==="TASK-TODO"?"- [ ] ":t.thinoType==="TASK-DONE"?"- [x] ":t.thinoType.startsWith("TASK")?`- [${t.thinoType.slice(5)}] `:"- ";L=L.replace(/^((- \[.\] )|((-|\*) ))/,ee)}if(t.rowStatus){const ee=t.rowStatus==="ARCHIVED"?"[archived::"+(t.rowStatus==="ARCHIVED"?"true":"false")+"]":"";L=L.includes("[archived::")?L.replace(/\[archived::(true|false)\]/,ee):L+`${L.split(`
|
|
|
`).length>1&&/```/g.test(L.split(`
|
|
|
`)[L.split(`
|
|
|
`).length-1])?`
|
|
|
`+$:" "}`+ee}if(t.visibility){const ee='[visibility::"'+t.visibility+'"]';L=L.includes("[visibility::")?L.replace(/\[visibility::"(PUBLIC|PROTECTED)"\]/g,ee):L+`${L.split(`
|
|
|
`).length>1&&/```/g.test(L.split(`
|
|
|
`)[L.split(`
|
|
|
`).length-1])?`
|
|
|
`+$:" "}`+ee}if(t.pinned!==void 0){const ee=t.pinned?"[pinned::"+(t.pinned?"true":"false")+"]":"";L=L.includes("[pinned::")?L.replace(/\[pinned::(true|false)\]/,t.pinned===!1?"":ee):L+`${L.split(`
|
|
|
`).length>1&&/```/g.test(L.split(`
|
|
|
`)[L.split(`
|
|
|
`).length-1])?`
|
|
|
`+$:" "}`+ee}if(t.webId!==void 0){const ee="[webId::"+t.webId+"]";L=L.includes("[webId::")?L.replace(/\[webId::([^\]]+)\]/,t.webId===""?"":ee):L+`${L.split(`
|
|
|
`).length>1&&/```/g.test(L.split(`
|
|
|
`)[L.split(`
|
|
|
`).length-1])?`
|
|
|
`+$:" "}`+ee}const Q=C.moment();if(t.deleted!==void 0){const ee="[deleted::"+Q.format("YYYYMMDDHHmmss")+"]";t.deleted?(L=L.replace(/\[deleted::([^\]]+)\]/,""),L=L+`${L.split(`
|
|
|
`).length>1&&/```/g.test(L.split(`
|
|
|
`)[L.split(`
|
|
|
`).length-1])?`
|
|
|
`+$:" "}`+ee):t.deleted===!1&&(L=L.replace(/\[deleted::([^\]]+)\]/,""))}if(e.hasId&&((ue=t.content)==null?void 0:ue.split(`
|
|
|
`).length)===1){const ee=" ^"+e.hasId;L=L.trim().replace(/\s\^([0-9a-zA-Z-]+)($|\n)/g,"")+`${L.split(`
|
|
|
`).length>1&&/```/g.test(L.split(`
|
|
|
`)[L.split(`
|
|
|
`).length-1])?`
|
|
|
`+$:" "}`+ee}return L!==B.join(`
|
|
|
`)?(v.splice(T,I-R.position.start.line+1,L),await n.modify(m,v.join(`
|
|
|
`)),dt.setChangedByMemos(!0),{...e,thinoType:t.thinoType??e.thinoType,createdAt:e.createdAt,updatedAt:e.updatedAt,content:t.content??e.content,rowStatus:t.rowStatus??e.rowStatus,visibility:t.visibility??e.visibility,pinned:t.pinned??e.pinned,webId:t.webId??e.webId,deletedAt:t.deleted?Q.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}):e}const v8=e=>{switch(e==null?void 0:e.sourceType){case"CANVAS":return il(e,{id:e.id,pinned:!0});case"DAILY":return al(e,{id:e.id,pinned:!0});case"MULTI":return fs(e,{id:e.id,pinned:!0});case"FILE":return ol(e,{id:e.id,pinned:!0})}},w8=e=>{switch(e==null?void 0:e.sourceType){case"CANVAS":return il(e,{id:e.id,pinned:!1});case"DAILY":return al(e,{id:e.id,pinned:!1});case"MULTI":return fs(e,{id:e.id,pinned:!1});case"FILE":return ol(e,{id:e.id,pinned:!1})}};var Ob;(e=>{async function t(T){return await xD(T)}e.getMyMemos=t;async function n(T){return await xD([T])}e.updateSpecificTypeMemo=n;function r(){return u8()}e.getMyDeletedMemos=r;function o(T){const I=je.getMemoById(T);if(I)switch(I==null?void 0:I.sourceType){case"DAILY":return al(I,{id:I.id,deleted:!1});case"CANVAS":return il(I,{id:I.id,deleted:!1});case"MULTI":return fs(I,{id:I.id,deleted:!1});case"FILE":return ol(I,{id:I.id,deleted:!1})}}e.restoreMemo=o;function i(T){return a8(T)}e.deleteMemoInSingleFile=i;function a(T){return i8(T)}e.deleteMemoInMultiFiles=a;function u(T){return l8(T)}e.deleteMemoInDailyNote=u;function d(T){return s8(T)}e.deleteMemoInCanvas=d;function f(){return S6()}e.getMyQueries=f;async function m(T,I){return await T6(T,I)}e.createQuery=m;function g(T,I,k){return U6(T,I,k)}e.updateQuery=g;function v(T){return p8(T)}e.deleteQueryById=v;function w(T){return m8(T)}e.pinQuery=w;function D(T){return g8(T)}e.unpinQuery=D})(Ob||(Ob={}));const ki=Ob;var lu={};Object.defineProperty(lu,"__esModule",{value:!0});class Ld extends Error{}class b8 extends Ld{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class S8 extends Ld{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class D8 extends Ld{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class pm extends Ld{}class Bx extends Ld{constructor(t){super(`Invalid unit ${t}`)}}class ka extends Ld{}class Gu extends Ld{constructor(){super("Zone is an abstract class")}}const ht="numeric",ms="short",ia="long",bv={year:ht,month:ht,day:ht},Hx={year:ht,month:ms,day:ht},T8={year:ht,month:ms,day:ht,weekday:ms},Yx={year:ht,month:ia,day:ht},Ux={year:ht,month:ia,day:ht,weekday:ia},zx={hour:ht,minute:ht},Vx={hour:ht,minute:ht,second:ht},Wx={hour:ht,minute:ht,second:ht,timeZoneName:ms},Zx={hour:ht,minute:ht,second:ht,timeZoneName:ia},$x={hour:ht,minute:ht,hourCycle:"h23"},qx={hour:ht,minute:ht,second:ht,hourCycle:"h23"},Gx={hour:ht,minute:ht,second:ht,hourCycle:"h23",timeZoneName:ms},Jx={hour:ht,minute:ht,second:ht,hourCycle:"h23",timeZoneName:ia},Kx={year:ht,month:ht,day:ht,hour:ht,minute:ht},Qx={year:ht,month:ht,day:ht,hour:ht,minute:ht,second:ht},Xx={year:ht,month:ms,day:ht,hour:ht,minute:ht},eE={year:ht,month:ms,day:ht,hour:ht,minute:ht,second:ht},I8={year:ht,month:ms,day:ht,weekday:ms,hour:ht,minute:ht},tE={year:ht,month:ia,day:ht,hour:ht,minute:ht,timeZoneName:ms},nE={year:ht,month:ia,day:ht,hour:ht,minute:ht,second:ht,timeZoneName:ms},rE={year:ht,month:ia,day:ht,weekday:ia,hour:ht,minute:ht,timeZoneName:ia},oE={year:ht,month:ia,day:ht,weekday:ia,hour:ht,minute:ht,second:ht,timeZoneName:ia};class rg{get type(){throw new Gu}get name(){throw new Gu}get ianaName(){return this.name}get isUniversal(){throw new Gu}offsetName(t,n){throw new Gu}formatOffset(t,n){throw new Gu}offset(t){throw new Gu}equals(t){throw new Gu}get isValid(){throw new Gu}}let Bw=null;class r0 extends rg{static get instance(){return Bw===null&&(Bw=new r0),Bw}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return aE(t,n,r)}formatOffset(t,n){return bm(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let rv={};function x8(e){return rv[e]||(rv[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),rv[e]}const E8={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function C8(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,a,u,d,f,m]=r;return[a,o,i,u,d,f,m]}function M8(e,t){const n=e.formatToParts(t),r=[];for(let o=0;o<n.length;o++){const{type:i,value:a}=n[o],u=E8[i];i==="era"?r[u]=a:yn(u)||(r[u]=parseInt(a,10))}return r}let ky={};class tu extends rg{static create(t){return ky[t]||(ky[t]=new tu(t)),ky[t]}static resetCache(){ky={},rv={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=tu.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return aE(t,n,r,this.name)}formatOffset(t,n){return bm(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const r=x8(this.name);let[o,i,a,u,d,f,m]=r.formatToParts?M8(r,n):C8(r,n);u==="BC"&&(o=-Math.abs(o)+1);const v=A1({year:o,month:i,day:a,hour:d===24?0:d,minute:f,second:m,millisecond:0});let w=+n;const D=w%1e3;return w-=D>=0?D:1e3+D,(v-w)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let kD={};function k8(e,t={}){const n=JSON.stringify([e,t]);let r=kD[n];return r||(r=new Intl.ListFormat(e,t),kD[n]=r),r}let jb={};function Lb(e,t={}){const n=JSON.stringify([e,t]);let r=jb[n];return r||(r=new Intl.DateTimeFormat(e,t),jb[n]=r),r}let Rb={};function N8(e,t={}){const n=JSON.stringify([e,t]);let r=Rb[n];return r||(r=new Intl.NumberFormat(e,t),Rb[n]=r),r}let _b={};function A8(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let i=_b[o];return i||(i=new Intl.RelativeTimeFormat(e,t),_b[o]=i),i}let mm=null;function F8(){return mm||(mm=new Intl.DateTimeFormat().resolvedOptions().locale,mm)}function P8(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,o;try{r=Lb(e).resolvedOptions(),o=e}catch{const d=e.substring(0,n);r=Lb(d).resolvedOptions(),o=d}const{numberingSystem:i,calendar:a}=r;return[o,i,a]}}function O8(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function j8(e){const t=[];for(let n=1;n<=12;n++){const r=Mt.utc(2016,n,1);t.push(e(r))}return t}function L8(e){const t=[];for(let n=1;n<=7;n++){const r=Mt.utc(2016,11,13+n);t.push(e(r))}return t}function Ny(e,t,n,r,o){const i=e.listingMode(n);return i==="error"?null:i==="en"?r(t):o(t)}function R8(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class _8{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:o,floor:i,...a}=r;if(!n||Object.keys(a).length>0){const u={useGrouping:!1,...r};r.padTo>0&&(u.minimumIntegerDigits=r.padTo),this.inf=N8(t,u)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):N1(t,3);return Or(n,this.padTo)}}}class B8{constructor(t,n,r){this.opts=r;let o;if(t.zone.isUniversal){const a=-1*(t.offset/60),u=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;t.offset!==0&&tu.create(u).valid?(o=u,this.dt=t):(o="UTC",r.timeZoneName?this.dt=t:this.dt=t.offset===0?t:Mt.fromMillis(t.ts+t.offset*60*1e3))}else t.zone.type==="system"?this.dt=t:(this.dt=t,o=t.zone.name);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=Lb(n,i)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class H8{constructor(t,n,r){this.opts={style:"long",...r},!n&&iE()&&(this.rtf=A8(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):r9(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}class Gn{static fromOpts(t){return Gn.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,n,r,o=!1){const i=t||Pr.defaultLocale,a=i||(o?"en-US":F8()),u=n||Pr.defaultNumberingSystem,d=r||Pr.defaultOutputCalendar;return new Gn(a,u,d,i)}static resetCache(){mm=null,jb={},Rb={},_b={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r}={}){return Gn.create(t,n,r)}constructor(t,n,r,o){const[i,a,u]=P8(t);this.locale=i,this.numberingSystem=n||a||null,this.outputCalendar=r||u||null,this.intl=O8(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=R8(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:Gn.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1,r=!0){return Ny(this,t,r,uE,()=>{const o=n?{month:t,day:"numeric"}:{month:t},i=n?"format":"standalone";return this.monthsCache[i][t]||(this.monthsCache[i][t]=j8(a=>this.extract(a,o,"month"))),this.monthsCache[i][t]})}weekdays(t,n=!1,r=!0){return Ny(this,t,r,fE,()=>{const o=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},i=n?"format":"standalone";return this.weekdaysCache[i][t]||(this.weekdaysCache[i][t]=L8(a=>this.extract(a,o,"weekday"))),this.weekdaysCache[i][t]})}meridiems(t=!0){return Ny(this,void 0,t,()=>hE,()=>{if(!this.meridiemCache){const n={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Mt.utc(2016,11,13,9),Mt.utc(2016,11,13,19)].map(r=>this.extract(r,n,"dayperiod"))}return this.meridiemCache})}eras(t,n=!0){return Ny(this,t,n,pE,()=>{const r={era:t};return this.eraCache[t]||(this.eraCache[t]=[Mt.utc(-40,1,1),Mt.utc(2017,1,1)].map(o=>this.extract(o,r,"era"))),this.eraCache[t]})}extract(t,n,r){const o=this.dtFormatter(t,n),i=o.formatToParts(),a=i.find(u=>u.type.toLowerCase()===r);return a?a.value:null}numberFormatter(t={}){return new _8(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new B8(t,this.intl,n)}relFormatter(t={}){return new H8(this.intl,this.isEnglish(),t)}listFormatter(t={}){return k8(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}let Hw=null;class ai extends rg{static get utcInstance(){return Hw===null&&(Hw=new ai(0)),Hw}static instance(t){return t===0?ai.utcInstance:new ai(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new ai(i0(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${bm(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${bm(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return bm(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class Y8 extends rg{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function rc(e,t){if(yn(e)||e===null)return t;if(e instanceof rg)return e;if(U8(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?r0.instance:n==="utc"||n==="gmt"?ai.utcInstance:ai.parseSpecifier(n)||tu.create(e)}else return wd(e)?ai.instance(e):typeof e=="object"&&e.offset&&typeof e.offset=="number"?e:new Y8(e)}let ND=()=>Date.now(),AD="system",FD=null,PD=null,OD=null,jD=60,LD;class Pr{static get now(){return ND}static set now(t){ND=t}static set defaultZone(t){AD=t}static get defaultZone(){return rc(AD,r0.instance)}static get defaultLocale(){return FD}static set defaultLocale(t){FD=t}static get defaultNumberingSystem(){return PD}static set defaultNumberingSystem(t){PD=t}static get defaultOutputCalendar(){return OD}static set defaultOutputCalendar(t){OD=t}static get twoDigitCutoffYear(){return jD}static set twoDigitCutoffYear(t){jD=t%100}static get throwOnInvalid(){return LD}static set throwOnInvalid(t){LD=t}static resetCaches(){Gn.resetCache(),tu.resetCache()}}function yn(e){return typeof e>"u"}function wd(e){return typeof e=="number"}function o0(e){return typeof e=="number"&&e%1===0}function U8(e){return typeof e=="string"}function z8(e){return Object.prototype.toString.call(e)==="[object Date]"}function iE(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function V8(e){return Array.isArray(e)?e:[e]}function RD(e,t,n){if(e.length!==0)return e.reduce((r,o)=>{const i=[t(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function W8(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function ph(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function eu(e,t,n){return o0(e)&&e>=t&&e<=n}function Z8(e,t){return e-t*Math.floor(e/t)}function Or(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function nc(e){if(!(yn(e)||e===null||e===""))return parseInt(e,10)}function sd(e){if(!(yn(e)||e===null||e===""))return parseFloat(e)}function k1(e){if(!(yn(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function N1(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function og(e){return e%4===0&&(e%100!==0||e%400===0)}function wm(e){return og(e)?366:365}function Sv(e,t){const n=Z8(t-1,12)+1,r=e+(t-n)/12;return n===2?og(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function A1(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(t.getUTCFullYear()-1900)),+t}function Dv(e){const t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,r=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return t===4||r===3?53:52}function Bb(e){return e>99?e:e>Pr.twoDigitCutoffYear?1900+e:2e3+e}function aE(e,t,n,r=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},u=new Intl.DateTimeFormat(n,a).formatToParts(o).find(d=>d.type.toLowerCase()==="timezonename");return u?u.value:null}function i0(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function sE(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new ka(`Invalid unit value ${e}`);return t}function Tv(e,t){const n={};for(const r in e)if(ph(e,r)){const o=e[r];if(o==null)continue;n[t(r)]=sE(o)}return n}function bm(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${Or(n,2)}:${Or(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${Or(n,2)}${Or(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function a0(e){return W8(e,["hour","minute","second","millisecond"])}const $8=["January","February","March","April","May","June","July","August","September","October","November","December"],lE=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],q8=["J","F","M","A","M","J","J","A","S","O","N","D"];function uE(e){switch(e){case"narrow":return[...q8];case"short":return[...lE];case"long":return[...$8];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const cE=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],dE=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],G8=["M","T","W","T","F","S","S"];function fE(e){switch(e){case"narrow":return[...G8];case"short":return[...dE];case"long":return[...cE];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const hE=["AM","PM"],J8=["Before Christ","Anno Domini"],K8=["BC","AD"],Q8=["B","A"];function pE(e){switch(e){case"narrow":return[...Q8];case"short":return[...K8];case"long":return[...J8];default:return null}}function X8(e){return hE[e.hour<12?0:1]}function e9(e,t){return fE(t)[e.weekday-1]}function t9(e,t){return uE(t)[e.month-1]}function n9(e,t){return pE(t)[e.year<0?0:1]}function r9(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const g=e==="days";switch(t){case 1:return g?"tomorrow":`next ${o[e][0]}`;case-1:return g?"yesterday":`last ${o[e][0]}`;case 0:return g?"today":`this ${o[e][0]}`}}const a=Object.is(t,-0)||t<0,u=Math.abs(t),d=u===1,f=o[e],m=r?d?f[1]:f[2]||f[1]:d?o[e][0]:e;return a?`${u} ${m} ago`:`in ${u} ${m}`}function _D(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const o9={D:bv,DD:Hx,DDD:Yx,DDDD:Ux,t:zx,tt:Vx,ttt:Wx,tttt:Zx,T:$x,TT:qx,TTT:Gx,TTTT:Jx,f:Kx,ff:Xx,fff:tE,ffff:rE,F:Qx,FF:eE,FFF:nE,FFFF:oE};class Ho{static create(t,n={}){return new Ho(t,n)}static parseFormat(t){let n=null,r="",o=!1;const i=[];for(let a=0;a<t.length;a++){const u=t.charAt(a);u==="'"?(r.length>0&&i.push({literal:o,val:r}),n=null,r="",o=!o):o||u===n?r+=u:(r.length>0&&i.push({literal:!1,val:r}),r=u,n=u)}return r.length>0&&i.push({literal:o,val:r}),i}static macroTokenToFormatOpts(t){return o9[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}formatDateTime(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).format()}formatDateTimeParts(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).formatToParts()}formatInterval(t,n={}){return this.loc.dtFormatter(t.start,{...this.opts,...n}).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return Or(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(w,D)=>this.loc.extract(t,w,D),a=w=>t.isOffsetFixed&&t.offset===0&&w.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,w.format):"",u=()=>r?X8(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),d=(w,D)=>r?t9(t,w):i(D?{month:w}:{month:w,day:"numeric"},"month"),f=(w,D)=>r?e9(t,w):i(D?{weekday:w}:{weekday:w,month:"long",day:"numeric"},"weekday"),m=w=>{const D=Ho.macroTokenToFormatOpts(w);return D?this.formatWithSystemDefault(t,D):w},g=w=>r?n9(t,w):i({era:w},"era"),v=w=>{switch(w){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return u();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return f("short",!0);case"cccc":return f("long",!0);case"ccccc":return f("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return f("short",!1);case"EEEE":return f("long",!1);case"EEEEE":return f("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return d("short",!0);case"LLLL":return d("long",!0);case"LLLLL":return d("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return d("short",!1);case"MMMM":return d("long",!1);case"MMMMM":return d("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return g("short");case"GG":return g("long");case"GGGGG":return g("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return m(w)}};return _D(Ho.parseFormat(n),v)}formatDurationFromString(t,n){const r=d=>{switch(d[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=d=>f=>{const m=r(f);return m?this.num(d.get(m),f.length):f},i=Ho.parseFormat(n),a=i.reduce((d,{literal:f,val:m})=>f?d:d.concat(m),[]),u=t.shiftTo(...a.map(r).filter(d=>d));return _D(i,o(u))}}class hs{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const mE=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ah(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function Fh(...e){return t=>e.reduce(([n,r,o],i)=>{const[a,u,d]=i(t,o);return[{...n,...a},u||r,d]},[{},null,1]).slice(0,2)}function Ph(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const o=n.exec(e);if(o)return r(o)}return[null,null]}function gE(...e){return(t,n)=>{const r={};let o;for(o=0;o<e.length;o++)r[e[o]]=nc(t[n+o]);return[r,null,n+o]}}const yE=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,i9=`(?:${yE.source}?(?:\\[(${mE.source})\\])?)?`,F1=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,vE=RegExp(`${F1.source}${i9}`),P1=RegExp(`(?:T${vE.source})?`),a9=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,s9=/(\d{4})-?W(\d\d)(?:-?(\d))?/,l9=/(\d{4})-?(\d{3})/,u9=gE("weekYear","weekNumber","weekDay"),c9=gE("year","ordinal"),d9=/(\d{4})-(\d\d)-(\d\d)/,wE=RegExp(`${F1.source} ?(?:${yE.source}|(${mE.source}))?`),f9=RegExp(`(?: ${wE.source})?`);function ch(e,t,n){const r=e[t];return yn(r)?n:nc(r)}function h9(e,t){return[{year:ch(e,t),month:ch(e,t+1,1),day:ch(e,t+2,1)},null,t+3]}function Oh(e,t){return[{hours:ch(e,t,0),minutes:ch(e,t+1,0),seconds:ch(e,t+2,0),milliseconds:k1(e[t+3])},null,t+4]}function ig(e,t){const n=!e[t]&&!e[t+1],r=i0(e[t+1],e[t+2]),o=n?null:ai.instance(r);return[{},o,t+3]}function ag(e,t){const n=e[t]?tu.create(e[t]):null;return[{},n,t+1]}const p9=RegExp(`^T?${F1.source}$`),m9=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function g9(e){const[t,n,r,o,i,a,u,d,f]=e,m=t[0]==="-",g=d&&d[0]==="-",v=(w,D=!1)=>w!==void 0&&(D||w&&m)?-w:w;return[{years:v(sd(n)),months:v(sd(r)),weeks:v(sd(o)),days:v(sd(i)),hours:v(sd(a)),minutes:v(sd(u)),seconds:v(sd(d),d==="-0"),milliseconds:v(k1(f),g)}]}const y9={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function O1(e,t,n,r,o,i,a){const u={year:t.length===2?Bb(nc(t)):nc(t),month:lE.indexOf(n)+1,day:nc(r),hour:nc(o),minute:nc(i)};return a&&(u.second=nc(a)),e&&(u.weekday=e.length>3?cE.indexOf(e)+1:dE.indexOf(e)+1),u}const v9=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function w9(e){const[,t,n,r,o,i,a,u,d,f,m,g]=e,v=O1(t,o,r,n,i,a,u);let w;return d?w=y9[d]:f?w=0:w=i0(m,g),[v,new ai(w)]}function b9(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const S9=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,D9=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,T9=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function BD(e){const[,t,n,r,o,i,a,u]=e;return[O1(t,o,r,n,i,a,u),ai.utcInstance]}function I9(e){const[,t,n,r,o,i,a,u]=e;return[O1(t,u,n,r,o,i,a),ai.utcInstance]}const x9=Ah(a9,P1),E9=Ah(s9,P1),C9=Ah(l9,P1),M9=Ah(vE),bE=Fh(h9,Oh,ig,ag),k9=Fh(u9,Oh,ig,ag),N9=Fh(c9,Oh,ig,ag),A9=Fh(Oh,ig,ag);function F9(e){return Ph(e,[x9,bE],[E9,k9],[C9,N9],[M9,A9])}function P9(e){return Ph(b9(e),[v9,w9])}function O9(e){return Ph(e,[S9,BD],[D9,BD],[T9,I9])}function j9(e){return Ph(e,[m9,g9])}const L9=Fh(Oh);function R9(e){return Ph(e,[p9,L9])}const _9=Ah(d9,f9),B9=Ah(wE),H9=Fh(Oh,ig,ag);function Y9(e){return Ph(e,[_9,bE],[B9,H9])}const U9="Invalid Duration",SE={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},z9={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...SE},Ma=146097/400,eh=146097/4800,V9={years:{quarters:4,months:12,weeks:Ma/7,days:Ma,hours:Ma*24,minutes:Ma*24*60,seconds:Ma*24*60*60,milliseconds:Ma*24*60*60*1e3},quarters:{months:3,weeks:Ma/28,days:Ma/4,hours:Ma*24/4,minutes:Ma*24*60/4,seconds:Ma*24*60*60/4,milliseconds:Ma*24*60*60*1e3/4},months:{weeks:eh/7,days:eh,hours:eh*24,minutes:eh*24*60,seconds:eh*24*60*60,milliseconds:eh*24*60*60*1e3},...SE},cd=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],W9=cd.slice(0).reverse();function Ju(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new wt(r)}function Z9(e){return e<0?Math.floor(e):Math.ceil(e)}function DE(e,t,n,r,o){const i=e[o][n],a=t[n]/i,u=Math.sign(a)===Math.sign(r[o]),d=!u&&r[o]!==0&&Math.abs(a)<=1?Z9(a):Math.trunc(a);r[o]+=d,t[n]-=d*i}function $9(e,t){W9.reduce((n,r)=>yn(t[r])?n:(n&&DE(e,t,n,t,r),r),null)}function q9(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class wt{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?V9:z9;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||Gn.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return wt.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new ka(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new wt({values:Tv(t,wt.normalizeUnit),loc:Gn.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(wd(t))return wt.fromMillis(t);if(wt.isDuration(t))return t;if(typeof t=="object")return wt.fromObject(t);throw new ka(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=j9(t);return r?wt.fromObject(r,n):wt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=R9(t);return r?wt.fromObject(r,n):wt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new ka("need to specify a reason the Duration is invalid");const r=t instanceof hs?t:new hs(t,n);if(Pr.throwOnInvalid)throw new D8(r);return new wt({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new Bx(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Ho.create(this.loc,r).formatDurationFromString(this,t):U9}toHuman(t={}){const n=cd.map(r=>{const o=this.values[r];return yn(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=N1(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();if(n<0||n>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t};const r=this.shiftTo("hours","minutes","seconds","milliseconds");let o=t.format==="basic"?"hhmm":"hh:mm";(!t.suppressSeconds||r.seconds!==0||r.milliseconds!==0)&&(o+=t.format==="basic"?"ss":":ss",(!t.suppressMilliseconds||r.milliseconds!==0)&&(o+=".SSS"));let i=r.toFormat(o);return t.includePrefix&&(i="T"+i),i}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=wt.fromDurationLike(t),r={};for(const o of cd)(ph(n.values,o)||ph(this.values,o))&&(r[o]=n.get(o)+this.get(o));return Ju(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=wt.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=sE(t(this.values[r],r));return Ju(this,{values:n},!0)}get(t){return this[wt.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...Tv(t,wt.normalizeUnit)};return Ju(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){const a={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:r};return Ju(this,a)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return $9(this.matrix,t),Ju(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=q9(this.normalize().shiftToAll().toObject());return Ju(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(a=>wt.normalizeUnit(a));const n={},r={},o=this.toObject();let i;for(const a of cd)if(t.indexOf(a)>=0){i=a;let u=0;for(const f in r)u+=this.matrix[f][a]*r[f],r[f]=0;wd(o[a])&&(u+=o[a]);const d=Math.trunc(u);n[a]=d,r[a]=(u*1e3-d*1e3)/1e3;for(const f in o)cd.indexOf(f)>cd.indexOf(a)&&DE(this.matrix,o,f,n,a)}else wd(o[a])&&(r[a]=o[a]);for(const a in r)r[a]!==0&&(n[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return Ju(this,{values:n},!0).normalize()}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Ju(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(const r of cd)if(!n(this.values[r],t.values[r]))return!1;return!0}}const th="Invalid Interval";function G9(e,t){return!e||!e.isValid?pr.invalid("missing or invalid start"):!t||!t.isValid?pr.invalid("missing or invalid end"):t<e?pr.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class pr{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new ka("need to specify a reason the Interval is invalid");const r=t instanceof hs?t:new hs(t,n);if(Pr.throwOnInvalid)throw new S8(r);return new pr({invalid:r})}static fromDateTimes(t,n){const r=om(t),o=om(n),i=G9(r,o);return i??new pr({start:r,end:o})}static after(t,n){const r=wt.fromDurationLike(n),o=om(t);return pr.fromDateTimes(o,o.plus(r))}static before(t,n){const r=wt.fromDurationLike(n),o=om(t);return pr.fromDateTimes(o.minus(r),o)}static fromISO(t,n){const[r,o]=(t||"").split("/",2);if(r&&o){let i,a;try{i=Mt.fromISO(r,n),a=i.isValid}catch{a=!1}let u,d;try{u=Mt.fromISO(o,n),d=u.isValid}catch{d=!1}if(a&&d)return pr.fromDateTimes(i,u);if(a){const f=wt.fromISO(o,n);if(f.isValid)return pr.after(i,f)}else if(d){const f=wt.fromISO(r,n);if(f.isValid)return pr.before(u,f)}}return pr.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds"){if(!this.isValid)return NaN;const n=this.start.startOf(t),r=this.end.startOf(t);return Math.floor(r.diff(n,t).get(t))+1}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?pr.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(om).filter(a=>this.contains(a)).sort(),r=[];let{s:o}=this,i=0;for(;o<this.e;){const a=n[i]||this.e,u=+a>+this.e?this.e:a;r.push(pr.fromDateTimes(o,u)),o=u,i+=1}return r}splitBy(t){const n=wt.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i;const a=[];for(;r<this.e;){const u=this.start.plus(n.mapUnits(d=>d*o));i=+u>+this.e?this.e:u,a.push(pr.fromDateTimes(r,i)),r=i,o+=1}return a}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:pr.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return pr.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[o,i.union(a)]:[o.concat([i]),a]:[o,a],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const o=[],i=t.map(d=>[{time:d.s,type:"s"},{time:d.e,type:"e"}]),a=Array.prototype.concat(...i),u=a.sort((d,f)=>d.time-f.time);for(const d of u)r+=d.type==="s"?1:-1,r===1?n=d.time:(n&&+n!=+d.time&&o.push(pr.fromDateTimes(n,d.time)),n=null);return pr.merge(o)}difference(...t){return pr.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:th}toLocaleString(t=bv,n={}){return this.isValid?Ho.create(this.s.loc.clone(n),t).formatInterval(this):th}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:th}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:th}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:th}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:th}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):wt.invalid(this.invalidReason)}mapEndpoints(t){return pr.fromDateTimes(t(this.s),t(this.e))}}class Ay{static hasDST(t=Pr.defaultZone){const n=Mt.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return tu.isValidZone(t)}static normalizeZone(t){return rc(t,Pr.defaultZone)}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||Gn.create(n,r,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||Gn.create(n,r,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||Gn.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||Gn.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Gn.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return Gn.create(n,null,"gregory").eras(t)}static features(){return{relative:iE()}}}function HD(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(wt.fromMillis(r).as("days"))}function J9(e,t,n){const r=[["years",(d,f)=>f.year-d.year],["quarters",(d,f)=>f.quarter-d.quarter+(f.year-d.year)*4],["months",(d,f)=>f.month-d.month+(f.year-d.year)*12],["weeks",(d,f)=>{const m=HD(d,f);return(m-m%7)/7}],["days",HD]],o={},i=e;let a,u;for(const[d,f]of r)n.indexOf(d)>=0&&(a=d,o[d]=f(e,t),u=i.plus(o),u>t?(o[d]--,e=i.plus(o)):e=u);return[e,o,u,a]}function K9(e,t,n,r){let[o,i,a,u]=J9(e,t,n);const d=t-o,f=n.filter(g=>["hours","minutes","seconds","milliseconds"].indexOf(g)>=0);f.length===0&&(a<t&&(a=o.plus({[u]:1})),a!==o&&(i[u]=(i[u]||0)+d/(a-o)));const m=wt.fromObject(i,r);return f.length>0?wt.fromMillis(d,r).shiftTo(...f).plus(m):m}const j1={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},YD={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Q9=j1.hanidec.replace(/[\[|\]]/g,"").split("");function X9(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(e[n].search(j1.hanidec)!==-1)t+=Q9.indexOf(e[n]);else for(const o in YD){const[i,a]=YD[o];r>=i&&r<=a&&(t+=r-i)}}return parseInt(t,10)}else return t}function ls({numberingSystem:e},t=""){return new RegExp(`${j1[e||"latn"]}${t}`)}const eF="missing Intl.DateTimeFormat.formatToParts support";function xn(e,t=n=>n){return{regex:e,deser:([n])=>t(X9(n))}}const tF=" ",TE=`[ ${tF}]`,IE=new RegExp(TE,"g");function nF(e){return e.replace(/\./g,"\\.?").replace(IE,TE)}function UD(e){return e.replace(/\./g,"").replace(IE," ").toLowerCase()}function us(e,t){return e===null?null:{regex:RegExp(e.map(nF).join("|")),deser:([n])=>e.findIndex(r=>UD(n)===UD(r))+t}}function zD(e,t){return{regex:e,deser:([,n,r])=>i0(n,r),groups:t}}function Yw(e){return{regex:e,deser:([t])=>t}}function rF(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function oF(e,t){const n=ls(t),r=ls(t,"{2}"),o=ls(t,"{3}"),i=ls(t,"{4}"),a=ls(t,"{6}"),u=ls(t,"{1,2}"),d=ls(t,"{1,3}"),f=ls(t,"{1,6}"),m=ls(t,"{1,9}"),g=ls(t,"{2,4}"),v=ls(t,"{4,6}"),w=I=>({regex:RegExp(rF(I.val)),deser:([k])=>k,literal:!0}),T=(I=>{if(e.literal)return w(I);switch(I.val){case"G":return us(t.eras("short",!1),0);case"GG":return us(t.eras("long",!1),0);case"y":return xn(f);case"yy":return xn(g,Bb);case"yyyy":return xn(i);case"yyyyy":return xn(v);case"yyyyyy":return xn(a);case"M":return xn(u);case"MM":return xn(r);case"MMM":return us(t.months("short",!0,!1),1);case"MMMM":return us(t.months("long",!0,!1),1);case"L":return xn(u);case"LL":return xn(r);case"LLL":return us(t.months("short",!1,!1),1);case"LLLL":return us(t.months("long",!1,!1),1);case"d":return xn(u);case"dd":return xn(r);case"o":return xn(d);case"ooo":return xn(o);case"HH":return xn(r);case"H":return xn(u);case"hh":return xn(r);case"h":return xn(u);case"mm":return xn(r);case"m":return xn(u);case"q":return xn(u);case"qq":return xn(r);case"s":return xn(u);case"ss":return xn(r);case"S":return xn(d);case"SSS":return xn(o);case"u":return Yw(m);case"uu":return Yw(u);case"uuu":return xn(n);case"a":return us(t.meridiems(),0);case"kkkk":return xn(i);case"kk":return xn(g,Bb);case"W":return xn(u);case"WW":return xn(r);case"E":case"c":return xn(n);case"EEE":return us(t.weekdays("short",!1,!1),1);case"EEEE":return us(t.weekdays("long",!1,!1),1);case"ccc":return us(t.weekdays("short",!0,!1),1);case"cccc":return us(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return zD(new RegExp(`([+-]${u.source})(?::(${r.source}))?`),2);case"ZZZ":return zD(new RegExp(`([+-]${u.source})(${r.source})?`),2);case"z":return Yw(/[a-z_+-/]{1,256}?/i);default:return w(I)}})(e)||{invalidReason:eF};return T.token=e,T}const iF={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function aF(e,t){const{type:n,value:r}=e;if(n==="literal")return{literal:!0,val:r};const o=t[n];let i=iF[n];if(typeof i=="object"&&(i=i[o]),i)return{literal:!1,val:i}}function sF(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function lF(e,t,n){const r=e.match(t);if(r){const o={};let i=1;for(const a in n)if(ph(n,a)){const u=n[a],d=u.groups?u.groups+1:1;!u.literal&&u.token&&(o[u.token.val[0]]=u.deser(r.slice(i,i+d))),i+=d}return[r,o]}else return[r,{}]}function uF(e){const t=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return yn(e.z)||(n=tu.create(e.z)),yn(e.Z)||(n||(n=new ai(e.Z)),r=e.Z),yn(e.q)||(e.M=(e.q-1)*3+1),yn(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),yn(e.u)||(e.S=k1(e.u)),[Object.keys(e).reduce((i,a)=>{const u=t(a);return u&&(i[u]=e[a]),i},{}),n,r]}let Uw=null;function cF(){return Uw||(Uw=Mt.fromMillis(1555555555555)),Uw}function dF(e,t){if(e.literal)return e;const n=Ho.macroTokenToFormatOpts(e.val),r=CE(n,t);return r==null||r.includes(void 0)?e:r}function xE(e,t){return Array.prototype.concat(...e.map(n=>dF(n,t)))}function EE(e,t,n){const r=xE(Ho.parseFormat(n),e),o=r.map(a=>oF(a,e)),i=o.find(a=>a.invalidReason);if(i)return{input:t,tokens:r,invalidReason:i.invalidReason};{const[a,u]=sF(o),d=RegExp(a,"i"),[f,m]=lF(t,d,u),[g,v,w]=m?uF(m):[null,null,void 0];if(ph(m,"a")&&ph(m,"H"))throw new pm("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:d,rawMatches:f,matches:m,result:g,zone:v,specificOffset:w}}}function fF(e,t,n){const{result:r,zone:o,specificOffset:i,invalidReason:a}=EE(e,t,n);return[r,o,i,a]}function CE(e,t){return e?Ho.create(t,e).formatDateTimeParts(cF()).map(o=>aF(o,e)):null}const ME=[0,31,59,90,120,151,181,212,243,273,304,334],kE=[0,31,60,91,121,152,182,213,244,274,305,335];function Na(e,t){return new hs("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function NE(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return o===0?7:o}function AE(e,t,n){return n+(og(e)?kE:ME)[t-1]}function FE(e,t){const n=og(e)?kE:ME,r=n.findIndex(i=>i<t),o=t-n[r];return{month:r+1,day:o}}function Hb(e){const{year:t,month:n,day:r}=e,o=AE(t,n,r),i=NE(t,n,r);let a=Math.floor((o-i+10)/7),u;return a<1?(u=t-1,a=Dv(u)):a>Dv(t)?(u=t+1,a=1):u=t,{weekYear:u,weekNumber:a,weekday:i,...a0(e)}}function VD(e){const{weekYear:t,weekNumber:n,weekday:r}=e,o=NE(t,1,4),i=wm(t);let a=n*7+r-o-3,u;a<1?(u=t-1,a+=wm(u)):a>i?(u=t+1,a-=wm(t)):u=t;const{month:d,day:f}=FE(u,a);return{year:u,month:d,day:f,...a0(e)}}function zw(e){const{year:t,month:n,day:r}=e,o=AE(t,n,r);return{year:t,ordinal:o,...a0(e)}}function WD(e){const{year:t,ordinal:n}=e,{month:r,day:o}=FE(t,n);return{year:t,month:r,day:o,...a0(e)}}function hF(e){const t=o0(e.weekYear),n=eu(e.weekNumber,1,Dv(e.weekYear)),r=eu(e.weekday,1,7);return t?n?r?!1:Na("weekday",e.weekday):Na("week",e.week):Na("weekYear",e.weekYear)}function pF(e){const t=o0(e.year),n=eu(e.ordinal,1,wm(e.year));return t?n?!1:Na("ordinal",e.ordinal):Na("year",e.year)}function PE(e){const t=o0(e.year),n=eu(e.month,1,12),r=eu(e.day,1,Sv(e.year,e.month));return t?n?r?!1:Na("day",e.day):Na("month",e.month):Na("year",e.year)}function OE(e){const{hour:t,minute:n,second:r,millisecond:o}=e,i=eu(t,0,23)||t===24&&n===0&&r===0&&o===0,a=eu(n,0,59),u=eu(r,0,59),d=eu(o,0,999);return i?a?u?d?!1:Na("millisecond",o):Na("second",r):Na("minute",n):Na("hour",t)}const Vw="Invalid DateTime",ZD=864e13;function Fy(e){return new hs("unsupported zone",`the zone "${e.name}" is not supported`)}function Ww(e){return e.weekData===null&&(e.weekData=Hb(e.c)),e.weekData}function nm(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Mt({...n,...t,old:n})}function jE(e,t,n){let r=e-t*60*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=(o-t)*60*1e3;const i=n.offset(r);return o===i?[r,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function $D(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function ov(e,t,n){return jE(A1(e),t,n)}function qD(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:r,month:o,day:Math.min(e.c.day,Sv(r,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},a=wt.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),u=A1(i);let[d,f]=jE(u,n,e.zone);return a!==0&&(d+=a,f=e.zone.offset(d)),{ts:d,o:f}}function rm(e,t,n,r,o,i){const{setZone:a,zone:u}=n;if(e&&Object.keys(e).length!==0){const d=t||u,f=Mt.fromObject(e,{...n,zone:d,specificOffset:i});return a?f:f.setZone(u)}else return Mt.invalid(new hs("unparsable",`the input "${o}" can't be parsed as ${r}`))}function Py(e,t,n=!0){return e.isValid?Ho.create(Gn.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Zw(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Or(e.c.year,n?6:4),t?(r+="-",r+=Or(e.c.month),r+="-",r+=Or(e.c.day)):(r+=Or(e.c.month),r+=Or(e.c.day)),r}function GD(e,t,n,r,o,i){let a=Or(e.c.hour);return t?(a+=":",a+=Or(e.c.minute),(e.c.second!==0||!n)&&(a+=":")):a+=Or(e.c.minute),(e.c.second!==0||!n)&&(a+=Or(e.c.second),(e.c.millisecond!==0||!r)&&(a+=".",a+=Or(e.c.millisecond,3))),o&&(e.isOffsetFixed&&e.offset===0&&!i?a+="Z":e.o<0?(a+="-",a+=Or(Math.trunc(-e.o/60)),a+=":",a+=Or(Math.trunc(-e.o%60))):(a+="+",a+=Or(Math.trunc(e.o/60)),a+=":",a+=Or(Math.trunc(e.o%60)))),i&&(a+="["+e.zone.ianaName+"]"),a}const LE={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},mF={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},gF={ordinal:1,hour:0,minute:0,second:0,millisecond:0},RE=["year","month","day","hour","minute","second","millisecond"],yF=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],vF=["year","ordinal","hour","minute","second","millisecond"];function JD(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new Bx(e);return t}function KD(e,t){const n=rc(t.zone,Pr.defaultZone),r=Gn.fromObject(t),o=Pr.now();let i,a;if(yn(e.year))i=o;else{for(const f of RE)yn(e[f])&&(e[f]=LE[f]);const u=PE(e)||OE(e);if(u)return Mt.invalid(u);const d=n.offset(o);[i,a]=ov(e,d,n)}return new Mt({ts:i,zone:n,loc:r,o:a})}function QD(e,t,n){const r=yn(n.round)?!0:n.round,o=(a,u)=>(a=N1(a,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(a,u)),i=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return o(i(n.unit),n.unit);for(const a of n.units){const u=i(a);if(Math.abs(u)>=1)return o(u,a)}return o(e>t?-0:0,n.units[n.units.length-1])}function XD(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}class Mt{constructor(t){const n=t.zone||Pr.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new hs("invalid input"):null)||(n.isValid?null:Fy(n));this.ts=yn(t.ts)?Pr.now():t.ts;let o=null,i=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const u=n.offset(this.ts);o=$D(this.ts,u),r=Number.isNaN(o.year)?new hs("invalid input"):null,o=r?null:o,i=r?null:u}this._zone=n,this.loc=t.loc||Gn.create(),this.invalid=r,this.weekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new Mt({})}static local(){const[t,n]=XD(arguments),[r,o,i,a,u,d,f]=n;return KD({year:r,month:o,day:i,hour:a,minute:u,second:d,millisecond:f},t)}static utc(){const[t,n]=XD(arguments),[r,o,i,a,u,d,f]=n;return t.zone=ai.utcInstance,KD({year:r,month:o,day:i,hour:a,minute:u,second:d,millisecond:f},t)}static fromJSDate(t,n={}){const r=z8(t)?t.valueOf():NaN;if(Number.isNaN(r))return Mt.invalid("invalid input");const o=rc(n.zone,Pr.defaultZone);return o.isValid?new Mt({ts:r,zone:o,loc:Gn.fromObject(n)}):Mt.invalid(Fy(o))}static fromMillis(t,n={}){if(wd(t))return t<-ZD||t>ZD?Mt.invalid("Timestamp out of range"):new Mt({ts:t,zone:rc(n.zone,Pr.defaultZone),loc:Gn.fromObject(n)});throw new ka(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(wd(t))return new Mt({ts:t*1e3,zone:rc(n.zone,Pr.defaultZone),loc:Gn.fromObject(n)});throw new ka("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=rc(n.zone,Pr.defaultZone);if(!r.isValid)return Mt.invalid(Fy(r));const o=Pr.now(),i=yn(n.specificOffset)?r.offset(o):n.specificOffset,a=Tv(t,JD),u=!yn(a.ordinal),d=!yn(a.year),f=!yn(a.month)||!yn(a.day),m=d||f,g=a.weekYear||a.weekNumber,v=Gn.fromObject(n);if((m||u)&&g)throw new pm("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&u)throw new pm("Can't mix ordinal dates with month/day");const w=g||a.weekday&&!m;let D,T,I=$D(o,i);w?(D=yF,T=mF,I=Hb(I)):u?(D=vF,T=gF,I=zw(I)):(D=RE,T=LE);let k=!1;for(const U of D){const z=a[U];yn(z)?k?a[U]=T[U]:a[U]=I[U]:k=!0}const A=w?hF(a):u?pF(a):PE(a),R=A||OE(a);if(R)return Mt.invalid(R);const j=w?VD(a):u?WD(a):a,[B,L]=ov(j,i,r),Z=new Mt({ts:B,zone:r,o:L,loc:v});return a.weekday&&m&&t.weekday!==Z.weekday?Mt.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${Z.toISO()}`):Z}static fromISO(t,n={}){const[r,o]=F9(t);return rm(r,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,o]=P9(t);return rm(r,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,o]=O9(t);return rm(r,o,n,"HTTP",n)}static fromFormat(t,n,r={}){if(yn(t)||yn(n))throw new ka("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=r,a=Gn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[u,d,f,m]=fF(a,t,n);return m?Mt.invalid(m):rm(u,d,r,`format ${n}`,t,f)}static fromString(t,n,r={}){return Mt.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,o]=Y9(t);return rm(r,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new ka("need to specify a reason the DateTime is invalid");const r=t instanceof hs?t:new hs(t,n);if(Pr.throwOnInvalid)throw new b8(r);return new Mt({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=CE(t,Gn.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return xE(Ho.parseFormat(t),Gn.fromObject(n)).map(o=>o.val).join("")}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ww(this).weekYear:NaN}get weekNumber(){return this.isValid?Ww(this).weekNumber:NaN}get weekday(){return this.isValid?Ww(this).weekday:NaN}get ordinal(){return this.isValid?zw(this.c).ordinal:NaN}get monthShort(){return this.isValid?Ay.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Ay.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Ay.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Ay.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return og(this.year)}get daysInMonth(){return Sv(this.year,this.month)}get daysInYear(){return this.isValid?wm(this.year):NaN}get weeksInWeekYear(){return this.isValid?Dv(this.weekYear):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:o}=Ho.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(ai.instance(t),n)}toLocal(){return this.setZone(Pr.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=rc(t,Pr.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||r){const i=t.offset(this.ts),a=this.toObject();[o]=ov(a,i,t)}return nm(this,{ts:o,zone:t})}else return Mt.invalid(Fy(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return nm(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=Tv(t,JD),r=!yn(n.weekYear)||!yn(n.weekNumber)||!yn(n.weekday),o=!yn(n.ordinal),i=!yn(n.year),a=!yn(n.month)||!yn(n.day),u=i||a,d=n.weekYear||n.weekNumber;if((u||o)&&d)throw new pm("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&o)throw new pm("Can't mix ordinal dates with month/day");let f;r?f=VD({...Hb(this.c),...n}):yn(n.ordinal)?(f={...this.toObject(),...n},yn(n.day)&&(f.day=Math.min(Sv(f.year,f.month),f.day))):f=WD({...zw(this.c),...n});const[m,g]=ov(f,this.o,this.zone);return nm(this,{ts:m,o:g})}plus(t){if(!this.isValid)return this;const n=wt.fromDurationLike(t);return nm(this,qD(this,n))}minus(t){if(!this.isValid)return this;const n=wt.fromDurationLike(t).negate();return nm(this,qD(this,n))}startOf(t){if(!this.isValid)return this;const n={},r=wt.normalizeUnit(t);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(r==="weeks"&&(n.weekday=1),r==="quarters"){const o=Math.ceil(this.month/3);n.month=(o-1)*3+1}return this.set(n)}endOf(t){return this.isValid?this.plus({[t]:1}).startOf(t).minus(1):this}toFormat(t,n={}){return this.isValid?Ho.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):Vw}toLocaleString(t=bv,n={}){return this.isValid?Ho.create(this.loc.clone(n),t).formatDateTime(this):Vw}toLocaleParts(t={}){return this.isValid?Ho.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:o=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const a=t==="extended";let u=Zw(this,a);return u+="T",u+=GD(this,a,n,r,o,i),u}toISODate({format:t="extended"}={}){return this.isValid?Zw(this,t==="extended"):null}toISOWeekDate(){return Py(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:o=!1,extendedZone:i=!1,format:a="extended"}={}){return this.isValid?(o?"T":"")+GD(this,a==="extended",n,t,r,i):null}toRFC2822(){return Py(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Py(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Zw(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let o="HH:mm:ss.SSS";return(n||t)&&(r&&(o+=" "),n?o+="z":t&&(o+="ZZ")),Py(this,o,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():Vw}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return wt.invalid("created by diffing an invalid DateTime");const o={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=V8(n).map(wt.normalizeUnit),a=t.valueOf()>this.valueOf(),u=a?this:t,d=a?t:this,f=K9(u,d,i,o);return a?f.negate():f}diffNow(t="milliseconds",n={}){return this.diff(Mt.now(),t,n)}until(t){return this.isValid?pr.fromDateTimes(this,t):this}hasSame(t,n){if(!this.isValid)return!1;const r=t.valueOf(),o=this.setZone(t.zone,{keepLocalTime:!0});return o.startOf(n)<=r&&r<=o.endOf(n)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||Mt.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;let o=["years","months","days","hours","minutes","seconds"],i=t.unit;return Array.isArray(t.unit)&&(o=t.unit,i=void 0),QD(n,this.plus(r),{...t,numeric:"always",units:o,unit:i})}toRelativeCalendar(t={}){return this.isValid?QD(t.base||Mt.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(Mt.isDateTime))throw new ka("min requires all arguments be DateTimes");return RD(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(Mt.isDateTime))throw new ka("max requires all arguments be DateTimes");return RD(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:o=null,numberingSystem:i=null}=r,a=Gn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return EE(a,t,n)}static fromStringExplain(t,n,r={}){return Mt.fromFormatExplain(t,n,r)}static get DATE_SHORT(){return bv}static get DATE_MED(){return Hx}static get DATE_MED_WITH_WEEKDAY(){return T8}static get DATE_FULL(){return Yx}static get DATE_HUGE(){return Ux}static get TIME_SIMPLE(){return zx}static get TIME_WITH_SECONDS(){return Vx}static get TIME_WITH_SHORT_OFFSET(){return Wx}static get TIME_WITH_LONG_OFFSET(){return Zx}static get TIME_24_SIMPLE(){return $x}static get TIME_24_WITH_SECONDS(){return qx}static get TIME_24_WITH_SHORT_OFFSET(){return Gx}static get TIME_24_WITH_LONG_OFFSET(){return Jx}static get DATETIME_SHORT(){return Kx}static get DATETIME_SHORT_WITH_SECONDS(){return Qx}static get DATETIME_MED(){return Xx}static get DATETIME_MED_WITH_SECONDS(){return eE}static get DATETIME_MED_WITH_WEEKDAY(){return I8}static get DATETIME_FULL(){return tE}static get DATETIME_FULL_WITH_SECONDS(){return nE}static get DATETIME_HUGE(){return rE}static get DATETIME_HUGE_WITH_SECONDS(){return oE}}function om(e){if(Mt.isDateTime(e))return e;if(e&&e.valueOf&&wd(e.valueOf()))return Mt.fromJSDate(e);if(e&&typeof e=="object")return Mt.fromObject(e);throw new ka(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const L1={renderNullAs:"\\-",taskCompletionTracking:!1,taskCompletionUseEmojiShorthand:!1,taskCompletionText:"completion",taskCompletionDateFormat:"yyyy-MM-dd",recursiveSubTaskCompletion:!1,warnOnEmptyResult:!0,refreshEnabled:!0,refreshInterval:2500,defaultDateFormat:"MMMM dd, yyyy",defaultDateTimeFormat:"h:mm a - MMMM dd, yyyy",maxRecursiveRenderDepth:4,tableIdColumnName:"File",tableGroupColumnName:"Group",showResultCount:!0},wF={allowHtml:!0};({...L1,...wF});class R1{constructor(t){this.value=t,this.successful=!0}map(t){return new R1(t(this.value))}flatMap(t){return t(this.value)}mapErr(t){return this}bimap(t,n){return this.map(t)}orElse(t){return this.value}cast(){return this}orElseThrow(t){return this.value}}class _1{constructor(t){this.error=t,this.successful=!1}map(t){return this}flatMap(t){return this}mapErr(t){return new _1(t(this.error))}bimap(t,n){return this.mapErr(n)}orElse(t){return t}cast(){return this}orElseThrow(t){throw t?new Error(t(this.error)):new Error(""+this.error)}}var Iv;(function(e){function t(i){return new R1(i)}e.success=t;function n(i){return new _1(i)}e.failure=n;function r(i,a,u){return i.successful?a.successful?u(i.value,a.value):n(a.error):n(i.error)}e.flatMap2=r;function o(i,a,u){return r(i,a,(d,f)=>t(u(d,f)))}e.map2=o})(Iv||(Iv={}));var bF=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Vr<"u"?Vr:typeof self<"u"?self:{},me={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof self<"u"?self:bF,function(){return function(n){var r={};function o(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return n[i].call(a.exports,a,a.exports,o),a.l=!0,a.exports}return o.m=n,o.c=r,o.d=function(i,a,u){o.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:u})},o.r=function(i){Object.defineProperty(i,"__esModule",{value:!0})},o.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(a,"a",a),a},o.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},o.p="",o(o.s=0)}([function(n,r,o){function i(ne){if(!(this instanceof i))return new i(ne);this._=ne}var a=i.prototype;function u(ne,ge){for(var Ae=0;Ae<ne;Ae++)ge(Ae)}function d(ne,ge,Ae){return function(He,Ye){u(Ye.length,function(et){He(Ye[et],et,Ye)})}(function(He,Ye,et){ge=ne(ge,He,Ye,et)},Ae),ge}function f(ne,ge){return d(function(Ae,He,Ye,et){return Ae.concat([ne(He,Ye,et)])},[],ge)}function m(ne,ge){var Ae={v:0,buf:ge};return u(ne,function(){var He;Ae={v:Ae.v<<1|(He=Ae.buf,He[0]>>7),buf:function(Ye){var et=d(function(nt,kt,en,jn){return nt.concat(en===jn.length-1?Buffer.from([kt,0]).readUInt16BE(0):jn.readUInt16BE(en))},[],Ye);return Buffer.from(f(function(nt){return(nt<<1&65535)>>8},et))}(Ae.buf)}}),Ae}function g(){return typeof Buffer<"u"}function v(){if(!g())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function w(ne){v();var ge=d(function(et,nt){return et+nt},0,ne);if(ge%8!=0)throw new Error("The bits ["+ne.join(", ")+"] add up to "+ge+" which is not an even number of bytes; the total should be divisible by 8");var Ae,He=ge/8,Ye=(Ae=function(et){return et>48},d(function(et,nt){return et||(Ae(nt)?nt:et)},null,ne));if(Ye)throw new Error(Ye+" bit range requested exceeds 48 bit (6 byte) Number max.");return new i(function(et,nt){var kt=He+nt;return kt>et.length?U(nt,He.toString()+" bytes"):Z(kt,d(function(en,jn){var wn=m(jn,en.buf);return{coll:en.coll.concat(wn.v),buf:wn.buf}},{coll:[],buf:et.slice(nt,kt)},ne).coll)})}function D(ne,ge){return new i(function(Ae,He){return v(),He+ge>Ae.length?U(He,ge+" bytes for "+ne):Z(He+ge,Ae.slice(He,He+ge))})}function T(ne,ge){if(typeof(Ae=ge)!="number"||Math.floor(Ae)!==Ae||ge<0||ge>6)throw new Error(ne+" requires integer length in range [0, 6].");var Ae}function I(ne){return T("uintBE",ne),D("uintBE("+ne+")",ne).map(function(ge){return ge.readUIntBE(0,ne)})}function k(ne){return T("uintLE",ne),D("uintLE("+ne+")",ne).map(function(ge){return ge.readUIntLE(0,ne)})}function A(ne){return T("intBE",ne),D("intBE("+ne+")",ne).map(function(ge){return ge.readIntBE(0,ne)})}function R(ne){return T("intLE",ne),D("intLE("+ne+")",ne).map(function(ge){return ge.readIntLE(0,ne)})}function j(ne){return ne instanceof i}function B(ne){return{}.toString.call(ne)==="[object Array]"}function L(ne){return g()&&Buffer.isBuffer(ne)}function Z(ne,ge){return{status:!0,index:ne,value:ge,furthest:-1,expected:[]}}function U(ne,ge){return B(ge)||(ge=[ge]),{status:!1,index:-1,value:null,furthest:ne,expected:ge}}function z(ne,ge){if(!ge||ne.furthest>ge.furthest)return ne;var Ae=ne.furthest===ge.furthest?function(He,Ye){if(function(){if(i._supportsSet!==void 0)return i._supportsSet;var rr=typeof Set<"u";return i._supportsSet=rr,rr}()&&Array.from){for(var et=new Set(He),nt=0;nt<Ye.length;nt++)et.add(Ye[nt]);var kt=Array.from(et);return kt.sort(),kt}for(var en={},jn=0;jn<He.length;jn++)en[He[jn]]=!0;for(var wn=0;wn<Ye.length;wn++)en[Ye[wn]]=!0;var Lr=[];for(var _n in en)({}).hasOwnProperty.call(en,_n)&&Lr.push(_n);return Lr.sort(),Lr}(ne.expected,ge.expected):ge.expected;return{status:ne.status,index:ne.index,value:ne.value,furthest:ge.furthest,expected:Ae}}var $={};function te(ne,ge){if(L(ne))return{offset:ge,line:-1,column:-1};ne in $||($[ne]={});for(var Ae=$[ne],He=0,Ye=0,et=0,nt=ge;nt>=0;){if(nt in Ae){He=Ae[nt].line,et===0&&(et=Ae[nt].lineStart);break}(ne.charAt(nt)===`
|
|
|
`||ne.charAt(nt)==="\r"&&ne.charAt(nt+1)!==`
|
|
|
`)&&(Ye++,et===0&&(et=nt+1)),nt--}var kt=He+Ye,en=ge-et;return Ae[ge]={line:kt,lineStart:et},{offset:ge,line:kt+1,column:en+1}}function Q(ne){if(!j(ne))throw new Error("not a parser: "+ne)}function ue(ne,ge){return typeof ne=="string"?ne.charAt(ge):ne[ge]}function ee(ne){if(typeof ne!="number")throw new Error("not a number: "+ne)}function le(ne){if(typeof ne!="function")throw new Error("not a function: "+ne)}function W(ne){if(typeof ne!="string")throw new Error("not a string: "+ne)}var de=2,oe=3,he=8,K=5*he,re=4*he,pe=" ";function Ie(ne,ge){return new Array(ge+1).join(ne)}function Oe(ne,ge,Ae){var He=ge-ne.length;return He<=0?ne:Ie(Ae,He)+ne}function Ne(ne,ge,Ae,He){return{from:ne-ge>0?ne-ge:0,to:ne+Ae>He?He:ne+Ae}}function Be(ne,ge){var Ae,He,Ye,et,nt,kt=ge.index,en=kt.offset,jn=1;if(en===ne.length)return"Got the end of the input";if(L(ne)){var wn=en-en%he,Lr=en-wn,_n=Ne(wn,K,re+he,ne.length),rr=f(function(bn){return f(function(co){return Oe(co.toString(16),2,"0")},bn)},function(bn,co){var fo=bn.length,Mr=[],zo=0;if(fo<=co)return[bn.slice()];for(var ho=0;ho<fo;ho++)Mr[zo]||Mr.push([]),Mr[zo].push(bn[ho]),(ho+1)%co==0&&zo++;return Mr}(ne.slice(_n.from,_n.to).toJSON().data,he));et=function(bn){return bn.from===0&&bn.to===1?{from:bn.from,to:bn.to}:{from:bn.from/he,to:Math.floor(bn.to/he)}}(_n),He=wn/he,Ae=3*Lr,Lr>=4&&(Ae+=1),jn=2,Ye=f(function(bn){return bn.length<=4?bn.join(" "):bn.slice(0,4).join(" ")+" "+bn.slice(4).join(" ")},rr),(nt=(8*(et.to>0?et.to-1:et.to)).toString(16).length)<2&&(nt=2)}else{var Rr=ne.split(/\r\n|[\n\r\u2028\u2029]/);Ae=kt.column-1,He=kt.line-1,et=Ne(He,de,oe,Rr.length),Ye=Rr.slice(et.from,et.to),nt=et.to.toString().length}var ca=He-et.from;return L(ne)&&(nt=(8*(et.to>0?et.to-1:et.to)).toString(16).length)<2&&(nt=2),d(function(bn,co,fo){var Mr,zo=fo===ca,ho=zo?"> ":pe;return Mr=L(ne)?Oe((8*(et.from+fo)).toString(16),nt,"0"):Oe((et.from+fo+1).toString(),nt," "),[].concat(bn,[ho+Mr+" | "+co],zo?[pe+Ie(" ",nt)+" | "+Oe("",Ae," ")+Ie("^",jn)]:[])},[],Ye).join(`
|
|
|
`)}function Je(ne,ge){return[`
|
|
|
`,"-- PARSING FAILED "+Ie("-",50),`
|
|
|
|
|
|
`,Be(ne,ge),`
|
|
|
|
|
|
`,(Ae=ge.expected,Ae.length===1?`Expected:
|
|
|
|
|
|
`+Ae[0]:`Expected one of the following:
|
|
|
|
|
|
`+Ae.join(", ")),`
|
|
|
`].join("");var Ae}function ze(ne){return ne.flags!==void 0?ne.flags:[ne.global?"g":"",ne.ignoreCase?"i":"",ne.multiline?"m":"",ne.unicode?"u":"",ne.sticky?"y":""].join("")}function Qe(){for(var ne=[].slice.call(arguments),ge=ne.length,Ae=0;Ae<ge;Ae+=1)Q(ne[Ae]);return i(function(He,Ye){for(var et,nt=new Array(ge),kt=0;kt<ge;kt+=1){if(!(et=z(ne[kt]._(He,Ye),et)).status)return et;nt[kt]=et.value,Ye=et.index}return z(Z(Ye,nt),et)})}function It(){var ne=[].slice.call(arguments);if(ne.length===0)throw new Error("seqMap needs at least one argument");var ge=ne.pop();return le(ge),Qe.apply(null,ne).map(function(Ae){return ge.apply(null,Ae)})}function Zt(){var ne=[].slice.call(arguments),ge=ne.length;if(ge===0)return Tt("zero alternates");for(var Ae=0;Ae<ge;Ae+=1)Q(ne[Ae]);return i(function(He,Ye){for(var et,nt=0;nt<ne.length;nt+=1)if((et=z(ne[nt]._(He,Ye),et)).status)return et;return et})}function Re(ne,ge){return tt(ne,ge).or(Et([]))}function tt(ne,ge){return Q(ne),Q(ge),It(ne,ge.then(ne).many(),function(Ae,He){return[Ae].concat(He)})}function at(ne){W(ne);var ge="'"+ne+"'";return i(function(Ae,He){var Ye=He+ne.length,et=Ae.slice(He,Ye);return et===ne?Z(Ye,et):U(He,ge)})}function gt(ne,ge){(function(Ye){if(!(Ye instanceof RegExp))throw new Error("not a regexp: "+Ye);for(var et=ze(Ye),nt=0;nt<et.length;nt++){var kt=et.charAt(nt);if(kt!=="i"&&kt!=="m"&&kt!=="u"&&kt!=="s")throw new Error('unsupported regexp flag "'+kt+'": '+Ye)}})(ne),arguments.length>=2?ee(ge):ge=0;var Ae=function(Ye){return RegExp("^(?:"+Ye.source+")",ze(Ye))}(ne),He=""+ne;return i(function(Ye,et){var nt=Ae.exec(Ye.slice(et));if(nt){if(0<=ge&&ge<=nt.length){var kt=nt[0],en=nt[ge];return Z(et+kt.length,en)}return U(et,"valid match group (0 to "+nt.length+") in "+He)}return U(et,He)})}function Et(ne){return i(function(ge,Ae){return Z(Ae,ne)})}function Tt(ne){return i(function(ge,Ae){return U(Ae,ne)})}function qt(ne){if(j(ne))return i(function(ge,Ae){var He=ne._(ge,Ae);return He.index=Ae,He.value="",He});if(typeof ne=="string")return qt(at(ne));if(ne instanceof RegExp)return qt(gt(ne));throw new Error("not a string, regexp, or parser: "+ne)}function zt(ne){return Q(ne),i(function(ge,Ae){var He=ne._(ge,Ae),Ye=ge.slice(Ae,He.index);return He.status?U(Ae,'not "'+Ye+'"'):Z(Ae,null)})}function $t(ne){return le(ne),i(function(ge,Ae){var He=ue(ge,Ae);return Ae<ge.length&&ne(He)?Z(Ae+1,He):U(Ae,"a character/byte matching "+ne)})}function Gt(ne,ge){arguments.length<2&&(ge=ne,ne=void 0);var Ae=i(function(He,Ye){return Ae._=ge()._,Ae._(He,Ye)});return ne?Ae.desc(ne):Ae}function cn(){return Tt("fantasy-land/empty")}a.parse=function(ne){if(typeof ne!="string"&&!L(ne))throw new Error(".parse must be called with a string or Buffer as its argument");var ge,Ae=this.skip(Cr)._(ne,0);return ge=Ae.status?{status:!0,value:Ae.value}:{status:!1,index:te(ne,Ae.furthest),expected:Ae.expected},delete $[ne],ge},a.tryParse=function(ne){var ge=this.parse(ne);if(ge.status)return ge.value;var Ae=Je(ne,ge),He=new Error(Ae);throw He.type="ParsimmonError",He.result=ge,He},a.assert=function(ne,ge){return this.chain(function(Ae){return ne(Ae)?Et(Ae):Tt(ge)})},a.or=function(ne){return Zt(this,ne)},a.trim=function(ne){return this.wrap(ne,ne)},a.wrap=function(ne,ge){return It(ne,this,ge,function(Ae,He){return He})},a.thru=function(ne){return ne(this)},a.then=function(ne){return Q(ne),Qe(this,ne).map(function(ge){return ge[1]})},a.many=function(){var ne=this;return i(function(ge,Ae){for(var He=[],Ye=void 0;;){if(!(Ye=z(ne._(ge,Ae),Ye)).status)return z(Z(Ae,He),Ye);if(Ae===Ye.index)throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");Ae=Ye.index,He.push(Ye.value)}})},a.tieWith=function(ne){return W(ne),this.map(function(ge){if(function(Ye){if(!B(Ye))throw new Error("not an array: "+Ye)}(ge),ge.length){W(ge[0]);for(var Ae=ge[0],He=1;He<ge.length;He++)W(ge[He]),Ae+=ne+ge[He];return Ae}return""})},a.tie=function(){return this.tieWith("")},a.times=function(ne,ge){var Ae=this;return arguments.length<2&&(ge=ne),ee(ne),ee(ge),i(function(He,Ye){for(var et=[],nt=void 0,kt=void 0,en=0;en<ne;en+=1){if(kt=z(nt=Ae._(He,Ye),kt),!nt.status)return kt;Ye=nt.index,et.push(nt.value)}for(;en<ge&&(kt=z(nt=Ae._(He,Ye),kt),nt.status);en+=1)Ye=nt.index,et.push(nt.value);return z(Z(Ye,et),kt)})},a.result=function(ne){return this.map(function(){return ne})},a.atMost=function(ne){return this.times(0,ne)},a.atLeast=function(ne){return It(this.times(ne),this.many(),function(ge,Ae){return ge.concat(Ae)})},a.map=function(ne){le(ne);var ge=this;return i(function(Ae,He){var Ye=ge._(Ae,He);return Ye.status?z(Z(Ye.index,ne(Ye.value)),Ye):Ye})},a.contramap=function(ne){le(ne);var ge=this;return i(function(Ae,He){var Ye=ge.parse(ne(Ae.slice(He)));return Ye.status?Z(He+Ae.length,Ye.value):Ye})},a.promap=function(ne,ge){return le(ne),le(ge),this.contramap(ne).map(ge)},a.skip=function(ne){return Qe(this,ne).map(function(ge){return ge[0]})},a.mark=function(){return It(Xt,this,Xt,function(ne,ge,Ae){return{start:ne,value:ge,end:Ae}})},a.node=function(ne){return It(Xt,this,Xt,function(ge,Ae,He){return{name:ne,value:Ae,start:ge,end:He}})},a.sepBy=function(ne){return Re(this,ne)},a.sepBy1=function(ne){return tt(this,ne)},a.lookahead=function(ne){return this.skip(qt(ne))},a.notFollowedBy=function(ne){return this.skip(zt(ne))},a.desc=function(ne){B(ne)||(ne=[ne]);var ge=this;return i(function(Ae,He){var Ye=ge._(Ae,He);return Ye.status||(Ye.expected=ne),Ye})},a.fallback=function(ne){return this.or(Et(ne))},a.ap=function(ne){return It(ne,this,function(ge,Ae){return ge(Ae)})},a.chain=function(ne){var ge=this;return i(function(Ae,He){var Ye=ge._(Ae,He);return Ye.status?z(ne(Ye.value)._(Ae,Ye.index),Ye):Ye})},a.concat=a.or,a.empty=cn,a.of=Et,a["fantasy-land/ap"]=a.ap,a["fantasy-land/chain"]=a.chain,a["fantasy-land/concat"]=a.concat,a["fantasy-land/empty"]=a.empty,a["fantasy-land/of"]=a.of,a["fantasy-land/map"]=a.map;var Xt=i(function(ne,ge){return Z(ge,te(ne,ge))}),Qn=i(function(ne,ge){return ge>=ne.length?U(ge,"any character/byte"):Z(ge+1,ue(ne,ge))}),En=i(function(ne,ge){return Z(ne.length,ne.slice(ge))}),Cr=i(function(ne,ge){return ge<ne.length?U(ge,"EOF"):Z(ge,null)}),yr=gt(/[0-9]/).desc("a digit"),Rn=gt(/[0-9]*/).desc("optional digits"),ji=gt(/[a-z]/i).desc("a letter"),xo=gt(/[a-z]*/i).desc("optional letters"),Uo=gt(/\s*/).desc("optional whitespace"),Li=gt(/\s+/).desc("whitespace"),Eo=at("\r"),Ri=at(`
|
|
|
`),ua=at(`\r
|
|
|
`),ui=Zt(ua,Ri,Eo).desc("newline"),_i=Zt(ui,Cr);i.all=En,i.alt=Zt,i.any=Qn,i.cr=Eo,i.createLanguage=function(ne){var ge={};for(var Ae in ne)({}).hasOwnProperty.call(ne,Ae)&&function(He){ge[He]=Gt(function(){return ne[He](ge)})}(Ae);return ge},i.crlf=ua,i.custom=function(ne){return i(ne(Z,U))},i.digit=yr,i.digits=Rn,i.empty=cn,i.end=_i,i.eof=Cr,i.fail=Tt,i.formatError=Je,i.index=Xt,i.isParser=j,i.lazy=Gt,i.letter=ji,i.letters=xo,i.lf=Ri,i.lookahead=qt,i.makeFailure=U,i.makeSuccess=Z,i.newline=ui,i.noneOf=function(ne){return $t(function(ge){return ne.indexOf(ge)<0}).desc("none of '"+ne+"'")},i.notFollowedBy=zt,i.of=Et,i.oneOf=function(ne){for(var ge=ne.split(""),Ae=0;Ae<ge.length;Ae++)ge[Ae]="'"+ge[Ae]+"'";return $t(function(He){return ne.indexOf(He)>=0}).desc(ge)},i.optWhitespace=Uo,i.Parser=i,i.range=function(ne,ge){return $t(function(Ae){return ne<=Ae&&Ae<=ge}).desc(ne+"-"+ge)},i.regex=gt,i.regexp=gt,i.sepBy=Re,i.sepBy1=tt,i.seq=Qe,i.seqMap=It,i.seqObj=function(){for(var ne,ge={},Ae=0,He=(ne=arguments,Array.prototype.slice.call(ne)),Ye=He.length,et=0;et<Ye;et+=1){var nt=He[et];if(!j(nt)){if(B(nt)&&nt.length===2&&typeof nt[0]=="string"&&j(nt[1])){var kt=nt[0];if(Object.prototype.hasOwnProperty.call(ge,kt))throw new Error("seqObj: duplicate key "+kt);ge[kt]=!0,Ae++;continue}throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.")}}if(Ae===0)throw new Error("seqObj expects at least one named parser, found zero");return i(function(en,jn){for(var wn,Lr={},_n=0;_n<Ye;_n+=1){var rr,Rr;if(B(He[_n])?(rr=He[_n][0],Rr=He[_n][1]):(rr=null,Rr=He[_n]),!(wn=z(Rr._(en,jn),wn)).status)return wn;rr&&(Lr[rr]=wn.value),jn=wn.index}return z(Z(jn,Lr),wn)})},i.string=at,i.succeed=Et,i.takeWhile=function(ne){return le(ne),i(function(ge,Ae){for(var He=Ae;He<ge.length&&ne(ue(ge,He));)He++;return Z(He,ge.slice(Ae,He))})},i.test=$t,i.whitespace=Li,i["fantasy-land/empty"]=cn,i["fantasy-land/of"]=Et,i.Binary={bitSeq:w,bitSeqObj:function(ne){v();var ge={},Ae=0,He=f(function(et){if(B(et)){var nt=et;if(nt.length!==2)throw new Error("["+nt.join(", ")+"] should be length 2, got length "+nt.length);if(W(nt[0]),ee(nt[1]),Object.prototype.hasOwnProperty.call(ge,nt[0]))throw new Error("duplicate key in bitSeqObj: "+nt[0]);return ge[nt[0]]=!0,Ae++,nt}return ee(et),[null,et]},ne);if(Ae<1)throw new Error("bitSeqObj expects at least one named pair, got ["+ne.join(", ")+"]");var Ye=f(function(et){return et[0]},He);return w(f(function(et){return et[1]},He)).map(function(et){return d(function(nt,kt){return kt[0]!==null&&(nt[kt[0]]=kt[1]),nt},{},f(function(nt,kt){return[nt,et[kt]]},Ye))})},byte:function(ne){if(v(),ee(ne),ne>255)throw new Error("Value specified to byte constructor ("+ne+"=0x"+ne.toString(16)+") is larger in value than a single byte.");var ge=(ne>15?"0x":"0x0")+ne.toString(16);return i(function(Ae,He){var Ye=ue(Ae,He);return Ye===ne?Z(He+1,Ye):U(He,ge)})},buffer:function(ne){return D("buffer",ne).map(function(ge){return Buffer.from(ge)})},encodedString:function(ne,ge){return D("string",ge).map(function(Ae){return Ae.toString(ne)})},uintBE:I,uint8BE:I(1),uint16BE:I(2),uint32BE:I(4),uintLE:k,uint8LE:k(1),uint16LE:k(2),uint32LE:k(4),intBE:A,int8BE:A(1),int16BE:A(2),int32BE:A(4),intLE:R,int8LE:R(1),int16LE:R(2),int32LE:R(4),floatBE:D("floatBE",4).map(function(ne){return ne.readFloatBE(0)}),floatLE:D("floatLE",4).map(function(ne){return ne.readFloatLE(0)}),doubleBE:D("doubleBE",8).map(function(ne){return ne.readDoubleBE(0)}),doubleLE:D("doubleLE",8).map(function(ne){return ne.readDoubleLE(0)})},n.exports=i}])})})(me);var B1=()=>/(?:[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDD-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF6](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC2\uDED0-\uDED9\uDEE0-\uDEE7]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?))/g;function _E(e){return e==null?e:e.shiftToAll().normalize()}function eT(e){return e.includes("/")&&(e=e.substring(e.lastIndexOf("/")+1)),e.endsWith(".md")&&(e=e.substring(0,e.length-3)),e}me.exports.alt(me.exports.regex(new RegExp(B1(),"")),me.exports.regex(/[0-9\p{Letter}_-]+/u).map(e=>e.toLocaleLowerCase()),me.exports.whitespace.map(e=>"-"),me.exports.any.map(e=>"")).many().map(e=>e.join(""));const SF=me.exports.alt(me.exports.regex(new RegExp(B1(),"")),me.exports.regex(/[0-9\p{Letter}_-]+/u),me.exports.whitespace.map(e=>" "),me.exports.any.map(e=>" ")).many().map(e=>e.join("").split(/\s+/).join(" ").trim());function DF(e){return SF.tryParse(e)}function TF(e){return e=_E(e),e=wt.fromObject(Object.fromEntries(Object.entries(e.toObject()).filter(([,t])=>t>0))),e.toHuman()}var Nm;(function(e){function t(j,B=L1,L=!1){let Z=n(j);if(!Z)return B.renderNullAs;switch(Z.type){case"null":return B.renderNullAs;case"string":return Z.value;case"number":case"boolean":return""+Z.value;case"html":return Z.value.outerHTML;case"widget":return Z.value.markdown();case"link":return Z.value.markdown();case"function":return"<function>";case"array":let U="";return L&&(U+="["),U+=Z.value.map(z=>t(z,B,!0)).join(", "),L&&(U+="]"),U;case"object":return"{ "+Object.entries(Z.value).map(z=>z[0]+": "+t(z[1],B,!0)).join(", ")+" }";case"date":return Z.value.second==0&&Z.value.hour==0&&Z.value.minute==0?Z.value.toFormat(B.defaultDateFormat):Z.value.toFormat(B.defaultDateTimeFormat);case"duration":return TF(Z.value)}}e.toString=t;function n(j){return v(j)?{type:"null",value:j}:f(j)?{type:"number",value:j}:d(j)?{type:"string",value:j}:D(j)?{type:"boolean",value:j}:g(j)?{type:"duration",value:j}:m(j)?{type:"date",value:j}:I(j)?{type:"widget",value:j}:w(j)?{type:"array",value:j}:T(j)?{type:"link",value:j}:R(j)?{type:"function",value:j}:k(j)?{type:"html",value:j}:A(j)?{type:"object",value:j}:void 0}e.wrapValue=n;function r(j,B){if(A(j)){let L={};for(let[Z,U]of Object.entries(j))L[Z]=r(U,B);return L}else if(w(j)){let L=[];for(let Z of j)L.push(r(Z,B));return L}else return B(j)}e.mapLeaves=r;function o(j,B,L){var Z,U;if(j===void 0&&(j=null),B===void 0&&(B=null),j===null&&B===null)return 0;if(j===null)return-1;if(B===null)return 1;let z=n(j),$=n(B);if(z===void 0&&$===void 0)return 0;if(z===void 0)return-1;if($===void 0)return 1;if(z.type!=$.type)return z.type.localeCompare($.type);if(z.value===$.value)return 0;switch(z.type){case"string":return z.value.localeCompare($.value);case"number":return z.value<$.value?-1:z.value==$.value?0:1;case"null":return 0;case"boolean":return z.value==$.value?0:z.value?1:-1;case"link":let te=z.value,Q=$.value,ue=L??(Ie=>Ie),ee=ue(te.path).localeCompare(ue(Q.path));if(ee!=0)return ee;let le=te.type.localeCompare(Q.type);return le!=0?le:te.subpath&&!Q.subpath?1:!te.subpath&&Q.subpath?-1:!te.subpath&&!Q.subpath?0:((Z=te.subpath)!==null&&Z!==void 0?Z:"").localeCompare((U=Q.subpath)!==null&&U!==void 0?U:"");case"date":return z.value<$.value?-1:z.value.equals($.value)?0:1;case"duration":return z.value<$.value?-1:z.value.equals($.value)?0:1;case"array":let W=z.value,de=$.value;for(let Ie=0;Ie<Math.min(W.length,de.length);Ie++){let Oe=o(W[Ie],de[Ie]);if(Oe!=0)return Oe}return W.length-de.length;case"object":let oe=z.value,he=$.value,K=Array.from(Object.keys(oe)),re=Array.from(Object.keys(he));K.sort(),re.sort();let pe=o(K,re);if(pe!=0)return pe;for(let Ie of K){let Oe=o(oe[Ie],he[Ie]);if(Oe!=0)return Oe}return 0;case"widget":case"html":case"function":return 0}}e.compareValue=o;function i(j){var B;return(B=n(j))===null||B===void 0?void 0:B.type}e.typeOf=i;function a(j){let B=n(j);if(!B)return!1;switch(B.type){case"number":return B.value!=0;case"string":return B.value.length>0;case"boolean":return B.value;case"link":return!!B.value.path;case"date":return B.value.toMillis()!=0;case"duration":return B.value.as("seconds")!=0;case"object":return Object.keys(B.value).length>0;case"array":return B.value.length>0;case"null":return!1;case"html":case"widget":case"function":return!0}}e.isTruthy=a;function u(j){if(j==null)return j;if(e.isArray(j))return[].concat(j.map(B=>u(B)));if(e.isObject(j)){let B={};for(let[L,Z]of Object.entries(j))B[L]=u(Z);return B}else return j}e.deepCopy=u;function d(j){return typeof j=="string"}e.isString=d;function f(j){return typeof j=="number"}e.isNumber=f;function m(j){return j instanceof Mt}e.isDate=m;function g(j){return j instanceof wt}e.isDuration=g;function v(j){return j==null}e.isNull=v;function w(j){return Array.isArray(j)}e.isArray=w;function D(j){return typeof j=="boolean"}e.isBoolean=D;function T(j){return j instanceof _o}e.isLink=T;function I(j){return j instanceof H1}e.isWidget=I;function k(j){return typeof HTMLElement<"u"?j instanceof HTMLElement:!1}e.isHtml=k;function A(j){return typeof j=="object"&&!k(j)&&!I(j)&&!w(j)&&!g(j)&&!m(j)&&!T(j)&&j!==void 0&&!v(j)}e.isObject=A;function R(j){return typeof j=="function"}e.isFunction=R})(Nm||(Nm={}));var tT;(function(e){function t(o){return Nm.isObject(o)&&Object.keys(o).length==2&&"key"in o&&"rows"in o}e.isElementGroup=t;function n(o){for(let i of o)if(!t(i))return!1;return!0}e.isGrouping=n;function r(o){if(n(o)){let i=0;for(let a of o)i+=r(a.rows);return i}else return o.length}e.count=r})(tT||(tT={}));class _o{constructor(t){Object.assign(this,t)}static file(t,n=!1,r){return new _o({path:t,embed:n,display:r,subpath:void 0,type:"file"})}static infer(t,n=!1,r){if(t.includes("#^")){let o=t.split("#^");return _o.block(o[0],o[1],n,r)}else if(t.includes("#")){let o=t.split("#");return _o.header(o[0],o[1],n,r)}else return _o.file(t,n,r)}static header(t,n,r,o){return new _o({path:t,embed:r,display:o,subpath:DF(n),type:"header"})}static block(t,n,r,o){return new _o({path:t,embed:r,display:o,subpath:n,type:"block"})}static fromObject(t){return new _o(t)}equals(t){return t==null||t==null?!1:this.path==t.path&&this.type==t.type&&this.subpath==t.subpath}toString(){return this.markdown()}toObject(){return{path:this.path,type:this.type,subpath:this.subpath,display:this.display,embed:this.embed}}withPath(t){return new _o(Object.assign({},this,{path:t}))}withDisplay(t){return new _o(Object.assign({},this,{display:t}))}withHeader(t){return _o.header(this.path,t,this.embed,this.display)}toFile(){return _o.file(this.path,this.embed,this.display)}toEmbed(){if(this.embed)return this;{let t=new _o(this);return t.embed=!0,t}}fromEmbed(){if(this.embed){let t=new _o(this);return t.embed=!1,t}else return this}markdown(){let t=(this.embed?"!":"")+"[["+this.obsidianLink();return this.display?t+="|"+this.display:(t+="|"+eT(this.path),(this.type=="header"||this.type=="block")&&(t+=" > "+this.subpath)),t+="]]",t}obsidianLink(){var t,n;const r=this.path.replace("|","\\|");return this.type=="header"?r+"#"+((t=this.subpath)===null||t===void 0?void 0:t.replace("|","\\|")):this.type=="block"?r+"#^"+((n=this.subpath)===null||n===void 0?void 0:n.replace("|","\\|")):r}fileName(){return eT(this.path).replace(".md","")}}class H1{constructor(t){this.$widget=t}}class IF extends H1{constructor(t,n){super("dataview:list-pair"),this.key=t,this.value=n}markdown(){return`${Nm.toString(this.key)}: ${Nm.toString(this.value)}`}}class xF extends H1{constructor(t,n){super("dataview:external-link"),this.url=t,this.display=n}markdown(){var t;return`[${(t=this.display)!==null&&t!==void 0?t:this.url}](${this.url})`}}var nT;(function(e){function t(a,u){return new IF(a,u)}e.listPair=t;function n(a,u){return new xF(a,u)}e.externalLink=n;function r(a){return a.$widget==="dataview:list-pair"}e.isListPair=r;function o(a){return a.$widget==="dataview:external-link"}e.isExternalLink=o;function i(a){return r(a)||o(a)}e.isBuiltin=i})(nT||(nT={}));var hr;(function(e){function t(v){return{type:"variable",name:v}}e.variable=t;function n(v){return{type:"literal",value:v}}e.literal=n;function r(v,w,D){return{type:"binaryop",left:v,op:w,right:D}}e.binaryOp=r;function o(v,w){return{type:"index",object:v,index:w}}e.index=o;function i(v){let w=v.split("."),D=e.variable(w[0]);for(let T=1;T<w.length;T++)D=e.index(D,e.literal(w[T]));return D}e.indexVariable=i;function a(v,w){return{type:"lambda",arguments:v,value:w}}e.lambda=a;function u(v,w){return{type:"function",func:v,arguments:w}}e.func=u;function d(v){return{type:"list",values:v}}e.list=d;function f(v){return{type:"object",values:v}}e.object=f;function m(v){return{type:"negated",child:v}}e.negate=m;function g(v){return v=="<="||v=="<"||v==">"||v==">="||v=="!="||v=="="}e.isCompareOp=g,e.NULL=e.literal(null)})(hr||(hr={}));var sl;(function(e){function t(m){return{type:"tag",tag:m}}e.tag=t;function n(m){return{type:"csv",path:m}}e.csv=n;function r(m){return{type:"folder",folder:m}}e.folder=r;function o(m,g){return{type:"link",file:m,direction:g?"incoming":"outgoing"}}e.link=o;function i(m,g,v){return{type:"binaryop",left:m,op:g,right:v}}e.binaryOp=i;function a(m,g){return{type:"binaryop",left:m,op:"&",right:g}}e.and=a;function u(m,g){return{type:"binaryop",left:m,op:"|",right:g}}e.or=u;function d(m){return{type:"negate",child:m}}e.negate=d;function f(){return{type:"empty"}}e.empty=f})(sl||(sl={}));const rT=new RegExp(B1(),""),Yb={year:wt.fromObject({years:1}),years:wt.fromObject({years:1}),yr:wt.fromObject({years:1}),yrs:wt.fromObject({years:1}),month:wt.fromObject({months:1}),months:wt.fromObject({months:1}),mo:wt.fromObject({months:1}),mos:wt.fromObject({months:1}),week:wt.fromObject({weeks:1}),weeks:wt.fromObject({weeks:1}),wk:wt.fromObject({weeks:1}),wks:wt.fromObject({weeks:1}),w:wt.fromObject({weeks:1}),day:wt.fromObject({days:1}),days:wt.fromObject({days:1}),d:wt.fromObject({days:1}),hour:wt.fromObject({hours:1}),hours:wt.fromObject({hours:1}),hr:wt.fromObject({hours:1}),hrs:wt.fromObject({hours:1}),h:wt.fromObject({hours:1}),minute:wt.fromObject({minutes:1}),minutes:wt.fromObject({minutes:1}),min:wt.fromObject({minutes:1}),mins:wt.fromObject({minutes:1}),m:wt.fromObject({minutes:1}),second:wt.fromObject({seconds:1}),seconds:wt.fromObject({seconds:1}),sec:wt.fromObject({seconds:1}),secs:wt.fromObject({seconds:1}),s:wt.fromObject({seconds:1})},Ub={now:()=>Mt.local(),today:()=>Mt.local().startOf("day"),yesterday:()=>Mt.local().startOf("day").minus(wt.fromObject({days:1})),tomorrow:()=>Mt.local().startOf("day").plus(wt.fromObject({days:1})),sow:()=>Mt.local().startOf("week"),"start-of-week":()=>Mt.local().startOf("week"),eow:()=>Mt.local().endOf("week"),"end-of-week":()=>Mt.local().endOf("week"),soy:()=>Mt.local().startOf("year"),"start-of-year":()=>Mt.local().startOf("year"),eoy:()=>Mt.local().endOf("year"),"end-of-year":()=>Mt.local().endOf("year"),som:()=>Mt.local().startOf("month"),"start-of-month":()=>Mt.local().startOf("month"),eom:()=>Mt.local().endOf("month"),"end-of-month":()=>Mt.local().endOf("month")},zb=["FROM","WHERE","LIMIT","GROUP","FLATTEN"];function EF(e){let t=-1;for(;(t=e.indexOf("|",t+1))>=0;)if(!(t>0&&e[t-1]=="\\"))return[e.substring(0,t).replace(/\\\|/g,"|"),e.substring(t+1)];return[e.replace(/\\\|/g,"|"),void 0]}function CF(e){let[t,n]=EF(e);return _o.infer(t,!1,n)}function im(e,t,n){return me.exports.seqMap(e,me.exports.seq(me.exports.optWhitespace,t,me.exports.optWhitespace,e).many(),(r,o)=>{if(o.length==0)return r;let i=n(r,o[0][1],o[0][3]);for(let a=1;a<o.length;a++)i=n(i,o[a][1],o[a][3]);return i})}function MF(e,...t){return me.exports.custom((n,r)=>(o,i)=>{let a=e._(o,i);if(!a.status)return a;for(let u of t){let d=u(a.value)._(o,a.index);if(!d.status)return a;a=d}return a})}const ds=me.exports.createLanguage({number:e=>me.exports.regexp(/-?[0-9]+(\.[0-9]+)?/).map(t=>Number.parseFloat(t)).desc("number"),string:e=>me.exports.string('"').then(me.exports.alt(e.escapeCharacter,me.exports.noneOf('"\\')).atLeast(0).map(t=>t.join(""))).skip(me.exports.string('"')).desc("string"),escapeCharacter:e=>me.exports.string("\\").then(me.exports.any).map(t=>t==='"'?'"':t==="\\"?"\\":"\\"+t),bool:e=>me.exports.regexp(/true|false|True|False/).map(t=>t.toLowerCase()=="true").desc("boolean ('true' or 'false')"),tag:e=>me.exports.seqMap(me.exports.string("#"),me.exports.alt(me.exports.regexp(/[^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]/).desc("text")).many(),(t,n)=>t+n.join("")).desc("tag ('#hello/stuff')"),identifier:e=>me.exports.seqMap(me.exports.alt(me.exports.regexp(new RegExp("\\p{Letter}","u")),me.exports.regexp(rT).desc("text")),me.exports.alt(me.exports.regexp(/[0-9\p{Letter}_-]/u),me.exports.regexp(rT).desc("text")).many(),(t,n)=>t+n.join("")).desc("variable identifier"),link:e=>me.exports.regexp(/\[\[([^\[\]]*?)\]\]/u,1).map(t=>CF(t)).desc("file link"),embedLink:e=>me.exports.seqMap(me.exports.string("!").atMost(1),e.link,(t,n)=>(t.length>0&&(n.embed=!0),n)).desc("file link"),binaryPlusMinus:e=>me.exports.regexp(/\+|-/).map(t=>t).desc("'+' or '-'"),binaryMulDiv:e=>me.exports.regexp(/\*|\/|%/).map(t=>t).desc("'*' or '/' or '%'"),binaryCompareOp:e=>me.exports.regexp(/>=|<=|!=|>|<|=/).map(t=>t).desc("'>=' or '<=' or '!=' or '=' or '>' or '<'"),binaryBooleanOp:e=>me.exports.regexp(/and|or|&|\|/i).map(t=>t.toLowerCase()=="and"?"&":t.toLowerCase()=="or"?"|":t).desc("'and' or 'or'"),rootDate:e=>me.exports.seqMap(me.exports.regexp(/\d{4}/),me.exports.string("-"),me.exports.regexp(/\d{2}/),(t,n,r)=>Mt.fromObject({year:Number.parseInt(t),month:Number.parseInt(r)})).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),dateShorthand:e=>me.exports.alt(...Object.keys(Ub).sort((t,n)=>n.length-t.length).map(me.exports.string)),date:e=>MF(e.rootDate,t=>me.exports.seqMap(me.exports.string("-"),me.exports.regexp(/\d{2}/),(n,r)=>t.set({day:Number.parseInt(r)})),t=>me.exports.seqMap(me.exports.string("T"),me.exports.regexp(/\d{2}/),(n,r)=>t.set({hour:Number.parseInt(r)})),t=>me.exports.seqMap(me.exports.string(":"),me.exports.regexp(/\d{2}/),(n,r)=>t.set({minute:Number.parseInt(r)})),t=>me.exports.seqMap(me.exports.string(":"),me.exports.regexp(/\d{2}/),(n,r)=>t.set({second:Number.parseInt(r)})),t=>me.exports.alt(me.exports.seqMap(me.exports.string("."),me.exports.regexp(/\d{3}/),(n,r)=>t.set({millisecond:Number.parseInt(r)})),me.exports.succeed(t)),t=>me.exports.alt(me.exports.seqMap(me.exports.string("+").or(me.exports.string("-")),me.exports.regexp(/\d{1,2}(:\d{2})?/),(n,r)=>t.setZone("UTC"+n+r,{keepLocalTime:!0})),me.exports.seqMap(me.exports.string("Z"),()=>t.setZone("utc",{keepLocalTime:!0})),me.exports.seqMap(me.exports.string("["),me.exports.regexp(/[0-9A-Za-z+-\/]+/u),me.exports.string("]"),(n,r,o)=>t.setZone(r,{keepLocalTime:!0})))).assert(t=>t.isValid,"valid date").desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),datePlus:e=>me.exports.alt(e.dateShorthand.map(t=>Ub[t]()),e.date).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS] or in shorthand"),durationType:e=>me.exports.alt(...Object.keys(Yb).sort((t,n)=>n.length-t.length).map(me.exports.string)),duration:e=>me.exports.seqMap(e.number,me.exports.optWhitespace,e.durationType,(t,n,r)=>Yb[r].mapUnits(o=>o*t)).sepBy1(me.exports.string(",").trim(me.exports.optWhitespace).or(me.exports.optWhitespace)).map(t=>t.reduce((n,r)=>n.plus(r))).desc("duration like 4hr2min"),rawNull:e=>me.exports.string("null"),tagSource:e=>e.tag.map(t=>sl.tag(t)),csvSource:e=>me.exports.seqMap(me.exports.string("csv(").skip(me.exports.optWhitespace),e.string,me.exports.string(")"),(t,n,r)=>sl.csv(n)),linkIncomingSource:e=>e.link.map(t=>sl.link(t.path,!0)),linkOutgoingSource:e=>me.exports.seqMap(me.exports.string("outgoing(").skip(me.exports.optWhitespace),e.link,me.exports.string(")"),(t,n,r)=>sl.link(n.path,!1)),folderSource:e=>e.string.map(t=>sl.folder(t)),parensSource:e=>me.exports.seqMap(me.exports.string("("),me.exports.optWhitespace,e.source,me.exports.optWhitespace,me.exports.string(")"),(t,n,r,o,i)=>r),negateSource:e=>me.exports.seqMap(me.exports.alt(me.exports.string("-"),me.exports.string("!")),e.atomSource,(t,n)=>sl.negate(n)),atomSource:e=>me.exports.alt(e.parensSource,e.negateSource,e.linkOutgoingSource,e.linkIncomingSource,e.folderSource,e.tagSource,e.csvSource),binaryOpSource:e=>im(e.atomSource,e.binaryBooleanOp.map(t=>t),sl.binaryOp),source:e=>e.binaryOpSource,variableField:e=>e.identifier.chain(t=>zb.includes(t.toUpperCase())?me.exports.fail("Variable fields cannot be a keyword ("+zb.join(" or ")+")"):me.exports.succeed(hr.variable(t))).desc("variable"),numberField:e=>e.number.map(t=>hr.literal(t)).desc("number"),stringField:e=>e.string.map(t=>hr.literal(t)).desc("string"),boolField:e=>e.bool.map(t=>hr.literal(t)).desc("boolean"),dateField:e=>me.exports.seqMap(me.exports.string("date("),me.exports.optWhitespace,e.datePlus,me.exports.optWhitespace,me.exports.string(")"),(t,n,r,o,i)=>hr.literal(r)).desc("date"),durationField:e=>me.exports.seqMap(me.exports.string("dur("),me.exports.optWhitespace,e.duration,me.exports.optWhitespace,me.exports.string(")"),(t,n,r,o,i)=>hr.literal(r)).desc("duration"),nullField:e=>e.rawNull.map(t=>hr.NULL),linkField:e=>e.link.map(t=>hr.literal(t)),listField:e=>e.field.sepBy(me.exports.string(",").trim(me.exports.optWhitespace)).wrap(me.exports.string("[").skip(me.exports.optWhitespace),me.exports.optWhitespace.then(me.exports.string("]"))).map(t=>hr.list(t)).desc("list ('[1, 2, 3]')"),objectField:e=>me.exports.seqMap(e.identifier.or(e.string),me.exports.string(":").trim(me.exports.optWhitespace),e.field,(t,n,r)=>({name:t,value:r})).sepBy(me.exports.string(",").trim(me.exports.optWhitespace)).wrap(me.exports.string("{").skip(me.exports.optWhitespace),me.exports.optWhitespace.then(me.exports.string("}"))).map(t=>{let n={};for(let r of t)n[r.name]=r.value;return hr.object(n)}).desc("object ('{ a: 1, b: 2 }')"),atomInlineField:e=>me.exports.alt(e.date,e.duration.map(t=>_E(t)),e.string,e.tag,e.embedLink,e.bool,e.number,e.rawNull),inlineFieldList:e=>e.atomInlineField.sepBy(me.exports.string(",").trim(me.exports.optWhitespace).lookahead(e.atomInlineField)),inlineField:e=>me.exports.alt(me.exports.seqMap(e.atomInlineField,me.exports.string(",").trim(me.exports.optWhitespace),e.inlineFieldList,(t,n,r)=>[t].concat(r)),e.atomInlineField),atomField:e=>me.exports.alt(e.embedLink.map(t=>hr.literal(t)),e.negatedField,e.linkField,e.listField,e.objectField,e.lambdaField,e.parensField,e.boolField,e.numberField,e.stringField,e.dateField,e.durationField,e.nullField,e.variableField),indexField:e=>me.exports.seqMap(e.atomField,me.exports.alt(e.dotPostfix,e.indexPostfix,e.functionPostfix).many(),(t,n)=>{let r=t;for(let o of n)switch(o.type){case"dot":r=hr.index(r,hr.literal(o.field));break;case"index":r=hr.index(r,o.field);break;case"function":r=hr.func(r,o.fields);break}return r}),negatedField:e=>me.exports.seqMap(me.exports.string("!"),e.indexField,(t,n)=>hr.negate(n)).desc("negated field"),parensField:e=>me.exports.seqMap(me.exports.string("("),me.exports.optWhitespace,e.field,me.exports.optWhitespace,me.exports.string(")"),(t,n,r,o,i)=>r),lambdaField:e=>me.exports.seqMap(e.identifier.sepBy(me.exports.string(",").trim(me.exports.optWhitespace)).wrap(me.exports.string("(").trim(me.exports.optWhitespace),me.exports.string(")").trim(me.exports.optWhitespace)),me.exports.string("=>").trim(me.exports.optWhitespace),e.field,(t,n,r)=>({type:"lambda",arguments:t,value:r})),dotPostfix:e=>me.exports.seqMap(me.exports.string("."),e.identifier,(t,n)=>({type:"dot",field:n})),indexPostfix:e=>me.exports.seqMap(me.exports.string("["),me.exports.optWhitespace,e.field,me.exports.optWhitespace,me.exports.string("]"),(t,n,r,o,i)=>({type:"index",field:r})),functionPostfix:e=>me.exports.seqMap(me.exports.string("("),me.exports.optWhitespace,e.field.sepBy(me.exports.string(",").trim(me.exports.optWhitespace)),me.exports.optWhitespace,me.exports.string(")"),(t,n,r,o,i)=>({type:"function",fields:r})),binaryMulDivField:e=>im(e.indexField,e.binaryMulDiv,hr.binaryOp),binaryPlusMinusField:e=>im(e.binaryMulDivField,e.binaryPlusMinus,hr.binaryOp),binaryCompareField:e=>im(e.binaryPlusMinusField,e.binaryCompareOp,hr.binaryOp),binaryBooleanField:e=>im(e.binaryCompareField,e.binaryBooleanOp,hr.binaryOp),binaryOpField:e=>e.binaryBooleanField,field:e=>e.binaryOpField});function kF(e){try{return Iv.success(ds.field.tryParse(e))}catch(t){return Iv.failure(""+t)}}var xv;(function(e){function t(r,o){return{name:r,field:o}}e.named=t;function n(r,o){return{field:r,direction:o}}e.sortBy=n})(xv||(xv={}));function NF(e){return me.exports.custom((t,n)=>(r,o)=>{let i=e._(r,o);return i.status?Object.assign({},i,{value:[i.value,r.substring(o,i.index)]}):i})}function AF(e){return e.split(/[\r\n]+/).map(t=>t.trim()).join("")}const FF=me.exports.createLanguage({queryType:e=>me.exports.alt(me.exports.regexp(/TABLE|LIST|TASK|CALENDAR/i)).map(t=>t.toLowerCase()).desc("query type ('TABLE', 'LIST', 'TASK', or 'CALENDAR')"),explicitNamedField:e=>me.exports.seqMap(ds.field.skip(me.exports.whitespace),me.exports.regexp(/AS/i).skip(me.exports.whitespace),ds.identifier.or(ds.string),(t,n,r)=>xv.named(r,t)),namedField:e=>me.exports.alt(e.explicitNamedField,NF(ds.field).map(([t,n])=>xv.named(AF(n),t))),sortField:e=>me.exports.seqMap(ds.field.skip(me.exports.optWhitespace),me.exports.regexp(/ASCENDING|DESCENDING|ASC|DESC/i).atMost(1),(t,n)=>{let r=n.length==0?"ascending":n[0].toLowerCase();return r=="desc"&&(r="descending"),r=="asc"&&(r="ascending"),{field:t,direction:r}}),headerClause:e=>e.queryType.skip(me.exports.whitespace).chain(t=>{switch(t){case"table":return me.exports.seqMap(me.exports.regexp(/WITHOUT\s+ID/i).skip(me.exports.optWhitespace).atMost(1),me.exports.sepBy(e.namedField,me.exports.string(",").trim(me.exports.optWhitespace)),(n,r)=>({type:"table",fields:r,showId:n.length==0}));case"list":return me.exports.seqMap(me.exports.regexp(/WITHOUT\s+ID/i).skip(me.exports.optWhitespace).atMost(1),ds.field.atMost(1),(n,r)=>({type:"list",format:r.length==1?r[0]:void 0,showId:n.length==0}));case"task":return me.exports.succeed({type:"task"});case"calendar":return me.exports.seqMap(e.namedField,n=>({type:"calendar",showId:!0,field:n}));default:return me.exports.fail(`Unrecognized query type '${t}'`)}}).desc("TABLE or LIST or TASK or CALENDAR"),fromClause:e=>me.exports.seqMap(me.exports.regexp(/FROM/i),me.exports.whitespace,ds.source,(t,n,r)=>r),whereClause:e=>me.exports.seqMap(me.exports.regexp(/WHERE/i),me.exports.whitespace,ds.field,(t,n,r)=>({type:"where",clause:r})).desc("WHERE <expression>"),sortByClause:e=>me.exports.seqMap(me.exports.regexp(/SORT/i),me.exports.whitespace,e.sortField.sepBy1(me.exports.string(",").trim(me.exports.optWhitespace)),(t,n,r)=>({type:"sort",fields:r})).desc("SORT field [ASC/DESC]"),limitClause:e=>me.exports.seqMap(me.exports.regexp(/LIMIT/i),me.exports.whitespace,ds.field,(t,n,r)=>({type:"limit",amount:r})).desc("LIMIT <value>"),flattenClause:e=>me.exports.seqMap(me.exports.regexp(/FLATTEN/i).skip(me.exports.whitespace),e.namedField,(t,n)=>({type:"flatten",field:n})).desc("FLATTEN <value> [AS <name>]"),groupByClause:e=>me.exports.seqMap(me.exports.regexp(/GROUP BY/i).skip(me.exports.whitespace),e.namedField,(t,n)=>({type:"group",field:n})).desc("GROUP BY <value> [AS <name>]"),clause:e=>me.exports.alt(e.fromClause,e.whereClause,e.sortByClause,e.limitClause,e.groupByClause,e.flattenClause),query:e=>me.exports.seqMap(e.headerClause.trim(me.exports.optWhitespace),e.fromClause.trim(me.exports.optWhitespace).atMost(1),e.clause.trim(me.exports.optWhitespace).many(),(t,n,r)=>({header:t,source:n.length==0?sl.folder(""):n[0],operations:r,settings:L1}))}),PF=e=>{var t;return e?(t=e.plugins.plugins.dataview)===null||t===void 0?void 0:t.api:window.DataviewAPI},OF=e=>e.plugins.enabledPlugins.has("dataview");lu.DATE_SHORTHANDS=Ub;lu.DURATION_TYPES=Yb;lu.EXPRESSION=ds;lu.KEYWORDS=zb;lu.QUERY_LANGUAGE=FF;var jF=lu.getAPI=PF;lu.isPluginEnabled=OF;lu.parseField=kF;async function LF(e,t,n,r,o){var I,k;const{vault:i,metadataCache:a}=_e.getState().dailyNotesState.app===void 0?app:_e.getState().dailyNotesState.app,u=_e.getState().dailyNotesState.settings,d=e.replace(/\n/g,"<br>");if(n===void 0)return;const f=a.getFirstLinkpathDest("",n),m=C.moment(),g=m.format("YYYYMMDDHHmmss"),v=r.slice(14),w=" ",D=g+" "+d.trim(),T=w+"- "+g+" "+d.trim();if(f){let A;if(u!=null&&u.CommentOnMemos&&(u!=null&&u.CommentsInOriginalNotes)){const L=jF();if(L!==void 0)try{A=(k=(I=L.page(f.path))==null?void 0:I.file.lists.values)==null?void 0:k.filter(Z=>Z.line===parseInt(v))}catch(Z){console.error(Z)}}const R=await i.read(f);let j=0;A[0].children.values.length>0?j=A[0].children.values[A[0].children.values.length-1].line:j=A[0].line;const B=await RF(T,R,j);if(await i.modify(f,B.content),t)return{id:g+(j+1),content:D,deletedAt:"",createdAt:m.format("YYYY/MM/DD HH:mm:ss"),updatedAt:m.format("YYYY/MM/DD HH:mm:ss"),thinoType:"JOURNAL",path:f.path,hasId:"",linkId:o}}}async function RF(e,t,n){if(n===-1)return{content:`${t}
|
|
|
${e}`,posNum:-1};const r=t.split(`
|
|
|
`),o=r.slice(0,n+1).join(`
|
|
|
`),i=r.slice(n+1).join(`
|
|
|
`);return/^\s*$/g.test(r[n+1])?{content:`${o}
|
|
|
${e}
|
|
|
${i}`,posNum:n}:{content:`${o}
|
|
|
${e}
|
|
|
${i}`,posNum:n}}function _F(e,t,n){var o;const r=t.workspace.getLeavesOfType("markdown");for(const i of r){const a=i.view;if(((o=a==null?void 0:a.file)==null?void 0:o.path)===e){t.workspace.revealLeaf(i);try{return i.view.setEphemeralState({line:n}),!0}catch(u){return console.error(u),!1}}}return!1}const Y1=async e=>{var i;const t=yt.getState().app,n=t.workspace.getLeavesOfType("markdown");for(const a of n){const u=a.view;if(((i=u==null?void 0:u.file)==null?void 0:i.path)===e){t.workspace.revealLeaf(a);return}}const r=t.metadataCache.getFirstLinkpathDest("",e);if(!r){new C.Notice(E("File not found for the given thino path"));return}await t.workspace.getLeaf(!0).openFile(r)},U1=async(e,t)=>{const{app:n}=yt.getState(),r=parseInt(e.slice(14));if(_F(t,n,r))return;const o=n.metadataCache.getFirstLinkpathDest("",t);if(!C.Platform.isMobile)await n.workspace.getLeaf(!0).openFile(o,{eState:{line:r}});else{let i=n.workspace.activeLeaf;i===null&&(i=n.workspace.getLeaf(!0)),await i.openFile(o,{eState:{line:r}})}},z1=async(e,t)=>{var f,m,g;const n=yt.getState().app,r=n.metadataCache.getFirstLinkpathDest("",t);if(!r){new C.Notice(E("File not found for the given thino path"));return}let o="";try{o=await n.vault.read(r)}catch(v){console.error(v),o=await n.vault.cachedRead(r)}const a=o.split(/\r?\n/).findIndex(v=>v.contains(e)),u=n.workspace.getLeavesOfType("markdown");for(const v of u){const w=v.view;if(((f=w==null?void 0:w.file)==null?void 0:f.path)===r.path){n.workspace.revealLeaf(v);try{(m=v.view.editor)==null||m.setCursor({line:a,ch:1});return}catch(D){console.error(D)}}}const d=n.workspace.getLeaf(!0);await d.openFile(r,{eState:{line:a}});try{(g=d.view.editor)==null||g.setCursor({line:a,ch:1})}catch(v){console.error(v)}},V1=async(e,t)=>{var u;const n=yt.getState().app,r=(d,f)=>{var g;const m=(g=Array.from(d.nodes.values()))==null?void 0:g.find(v=>v.id===f);return m?(d.selectOnly(m),d.zoomToSelection(),!0):!1},o=n.workspace.getLeavesOfType("canvas");for(const d of o){const f=d.view;if(((u=f==null?void 0:f.file)==null?void 0:u.path)===t&&(n.workspace.revealLeaf(d),r(f.canvas,e)))return}const i=n.metadataCache.getFirstLinkpathDest("",t);if(!i){new C.Notice(E("File not found for the given thino path"));return}const a=n.workspace.getLeaf(!0);await a.openFile(i),setTimeout(()=>{var d;r((d=a.view)==null?void 0:d.canvas,e)},10)};class BF{constructor(){De(this,"initialized",!1)}getState(){return _e.getState().memoState}async fetchAllMemos(){const t=yt.getState().settings;ut.checkDailyInMulti(t);const n=await ki.getMyMemos(t.EnabledLocationList.map(i=>i.value)),r=[...n.memos],o=[...n.commentMemos];return _e.dispatch({type:"SET_MEMOS",payload:{memos:r}}),_e.dispatch({type:"SET_COMMENT_MEMOS",payload:{commentMemos:o}}),this.initialized||(this.initialized=!0,dt.setLoaded(!0)),r}async updateTypeMemos(t){const n=await ki.updateSpecificTypeMemo(t),r=this.getState().memos.filter(o=>o.sourceType!==t);_e.dispatch({type:"SET_MEMOS",payload:{memos:[...r,...n.memos]}})}async removeTypeMemos(t){const n=this.getState().memos.filter(r=>r.sourceType!==t);_e.dispatch({type:"SET_MEMOS",payload:{memos:[...n]}})}async fetchDeletedMemos(){const t=await ki.getMyDeletedMemos();return t.sort((n,r)=>ut.getTimeStampByDate(r.deletedAt)-ut.getTimeStampByDate(n.deletedAt)),t}pushMemo(t){_e.dispatch({type:"INSERT_MEMO",payload:{memo:{...t}}})}pushCommentMemo(t){_e.dispatch({type:"INSERT_COMMENT_MEMO",payload:{memo:{...t}}})}getMemoById(t){for(const n of this.getState().memos)if(n.id===t)return n;return null}getCommentMemoById(t){for(const n of this.getState().commentMemos)if(n.id===t)return n;return null}getMemoByWebId(t){for(const n of this.getState().memos)if(n.webId===t||n.id===t)return n;return null}async updateMemoById(t,n,r){const o=this.getMemoByWebId(t);if(!o)return;let i=null;const a=r?{}:{content:n.content,rowStatus:n.rowStatus,pinned:n.pinned,deleted:!!n.deletedAt,thinoType:n.thinoType??""};switch(o.sourceType){case"DAILY":i=await al(o,{id:o.id,webId:n.id,...a});break;case"CANVAS":i=await il(o,{id:o.id,webId:n.id,...a});break;case"MULTI":i=await fs(o,{id:o.id,webId:n.id,...a});break;case"FILE":i=await ol(o,{id:o.id,webId:n.id,...a});break}if(!i)return o;_e.dispatch({type:"EDIT_MEMO",payload:i})}async archiveThinoBulk(t){const n=[];for(const r of t){let o;switch(r.sourceType){case"DAILY":o=await al(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(o);break;case"CANVAS":o=await il(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(o);break;case"MULTI":o=await fs(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(o);break;case"FILE":o=await ol(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(o);break}}return n.length>0?(_e.dispatch({type:"ARCHIVE_MEMO_BY_ID_BULK",payload:n}),n):t}async archiveMemo(t){let n=null;switch(t.sourceType){case"DAILY":n=await al(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"CANVAS":n=await il(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"MULTI":n=await fs(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"FILE":n=await ol(t,{id:t.id,rowStatus:"ARCHIVED"});break}return n?(_e.dispatch({type:"ARCHIVE_MEMO_BY_ID",payload:n}),n):t}async pushToUpdateList(t,n){_e.dispatch({type:"PREPARE_UPDATE_THINO",payload:{thino:t,originalId:n}})}async removePrepareUpdateThinoById(t){_e.dispatch({type:"REMOVE_PARTICULAR_PREPARE_UPDATE_THINO",payload:{originalId:t}})}async removePrepareUpdateThino(){_e.dispatch({type:"REMOVE_PREPARE_UPDATE_THINO",payload:null})}async unarchiveThinoBulk(t){const n=[];for(const r of t){let o;switch(r.sourceType){case"DAILY":o=await al(r,{id:r.id,rowStatus:"NORMAL"}),n.push(o);break;case"CANVAS":o=await il(r,{id:r.id,rowStatus:"NORMAL"}),n.push(o);break;case"MULTI":o=await fs(r,{id:r.id,rowStatus:"NORMAL"}),n.push(o);break;case"FILE":o=await ol(r,{id:r.id,rowStatus:"NORMAL"}),n.push(o);break}}return n.length>0?(_e.dispatch({type:"ARCHIVE_MEMO_BY_ID_BULK",payload:n}),n):t}async unarchiveMemo(t){let n=null;switch(t.sourceType){case"DAILY":n=await al(t,{id:t.id,rowStatus:"NORMAL"});break;case"CANVAS":n=await il(t,{id:t.id,rowStatus:"NORMAL"});break;case"MULTI":n=await fs(t,{id:t.id,rowStatus:"NORMAL"});break;case"FILE":n=await ol(t,{id:t.id,rowStatus:"NORMAL"});break}return _e.dispatch({type:"UNARCHIVE_MEMO_BY_ID",payload:n}),n}async hideMemoById(t){const n=this.getMemoById(t);if(!n)return n;let r=null;switch(n.sourceType){case"DAILY":r=await al(n,{id:n.id,deleted:!0});break;case"CANVAS":r=await il(n,{id:n.id,deleted:!0});break;case"MULTI":r=await fs(n,{id:n.id,deleted:!0});break;case"FILE":r=await ol(n,{id:n.id,deleted:!0});break}if(!r)return n;if(r)return r}async restoreMemoById(t){return await ki.restoreMemo(t)}async deleteMemoById(t,n){const r=this.getMemoById(t);try{switch(r.sourceType){case"DAILY":await ki.deleteMemoInDailyNote(r);break;case"CANVAS":await ki.deleteMemoInCanvas(r);break;case"MULTI":await ki.deleteMemoInMultiFiles(r);break;case"FILE":await ki.deleteMemoInSingleFile(r);break}_e.dispatch({type:"DELETE_MEMO_BY_ID",payload:{id:t}})}catch(u){console.error(u),new C.Notice(E("Failed to delete memo"))}if(n&&n==="local")return;const o=yt.getState().settings,i=yt.getState().app;!(i!=null&&i.loadLocalStorage("tokenForSync"))||!o.startSync||r.webId&&await Q6(r.webId)}async removeMemosInFile(t,n){var o,i;const r=[];try{if(t.path.endsWith(".md")&&!t.path.contains(".thino")&&!n){const u=this.getState().memos.filter(d=>d.path.trim()===t.path.trim());r.push(...u)}else if(t.path.contains("thino.canvas")){const u=this.getState().memos.filter(d=>d.path.trim()===t.path.trim());r.push(...u)}else if((o=t==null?void 0:t.parent)!=null&&o.path.contains(n)||!(t!=null&&t.parent)&&!((i=t==null?void 0:t.parent)!=null&&i.path)){const u=this.getState().memos.filter(d=>d.path.trim()===t.path.trim());u.length>0&&r.push(...u)}else t.path.endsWith(".md")&&t.path.contains(".thino")&&await Pb(t,r);const a=r.map(u=>u.id);_e.dispatch({type:"DELETE_MEMO_BY_ID_BATCH",payload:{ids:a}})}catch(a){console.error(a)}}async removeThinosByPath(t){const r=this.getState().memos.filter(o=>o.path===t).map(o=>o.id);_e.dispatch({type:"DELETE_MEMO_BY_ID_BATCH",payload:{ids:r}})}async updateMemosInFile(t,n){const r=[],o=async()=>{var i;if(t.path.endsWith(".md")&&!t.path.contains(".thino")&&!n){await Ox(t,r);return}else if(t.path.contains("thino.canvas")){await jx(t,r);return}else if((i=t==null?void 0:t.parent)!=null&&i.path.contains(n)&&!t.path.endsWith(".thino.md")){await Px(t,r);return}else if(t.path.endsWith(".thino.md")){console.error(t),await Pb(t,r);return}};try{await o(),_e.dispatch({type:"UPDATE_MEMO_BATCH",payload:{memos:r,path:t.path}})}catch(i){console.error(i)}}async updateMemoProperty(t){const n=ut.randomId(16),r=await fs(t,{id:n});_e.dispatch({type:"EDIT_MEMO_PATH",payload:r})}editMemo(t){const n=t.webId;_e.dispatch({type:"EDIT_MEMO",payload:t});const r=yt.getState().settings,o=yt.getState().app;if(!(!(o!=null&&o.loadLocalStorage("tokenForSync"))||!r.startSync))try{t&&n&&_w({id:n,content:t.content,rowStatus:t.rowStatus,pinned:t.pinned,ttime:t.deletedAt?C.moment(t.deletedAt,"YYYY/MM/DD HH:mm:ss").valueOf():0,thinoType:t.sourceType==="DAILY"?"DAILY":"FILE"})}catch(a){console.error(a)}}editMemoBulk(t){for(const n of t)this.editMemo(n);this.updateTagsState()}editCommentMemo(t){_e.dispatch({type:"EDIT_COMMENT_MEMO",payload:t})}getThinoViaKeyword(t){const{memos:n}=this.getState();return n.filter(o=>o.content.toLowerCase().includes(t==null?void 0:t.toLowerCase()))}updateTagsState(){const{memos:t}=this.getState(),n=new Set,r={};for(const o of t){const i=o.content.replace(/<[^>]*>/g,"").replace(/\`\`\`(.*)?\n[\s\S]*?\n\`\`\`/gm,"").replace(/\`([^\`].*?)\`/g,"");if(o.deletedAt!==""&&o.deletedAt)continue;[...Array.from(i.match(gr)||[]),...Array.from(i.match(jr)||[]),...Array.from(i.match(so)||[])].forEach(u=>{const d=u.replace(gr,"$1").replace(jr,"$1").replace(so,"$2").trim();/^\d+$/.test(d)||(n.add(d),r[d]=(r[d]||0)+1)})}_e.dispatch({type:"SET_TAGS",payload:{tags:Array.from(n),tagsNum:r}})}clearMemos(){_e.dispatch({type:"SET_MEMOS",payload:{memos:[]}})}async getLinkedMemos(t){const{memos:n}=this.getState();return n.filter(r=>r.content.includes(t))}async getCommentMemos(t){const{memos:n}=this.getState();return n.filter(r=>r.content.includes("comment: "+t))}async createMemoMultiFile({content:t,isList:n,name:r}){return await t8({content:t,isList:n,name:r})}async createMemoSingleFile({content:t,isList:n}){return await n8({content:t,isList:n})}async createOrPatchThinoFromWeb(t){const n=this.getState().memos;if(t.localId&&(n!=null&&n.some(i=>i.id===t.localId)))return await this.updateMemoById(t.localId,t,!0),null;if(n!=null&&n.some(i=>i.id===t.id)||n!=null&&n.some(i=>i.webId===t.id))return await this.updateMemoById(t.id,t,!1),null;let r=t.sourceType;const o=yt.getState().settings;switch(o&&(o!=null&&o.saveThinoType)&&(r=o.saveThinoType!=="FILE"?o.saveThinoType:t.sourceType),r){case"FILE":case"MULTI":case"CANVAS":return await ED(t);case"DAILY":return await o8(t);default:return await ED(t)}}async initSync(){const n=this.getState().memos.filter(o=>!o.webId),r=await K6(n);for(const o of r)await this.createOrPatchThinoFromWeb(o)}async createMemoCanvas({text:t,isList:n}){return await r8({content:t,isList:n})}async createMemoDaily(t,n){return await CD(t,n)}async pinMemoById(t){const n=this.getMemoById(t),r=await v8(n);_e.dispatch({type:"PIN_MEMO",payload:r});try{const o=yt.getState().settings,i=yt.getState().app;if((i==null?void 0:i.loadLocalStorage("tokenForSync"))&&o.startSync){const u=await _w({id:r.webId,pinned:!0});this.editMemo(u)}}catch(o){console.error(o)}}async unpinMemoById(t){const n=this.getMemoById(t),r=await w8(n);_e.dispatch({type:"PIN_MEMO",payload:r});try{const o=yt.getState().settings,i=yt.getState().app;if((i==null?void 0:i.loadLocalStorage("tokenForSync"))&&o.startSync){const u=await _w({id:r.webId,pinned:!1});this.editMemo(u)}}catch(o){console.error(o)}}async createCommentMemo(t,n,r,o,i){return await LF(t,n,r,o,i)}async importMemos(t,n,r){return await CD(t,n,r)}async createThino({content:t,isList:n,type:r,name:o}){let i=null;switch(r.toLowerCase()){case"canvas":i=await je.createMemoCanvas({text:t,isList:n});break;case"multi":i=await je.createMemoMultiFile({content:t,isList:n,name:o});break;case"daily":i=await je.createMemoDaily(t,n);break;case"file":i=await je.createMemoSingleFile({content:t,isList:n});break;default:i=await je.createMemoDaily(t,n);break}const a=yt.getState().settings,u=yt.getState().app,d=u==null?void 0:u.loadLocalStorage("tokenForSync");return i&&d&&a.startSync&&setTimeout(async()=>{try{const f=await M1({content:t,thinoType:r==="DAILY"?"DAILY":"FILE"});await this.updateMemoById(i.id,f,!0)}catch(f){console.error(f)}},200),i}async openThinoByID(t){const n=this.getMemoById(t);if(n)switch(n.sourceType){case"DAILY":await U1(n.id,n.path);break;case"CANVAS":await V1(n.id,n.path);break;case"MULTI":await Y1(n.path);break;case"FILE":await z1(n.id,n.path);break}}async updateMemo(t,n,r){const o=this.getMemoById(t);if(o){let i=null;switch(o.sourceType){case"DAILY":i=await al(o,{id:o.id,content:n,thinoType:r||o.thinoType});break;case"CANVAS":i=await il(o,{id:o.id,content:n,thinoType:r||o.thinoType});break;case"MULTI":i=await fs(o,{id:o.id,content:n,thinoType:r||o.thinoType});break;case"FILE":i=await ol(o,{id:o.id,content:n,thinoType:r||o.thinoType})}if(i)return i}return o}}const je=new BF;class HF{getState(){return _e.getState().queryState}async getMyAllQueries(){const t=st.getState().query.filter,n=this.getQueryById(t),r=await ki.getMyQueries();return _e.dispatch({type:"SET_QUERIES",payload:{queries:[...r,...n?[n]:[]]}}),r}getQueryById(t){return this.getState().queries.find(n=>n.id===t)}pushQuery(t){_e.dispatch({type:"INSERT_QUERY",payload:{query:{...t}}})}editQuery(t){_e.dispatch({type:"UPDATE_QUERY",payload:t})}async deleteQuery(t){await ki.deleteQueryById(t),_e.dispatch({type:"DELETE_QUERY_BY_ID",payload:{id:t}})}async createQuery(t,n){return await ki.createQuery(t,n)}createTempQuery(t,n){return D6(t,n)}async updateQuery(t,n,r){return await ki.updateQuery(t,n,r)}async pinQuery(t){await ki.pinQuery(t)}async unpinQuery(t){await ki.unpinQuery(t)}}const tn=new HF;class YF{async upload(t){const{vault:n,fileManager:r}=_e.getState().dailyNotesState.app,o=await t.arrayBuffer(),i=UF(t.type),a=su(),u=C.moment(),d=e0(u,a);let f;if(d)d instanceof C.TFile&&(f=await n.createBinary(await n.getAvailablePathForAttachments(`Pasted Image ${C.moment().format("YYYYMMDDHHmmss")}`,i,d),o));else{const m=await Ix(u);f=await n.createBinary(await n.getAvailablePathForAttachments(`Pasted Image ${C.moment().format("YYYYMMDDHHmmss")}`,i,m),o)}return r.generateMarkdownLink(f,f.path,"","")}async parseHtml(t){const n=await t.text(),r=document.createElement("html");r.innerHTML=n;const o=Array.from(r.getElementsByClassName("memo"));for(const i of o){const a=i.getElementsByClassName("content")[0],u=C.htmlToMarkdown(a.innerHTML),d=await je.importMemos(u,!0,C.moment(i.getElementsByClassName("time")[0].innerHTML));je.pushMemo(d)}}}const UF=e=>{var t;return(t=/^image\/(.+)$/.exec(e))==null?void 0:t[1]},W1=new YF;var Pa={},BE={exports:{}},Mi={},$w={exports:{}},qw={},oT;function zF(){return oT||(oT=1,function(e){function t(oe,he){var K=oe.length;oe.push(he);e:for(;0<K;){var re=K-1>>>1,pe=oe[re];if(0<o(pe,he))oe[re]=he,oe[K]=pe,K=re;else break e}}function n(oe){return oe.length===0?null:oe[0]}function r(oe){if(oe.length===0)return null;var he=oe[0],K=oe.pop();if(K!==he){oe[0]=K;e:for(var re=0,pe=oe.length,Ie=pe>>>1;re<Ie;){var Oe=2*(re+1)-1,Ne=oe[Oe],Be=Oe+1,Je=oe[Be];if(0>o(Ne,K))Be<pe&&0>o(Je,Ne)?(oe[re]=Je,oe[Be]=K,re=Be):(oe[re]=Ne,oe[Oe]=K,re=Oe);else if(Be<pe&&0>o(Je,K))oe[re]=Je,oe[Be]=K,re=Be;else break e}}return he}function o(oe,he){var K=oe.sortIndex-he.sortIndex;return K!==0?K:oe.id-he.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var d=[],f=[],m=1,g=null,v=3,w=!1,D=!1,T=!1,I=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(oe){for(var he=n(f);he!==null;){if(he.callback===null)r(f);else if(he.startTime<=oe)r(f),he.sortIndex=he.expirationTime,t(d,he);else break;he=n(f)}}function j(oe){if(T=!1,R(oe),!D)if(n(d)!==null)D=!0,W(B);else{var he=n(f);he!==null&&de(j,he.startTime-oe)}}function B(oe,he){D=!1,T&&(T=!1,k(U),U=-1),w=!0;var K=v;try{for(R(he),g=n(d);g!==null&&(!(g.expirationTime>he)||oe&&!te());){var re=g.callback;if(typeof re=="function"){g.callback=null,v=g.priorityLevel;var pe=re(g.expirationTime<=he);he=e.unstable_now(),typeof pe=="function"?g.callback=pe:g===n(d)&&r(d),R(he)}else r(d);g=n(d)}if(g!==null)var Ie=!0;else{var Oe=n(f);Oe!==null&&de(j,Oe.startTime-he),Ie=!1}return Ie}finally{g=null,v=K,w=!1}}var L=!1,Z=null,U=-1,z=5,$=-1;function te(){return!(e.unstable_now()-$<z)}function Q(){if(Z!==null){var oe=e.unstable_now();$=oe;var he=!0;try{he=Z(!0,oe)}finally{he?ue():(L=!1,Z=null)}}else L=!1}var ue;if(typeof A=="function")ue=function(){A(Q)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,le=ee.port2;ee.port1.onmessage=Q,ue=function(){le.postMessage(null)}}else ue=function(){I(Q,0)};function W(oe){Z=oe,L||(L=!0,ue())}function de(oe,he){U=I(function(){oe(e.unstable_now())},he)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(oe){oe.callback=null},e.unstable_continueExecution=function(){D||w||(D=!0,W(B))},e.unstable_forceFrameRate=function(oe){0>oe||125<oe?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<oe?Math.floor(1e3/oe):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(oe){switch(v){case 1:case 2:case 3:var he=3;break;default:he=v}var K=v;v=he;try{return oe()}finally{v=K}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(oe,he){switch(oe){case 1:case 2:case 3:case 4:case 5:break;default:oe=3}var K=v;v=oe;try{return he()}finally{v=K}},e.unstable_scheduleCallback=function(oe,he,K){var re=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?re+K:re):K=re,oe){case 1:var pe=-1;break;case 2:pe=250;break;case 5:pe=1073741823;break;case 4:pe=1e4;break;default:pe=5e3}return pe=K+pe,oe={id:m++,callback:he,priorityLevel:oe,startTime:K,expirationTime:pe,sortIndex:-1},K>re?(oe.sortIndex=K,t(f,oe),n(d)===null&&oe===n(f)&&(T?(k(U),U=-1):T=!0,de(j,K-re))):(oe.sortIndex=pe,t(d,oe),D||w||(D=!0,W(B))),oe},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(oe){var he=v;return function(){var K=v;v=he;try{return oe.apply(this,arguments)}finally{v=K}}}}(qw)),qw}var iT;function VF(){return iT||(iT=1,$w.exports=zF()),$w.exports}var aT;function WF(){if(aT)return Mi;aT=1;var e=F,t=VF();function n(s){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+s,p=1;p<arguments.length;p++)l+="&args[]="+encodeURIComponent(arguments[p]);return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function i(s,l){a(s,l),a(s+"Capture",l)}function a(s,l){for(o[s]=l,s=0;s<l.length;s++)r.add(l[s])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},g={};function v(s){return d.call(g,s)?!0:d.call(m,s)?!1:f.test(s)?g[s]=!0:(m[s]=!0,!1)}function w(s,l,p,b){if(p!==null&&p.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return b?!1:p!==null?!p.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function D(s,l,p,b){if(l===null||typeof l>"u"||w(s,l,p,b))return!0;if(b)return!1;if(p!==null)switch(p.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function T(s,l,p,b,x,P,V){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=b,this.attributeNamespace=x,this.mustUseProperty=p,this.propertyName=s,this.type=l,this.sanitizeURL=P,this.removeEmptyString=V}var I={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){I[s]=new T(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var l=s[0];I[l]=new T(l,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){I[s]=new T(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){I[s]=new T(s,2,!1,s,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(s){I[s]=new T(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){I[s]=new T(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){I[s]=new T(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){I[s]=new T(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){I[s]=new T(s,5,!1,s.toLowerCase(),null,!1,!1)});var k=/[\-:]([a-z])/g;function A(s){return s[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(s){var l=s.replace(k,A);I[l]=new T(l,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var l=s.replace(k,A);I[l]=new T(l,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var l=s.replace(k,A);I[l]=new T(l,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){I[s]=new T(s,1,!1,s.toLowerCase(),null,!1,!1)}),I.xlinkHref=new T("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){I[s]=new T(s,1,!1,s.toLowerCase(),null,!0,!0)});function R(s,l,p,b){var x=I.hasOwnProperty(l)?I[l]:null;(x!==null?x.type!==0:b||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(D(l,p,x,b)&&(p=null),b||x===null?v(l)&&(p===null?s.removeAttribute(l):s.setAttribute(l,""+p)):x.mustUseProperty?s[x.propertyName]=p===null?x.type===3?!1:"":p:(l=x.attributeName,b=x.attributeNamespace,p===null?s.removeAttribute(l):(x=x.type,p=x===3||x===4&&p===!0?"":""+p,b?s.setAttributeNS(b,l,p):s.setAttribute(l,p))))}var j=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,B=Symbol.for("react.element"),L=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),te=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),oe=Symbol.iterator;function he(s){return s===null||typeof s!="object"?null:(s=oe&&s[oe]||s["@@iterator"],typeof s=="function"?s:null)}var K=Object.assign,re;function pe(s){if(re===void 0)try{throw Error()}catch(p){var l=p.stack.trim().match(/\n( *(at )?)/);re=l&&l[1]||""}return`
|
|
|
`+re+s}var Ie=!1;function Oe(s,l){if(!s||Ie)return"";Ie=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(Le){var b=Le}Reflect.construct(s,[],l)}else{try{l.call()}catch(Le){b=Le}s.call(l.prototype)}else{try{throw Error()}catch(Le){b=Le}s()}}catch(Le){if(Le&&b&&typeof Le.stack=="string"){for(var x=Le.stack.split(`
|
|
|
`),P=b.stack.split(`
|
|
|
`),V=x.length-1,ce=P.length-1;1<=V&&0<=ce&&x[V]!==P[ce];)ce--;for(;1<=V&&0<=ce;V--,ce--)if(x[V]!==P[ce]){if(V!==1||ce!==1)do if(V--,ce--,0>ce||x[V]!==P[ce]){var ye=`
|
|
|
`+x[V].replace(" at new "," at ");return s.displayName&&ye.includes("<anonymous>")&&(ye=ye.replace("<anonymous>",s.displayName)),ye}while(1<=V&&0<=ce);break}}}finally{Ie=!1,Error.prepareStackTrace=p}return(s=s?s.displayName||s.name:"")?pe(s):""}function Ne(s){switch(s.tag){case 5:return pe(s.type);case 16:return pe("Lazy");case 13:return pe("Suspense");case 19:return pe("SuspenseList");case 0:case 2:case 15:return s=Oe(s.type,!1),s;case 11:return s=Oe(s.type.render,!1),s;case 1:return s=Oe(s.type,!0),s;default:return""}}function Be(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case Z:return"Fragment";case L:return"Portal";case z:return"Profiler";case U:return"StrictMode";case ue:return"Suspense";case ee:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case te:return(s.displayName||"Context")+".Consumer";case $:return(s._context.displayName||"Context")+".Provider";case Q:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case le:return l=s.displayName||null,l!==null?l:Be(s.type)||"Memo";case W:l=s._payload,s=s._init;try{return Be(s(l))}catch{}}return null}function Je(s){var l=s.type;switch(s.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=l.render,s=s.displayName||s.name||"",l.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Be(l);case 8:return l===U?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function ze(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Qe(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function It(s){var l=Qe(s)?"checked":"value",p=Object.getOwnPropertyDescriptor(s.constructor.prototype,l),b=""+s[l];if(!s.hasOwnProperty(l)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var x=p.get,P=p.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return x.call(this)},set:function(V){b=""+V,P.call(this,V)}}),Object.defineProperty(s,l,{enumerable:p.enumerable}),{getValue:function(){return b},setValue:function(V){b=""+V},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function Zt(s){s._valueTracker||(s._valueTracker=It(s))}function Re(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var p=l.getValue(),b="";return s&&(b=Qe(s)?s.checked?"true":"false":s.value),s=b,s!==p?(l.setValue(s),!0):!1}function tt(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function at(s,l){var p=l.checked;return K({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:p??s._wrapperState.initialChecked})}function gt(s,l){var p=l.defaultValue==null?"":l.defaultValue,b=l.checked!=null?l.checked:l.defaultChecked;p=ze(l.value!=null?l.value:p),s._wrapperState={initialChecked:b,initialValue:p,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function Et(s,l){l=l.checked,l!=null&&R(s,"checked",l,!1)}function Tt(s,l){Et(s,l);var p=ze(l.value),b=l.type;if(p!=null)b==="number"?(p===0&&s.value===""||s.value!=p)&&(s.value=""+p):s.value!==""+p&&(s.value=""+p);else if(b==="submit"||b==="reset"){s.removeAttribute("value");return}l.hasOwnProperty("value")?zt(s,l.type,p):l.hasOwnProperty("defaultValue")&&zt(s,l.type,ze(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(s.defaultChecked=!!l.defaultChecked)}function qt(s,l,p){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var b=l.type;if(!(b!=="submit"&&b!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+s._wrapperState.initialValue,p||l===s.value||(s.value=l),s.defaultValue=l}p=s.name,p!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,p!==""&&(s.name=p)}function zt(s,l,p){(l!=="number"||tt(s.ownerDocument)!==s)&&(p==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+p&&(s.defaultValue=""+p))}var $t=Array.isArray;function Gt(s,l,p,b){if(s=s.options,l){l={};for(var x=0;x<p.length;x++)l["$"+p[x]]=!0;for(p=0;p<s.length;p++)x=l.hasOwnProperty("$"+s[p].value),s[p].selected!==x&&(s[p].selected=x),x&&b&&(s[p].defaultSelected=!0)}else{for(p=""+ze(p),l=null,x=0;x<s.length;x++){if(s[x].value===p){s[x].selected=!0,b&&(s[x].defaultSelected=!0);return}l!==null||s[x].disabled||(l=s[x])}l!==null&&(l.selected=!0)}}function cn(s,l){if(l.dangerouslySetInnerHTML!=null)throw Error(n(91));return K({},l,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function Xt(s,l){var p=l.value;if(p==null){if(p=l.children,l=l.defaultValue,p!=null){if(l!=null)throw Error(n(92));if($t(p)){if(1<p.length)throw Error(n(93));p=p[0]}l=p}l==null&&(l=""),p=l}s._wrapperState={initialValue:ze(p)}}function Qn(s,l){var p=ze(l.value),b=ze(l.defaultValue);p!=null&&(p=""+p,p!==s.value&&(s.value=p),l.defaultValue==null&&s.defaultValue!==p&&(s.defaultValue=p)),b!=null&&(s.defaultValue=""+b)}function En(s){var l=s.textContent;l===s._wrapperState.initialValue&&l!==""&&l!==null&&(s.value=l)}function Cr(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function yr(s,l){return s==null||s==="http://www.w3.org/1999/xhtml"?Cr(l):s==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var Rn,ji=function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,p,b,x){MSApp.execUnsafeLocalFunction(function(){return s(l,p,b,x)})}:s}(function(s,l){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=l;else{for(Rn=Rn||document.createElement("div"),Rn.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=Rn.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;l.firstChild;)s.appendChild(l.firstChild)}});function xo(s,l){if(l){var p=s.firstChild;if(p&&p===s.lastChild&&p.nodeType===3){p.nodeValue=l;return}}s.textContent=l}var Uo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Li=["Webkit","ms","Moz","O"];Object.keys(Uo).forEach(function(s){Li.forEach(function(l){l=l+s.charAt(0).toUpperCase()+s.substring(1),Uo[l]=Uo[s]})});function Eo(s,l,p){return l==null||typeof l=="boolean"||l===""?"":p||typeof l!="number"||l===0||Uo.hasOwnProperty(s)&&Uo[s]?(""+l).trim():l+"px"}function Ri(s,l){s=s.style;for(var p in l)if(l.hasOwnProperty(p)){var b=p.indexOf("--")===0,x=Eo(p,l[p],b);p==="float"&&(p="cssFloat"),b?s.setProperty(p,x):s[p]=x}}var ua=K({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ui(s,l){if(l){if(ua[s]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(n(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(n(61))}if(l.style!=null&&typeof l.style!="object")throw Error(n(62))}}function _i(s,l){if(s.indexOf("-")===-1)return typeof l.is=="string";switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ne=null;function ge(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Ae=null,He=null,Ye=null;function et(s){if(s=Jr(s)){if(typeof Ae!="function")throw Error(n(280));var l=s.stateNode;l&&(l=ef(l),Ae(s.stateNode,s.type,l))}}function nt(s){He?Ye?Ye.push(s):Ye=[s]:He=s}function kt(){if(He){var s=He,l=Ye;if(Ye=He=null,et(s),l)for(s=0;s<l.length;s++)et(l[s])}}function en(s,l){return s(l)}function jn(){}var wn=!1;function Lr(s,l,p){if(wn)return s(l,p);wn=!0;try{return en(s,l,p)}finally{wn=!1,(He!==null||Ye!==null)&&(jn(),kt())}}function _n(s,l){var p=s.stateNode;if(p===null)return null;var b=ef(p);if(b===null)return null;p=b[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(b=!b.disabled)||(s=s.type,b=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!b;break e;default:s=!1}if(s)return null;if(p&&typeof p!="function")throw Error(n(231,l,typeof p));return p}var rr=!1;if(u)try{var Rr={};Object.defineProperty(Rr,"passive",{get:function(){rr=!0}}),window.addEventListener("test",Rr,Rr),window.removeEventListener("test",Rr,Rr)}catch{rr=!1}function ca(s,l,p,b,x,P,V,ce,ye){var Le=Array.prototype.slice.call(arguments,3);try{l.apply(p,Le)}catch(Ge){this.onError(Ge)}}var bn=!1,co=null,fo=!1,Mr=null,zo={onError:function(s){bn=!0,co=s}};function ho(s,l,p,b,x,P,V,ce,ye){bn=!1,co=null,ca.apply(zo,arguments)}function bl(s,l,p,b,x,P,V,ce,ye){if(ho.apply(this,arguments),bn){if(bn){var Le=co;bn=!1,co=null}else throw Error(n(198));fo||(fo=!0,Mr=Le)}}function Bi(s){var l=s,p=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,l.flags&4098&&(p=l.return),s=l.return;while(s)}return l.tag===3?p:null}function Hi(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function cu(s){if(Bi(s)!==s)throw Error(n(188))}function Sl(s){var l=s.alternate;if(!l){if(l=Bi(s),l===null)throw Error(n(188));return l!==s?null:s}for(var p=s,b=l;;){var x=p.return;if(x===null)break;var P=x.alternate;if(P===null){if(b=x.return,b!==null){p=b;continue}break}if(x.child===P.child){for(P=x.child;P;){if(P===p)return cu(x),s;if(P===b)return cu(x),l;P=P.sibling}throw Error(n(188))}if(p.return!==b.return)p=x,b=P;else{for(var V=!1,ce=x.child;ce;){if(ce===p){V=!0,p=x,b=P;break}if(ce===b){V=!0,b=x,p=P;break}ce=ce.sibling}if(!V){for(ce=P.child;ce;){if(ce===p){V=!0,p=P,b=x;break}if(ce===b){V=!0,b=P,p=x;break}ce=ce.sibling}if(!V)throw Error(n(189))}}if(p.alternate!==b)throw Error(n(190))}if(p.tag!==3)throw Error(n(188));return p.stateNode.current===p?s:l}function Ba(s){return s=Sl(s),s!==null?da(s):null}function da(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var l=da(s);if(l!==null)return l;s=s.sibling}return null}var Ha=t.unstable_scheduleCallback,Dl=t.unstable_cancelCallback,Ya=t.unstable_shouldYield,du=t.unstable_requestPaint,Sn=t.unstable_now,_r=t.unstable_getCurrentPriorityLevel,vs=t.unstable_ImmediatePriority,ws=t.unstable_UserBlockingPriority,Yi=t.unstable_NormalPriority,Tl=t.unstable_LowPriority,ci=t.unstable_IdlePriority,Vo=null,po=null;function Ua(s){if(po&&typeof po.onCommitFiberRoot=="function")try{po.onCommitFiberRoot(Vo,s,void 0,(s.current.flags&128)===128)}catch{}}var vr=Math.clz32?Math.clz32:Ds,bs=Math.log,Ss=Math.LN2;function Ds(s){return s>>>=0,s===0?32:31-(bs(s)/Ss|0)|0}var Wo=64,za=4194304;function Ui(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function Zo(s,l){var p=s.pendingLanes;if(p===0)return 0;var b=0,x=s.suspendedLanes,P=s.pingedLanes,V=p&268435455;if(V!==0){var ce=V&~x;ce!==0?b=Ui(ce):(P&=V,P!==0&&(b=Ui(P)))}else V=p&~x,V!==0?b=Ui(V):P!==0&&(b=Ui(P));if(b===0)return 0;if(l!==0&&l!==b&&!(l&x)&&(x=b&-b,P=l&-l,x>=P||x===16&&(P&4194240)!==0))return l;if(b&4&&(b|=p&16),l=s.entangledLanes,l!==0)for(s=s.entanglements,l&=b;0<l;)p=31-vr(l),x=1<<p,b|=s[p],l&=~x;return b}function M(s,l){switch(s){case 1:case 2:case 4:return l+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function H(s,l){for(var p=s.suspendedLanes,b=s.pingedLanes,x=s.expirationTimes,P=s.pendingLanes;0<P;){var V=31-vr(P),ce=1<<V,ye=x[V];ye===-1?(!(ce&p)||ce&b)&&(x[V]=M(ce,l)):ye<=l&&(s.expiredLanes|=ce),P&=~ce}}function J(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function ae(){var s=Wo;return Wo<<=1,!(Wo&4194240)&&(Wo=64),s}function ke(s){for(var l=[],p=0;31>p;p++)l.push(s);return l}function Te(s,l,p){s.pendingLanes|=l,l!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,l=31-vr(l),s[l]=p}function Ue(s,l){var p=s.pendingLanes&~l;s.pendingLanes=l,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=l,s.mutableReadLanes&=l,s.entangledLanes&=l,l=s.entanglements;var b=s.eventTimes;for(s=s.expirationTimes;0<p;){var x=31-vr(p),P=1<<x;l[x]=0,b[x]=-1,s[x]=-1,p&=~P}}function ot(s,l){var p=s.entangledLanes|=l;for(s=s.entanglements;p;){var b=31-vr(p),x=1<<b;x&l|s[b]&l&&(s[b]|=l),p&=~x}}var ct=0;function Nt(s){return s&=-s,1<s?4<s?s&268435455?16:536870912:4:1}var Yt,Tn,Co,mo,Br,di=!1,go=[],Mo=null,qr=null,$o=null,yo=new Map,fa=new Map,ha=[],Jh="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function _d(s,l){switch(s){case"focusin":case"focusout":Mo=null;break;case"dragenter":case"dragleave":qr=null;break;case"mouseover":case"mouseout":$o=null;break;case"pointerover":case"pointerout":yo.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":fa.delete(l.pointerId)}}function Va(s,l,p,b,x,P){return s===null||s.nativeEvent!==P?(s={blockedOn:l,domEventName:p,eventSystemFlags:b,nativeEvent:P,targetContainers:[x]},l!==null&&(l=Jr(l),l!==null&&Tn(l)),s):(s.eventSystemFlags|=b,l=s.targetContainers,x!==null&&l.indexOf(x)===-1&&l.push(x),s)}function Kh(s,l,p,b,x){switch(l){case"focusin":return Mo=Va(Mo,s,l,p,b,x),!0;case"dragenter":return qr=Va(qr,s,l,p,b,x),!0;case"mouseover":return $o=Va($o,s,l,p,b,x),!0;case"pointerover":var P=x.pointerId;return yo.set(P,Va(yo.get(P)||null,s,l,p,b,x)),!0;case"gotpointercapture":return P=x.pointerId,fa.set(P,Va(fa.get(P)||null,s,l,p,b,x)),!0}return!1}function fi(s){var l=va(s.target);if(l!==null){var p=Bi(l);if(p!==null){if(l=p.tag,l===13){if(l=Hi(p),l!==null){s.blockedOn=l,Br(s.priority,function(){Co(p)});return}}else if(l===3&&p.stateNode.current.memoizedState.isDehydrated){s.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Ts(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var p=xs(s.domEventName,s.eventSystemFlags,l[0],s.nativeEvent);if(p===null){p=s.nativeEvent;var b=new p.constructor(p.type,p);ne=b,p.target.dispatchEvent(b),ne=null}else return l=Jr(p),l!==null&&Tn(l),s.blockedOn=p,!1;l.shift()}return!0}function Il(s,l,p){Ts(s)&&p.delete(l)}function Cn(){di=!1,Mo!==null&&Ts(Mo)&&(Mo=null),qr!==null&&Ts(qr)&&(qr=null),$o!==null&&Ts($o)&&($o=null),yo.forEach(Il),fa.forEach(Il)}function on(s,l){s.blockedOn===l&&(s.blockedOn=null,di||(di=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Cn)))}function an(s){function l(x){return on(x,s)}if(0<go.length){on(go[0],s);for(var p=1;p<go.length;p++){var b=go[p];b.blockedOn===s&&(b.blockedOn=null)}}for(Mo!==null&&on(Mo,s),qr!==null&&on(qr,s),$o!==null&&on($o,s),yo.forEach(l),fa.forEach(l),p=0;p<ha.length;p++)b=ha[p],b.blockedOn===s&&(b.blockedOn=null);for(;0<ha.length&&(p=ha[0],p.blockedOn===null);)fi(p),p.blockedOn===null&&ha.shift()}var hi=j.ReactCurrentBatchConfig,qo=!0;function fu(s,l,p,b){var x=ct,P=hi.transition;hi.transition=null;try{ct=1,hu(s,l,p,b)}finally{ct=x,hi.transition=P}}function Wa(s,l,p,b){var x=ct,P=hi.transition;hi.transition=null;try{ct=4,hu(s,l,p,b)}finally{ct=x,hi.transition=P}}function hu(s,l,p,b){if(qo){var x=xs(s,l,p,b);if(x===null)np(s,l,b,Is,p),_d(s,b);else if(Kh(x,s,l,p,b))b.stopPropagation();else if(_d(s,b),l&4&&-1<Jh.indexOf(s)){for(;x!==null;){var P=Jr(x);if(P!==null&&Yt(P),P=xs(s,l,p,b),P===null&&np(s,l,b,Is,p),P===x)break;x=P}x!==null&&b.stopPropagation()}else np(s,l,b,null,p)}}var Is=null;function xs(s,l,p,b){if(Is=null,s=ge(b),s=va(s),s!==null)if(l=Bi(s),l===null)s=null;else if(p=l.tag,p===13){if(s=Hi(l),s!==null)return s;s=null}else if(p===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null);return Is=s,null}function bc(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(_r()){case vs:return 1;case ws:return 4;case Yi:case Tl:return 16;case ci:return 536870912;default:return 16}default:return 16}}var An=null,Es=null,pi=null;function Sc(){if(pi)return pi;var s,l=Es,p=l.length,b,x="value"in An?An.value:An.textContent,P=x.length;for(s=0;s<p&&l[s]===x[s];s++);var V=p-s;for(b=1;b<=V&&l[p-b]===x[P-b];b++);return pi=x.slice(s,1<b?1-b:void 0)}function zi(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function kr(){return!0}function Cs(){return!1}function Nr(s){function l(p,b,x,P,V){this._reactName=p,this._targetInst=x,this.type=b,this.nativeEvent=P,this.target=V,this.currentTarget=null;for(var ce in s)s.hasOwnProperty(ce)&&(p=s[ce],this[ce]=p?p(P):P[ce]);return this.isDefaultPrevented=(P.defaultPrevented!=null?P.defaultPrevented:P.returnValue===!1)?kr:Cs,this.isPropagationStopped=Cs,this}return K(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=kr)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=kr)},persist:function(){},isPersistent:kr}),l}var Za={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pa=Nr(Za),Ms=K({},Za,{view:0,detail:0}),pu=Nr(Ms),lr,$a,or,xl=K({},Ms,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yu,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==or&&(or&&s.type==="mousemove"?(lr=s.screenX-or.screenX,$a=s.screenY-or.screenY):$a=lr=0,or=s),lr)},movementY:function(s){return"movementY"in s?s.movementY:$a}}),mu=Nr(xl),Vi=K({},xl,{dataTransfer:0}),ks=Nr(Vi),Hr=K({},Ms,{relatedTarget:0}),In=Nr(Hr),mi=K({},Za,{animationName:0,elapsedTime:0,pseudoElement:0}),Dc=Nr(mi),Bd=K({},Za,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),Ns=Nr(Bd),Hd=K({},Za,{data:0}),Tc=Nr(Hd),gu={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},El={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Cl={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qa(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=Cl[s])?!!l[s]:!1}function yu(){return qa}var vu=K({},Ms,{key:function(s){if(s.key){var l=gu[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=zi(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?El[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yu,charCode:function(s){return s.type==="keypress"?zi(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?zi(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),Ic=Nr(vu),N=K({},xl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_=Nr(N),q=K({},Ms,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yu}),ie=Nr(q),Fe=K({},Za,{propertyName:0,elapsedTime:0,pseudoElement:0}),xe=Nr(Fe),We=K({},xl,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),rt=Nr(We),St=[9,13,27,32],Vt=u&&"CompositionEvent"in window,jt=null;u&&"documentMode"in document&&(jt=document.documentMode);var Mn=u&&"TextEvent"in window&&!jt,Yr=u&&(!Vt||jt&&8<jt&&11>=jt),ko=" ",No=!1;function Ml(s,l){switch(s){case"keyup":return St.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xc(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var ma=!1;function wu(s,l){switch(s){case"compositionend":return xc(l);case"keypress":return l.which!==32?null:(No=!0,ko);case"textInput":return s=l.data,s===ko&&No?null:s;default:return null}}function K0(s,l){if(ma)return s==="compositionend"||!Vt&&Ml(s,l)?(s=Sc(),pi=Es=An=null,ma=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return Yr&&l.locale!=="ko"?null:l.data;default:return null}}var Q0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Yd(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!Q0[s.type]:l==="textarea"}function Qh(s,l,p,b){nt(b),l=Jd(l,"onChange"),0<l.length&&(p=new pa("onChange","change",null,p,b),s.push({event:p,listeners:l}))}var gi=null,As=null;function X0(s){Fg(s,0)}function Ud(s){var l=Jt(s);if(Re(l))return s}function ew(s,l){if(s==="change")return l}var kl=!1;if(u){var Go;if(u){var zd="oninput"in document;if(!zd){var Eg=document.createElement("div");Eg.setAttribute("oninput","return;"),zd=typeof Eg.oninput=="function"}Go=zd}else Go=!1;kl=Go&&(!document.documentMode||9<document.documentMode)}function Cg(){gi&&(gi.detachEvent("onpropertychange",Mg),As=gi=null)}function Mg(s){if(s.propertyName==="value"&&Ud(As)){var l=[];Qh(l,As,s,ge(s)),Lr(X0,l)}}function tw(s,l,p){s==="focusin"?(Cg(),gi=l,As=p,gi.attachEvent("onpropertychange",Mg)):s==="focusout"&&Cg()}function nw(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Ud(As)}function bu(s,l){if(s==="click")return Ud(l)}function be(s,l){if(s==="input"||s==="change")return Ud(l)}function Ve(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var Pe=typeof Object.is=="function"?Object.is:Ve;function pt(s,l){if(Pe(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var p=Object.keys(s),b=Object.keys(l);if(p.length!==b.length)return!1;for(b=0;b<p.length;b++){var x=p[b];if(!d.call(l,x)||!Pe(s[x],l[x]))return!1}return!0}function Wt(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function pn(s,l){var p=Wt(s);s=0;for(var b;p;){if(p.nodeType===3){if(b=s+p.textContent.length,s<=l&&b>=l)return{node:p,offset:l-s};s=b}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=Wt(p)}}function ur(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?ur(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function kn(){for(var s=window,l=tt();l instanceof s.HTMLIFrameElement;){try{var p=typeof l.contentWindow.location.href=="string"}catch{p=!1}if(p)s=l.contentWindow;else break;l=tt(s.document)}return l}function Ec(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}function rw(s){var l=kn(),p=s.focusedElem,b=s.selectionRange;if(l!==p&&p&&p.ownerDocument&&ur(p.ownerDocument.documentElement,p)){if(b!==null&&Ec(p)){if(l=b.start,s=b.end,s===void 0&&(s=l),"selectionStart"in p)p.selectionStart=l,p.selectionEnd=Math.min(s,p.value.length);else if(s=(l=p.ownerDocument||document)&&l.defaultView||window,s.getSelection){s=s.getSelection();var x=p.textContent.length,P=Math.min(b.start,x);b=b.end===void 0?P:Math.min(b.end,x),!s.extend&&P>b&&(x=b,b=P,P=x),x=pn(p,P);var V=pn(p,b);x&&V&&(s.rangeCount!==1||s.anchorNode!==x.node||s.anchorOffset!==x.offset||s.focusNode!==V.node||s.focusOffset!==V.offset)&&(l=l.createRange(),l.setStart(x.node,x.offset),s.removeAllRanges(),P>b?(s.addRange(l),s.extend(V.node,V.offset)):(l.setEnd(V.node,V.offset),s.addRange(l)))}}for(l=[],s=p;s=s.parentNode;)s.nodeType===1&&l.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<l.length;p++)s=l[p],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var yi=u&&"documentMode"in document&&11>=document.documentMode,Ga=null,Xh=null,ga=null,Su=!1;function Cc(s,l,p){var b=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Su||Ga==null||Ga!==tt(b)||(b=Ga,"selectionStart"in b&&Ec(b)?b={start:b.selectionStart,end:b.selectionEnd}:(b=(b.ownerDocument&&b.ownerDocument.defaultView||window).getSelection(),b={anchorNode:b.anchorNode,anchorOffset:b.anchorOffset,focusNode:b.focusNode,focusOffset:b.focusOffset}),ga&&pt(ga,b)||(ga=b,b=Jd(Xh,"onSelect"),0<b.length&&(l=new pa("onSelect","select",null,l,p),s.push({event:l,listeners:b}),l.target=Ga)))}function mn(s,l){var p={};return p[s.toLowerCase()]=l.toLowerCase(),p["Webkit"+s]="webkit"+l,p["Moz"+s]="moz"+l,p}var Du={animationend:mn("Animation","AnimationEnd"),animationiteration:mn("Animation","AnimationIteration"),animationstart:mn("Animation","AnimationStart"),transitionend:mn("Transition","TransitionEnd")},Vd={},Mc={};u&&(Mc=document.createElement("div").style,"AnimationEvent"in window||(delete Du.animationend.animation,delete Du.animationiteration.animation,delete Du.animationstart.animation),"TransitionEvent"in window||delete Du.transitionend.transition);function Wd(s){if(Vd[s])return Vd[s];if(!Du[s])return s;var l=Du[s],p;for(p in l)if(l.hasOwnProperty(p)&&p in Mc)return Vd[s]=l[p];return s}var kg=Wd("animationend"),Ng=Wd("animationiteration"),kc=Wd("animationstart"),Ja=Wd("transitionend"),Nc=new Map,ep="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Wi(s,l){Nc.set(s,l),i(l,[s])}for(var Zd=0;Zd<ep.length;Zd++){var $d=ep[Zd],qd=$d.toLowerCase(),Ag=$d[0].toUpperCase()+$d.slice(1);Wi(qd,"on"+Ag)}Wi(kg,"onAnimationEnd"),Wi(Ng,"onAnimationIteration"),Wi(kc,"onAnimationStart"),Wi("dblclick","onDoubleClick"),Wi("focusin","onFocus"),Wi("focusout","onBlur"),Wi(Ja,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ka="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Nl=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ka));function Ac(s,l,p){var b=s.type||"unknown-event";s.currentTarget=p,bl(b,l,void 0,s),s.currentTarget=null}function Fg(s,l){l=(l&4)!==0;for(var p=0;p<s.length;p++){var b=s[p],x=b.event;b=b.listeners;e:{var P=void 0;if(l)for(var V=b.length-1;0<=V;V--){var ce=b[V],ye=ce.instance,Le=ce.currentTarget;if(ce=ce.listener,ye!==P&&x.isPropagationStopped())break e;Ac(x,ce,Le),P=ye}else for(V=0;V<b.length;V++){if(ce=b[V],ye=ce.instance,Le=ce.currentTarget,ce=ce.listener,ye!==P&&x.isPropagationStopped())break e;Ac(x,ce,Le),P=ye}}}if(fo)throw s=Mr,fo=!1,Mr=null,s}function Bn(s,l){var p=l[Xd];p===void 0&&(p=l[Xd]=new Set);var b=s+"__bubble";p.has(b)||(Gd(l,s,2,!1),p.add(b))}function tp(s,l,p){var b=0;l&&(b|=4),Gd(p,s,b,l)}var Al="_reactListening"+Math.random().toString(36).slice(2);function Fs(s){if(!s[Al]){s[Al]=!0,r.forEach(function(p){p!=="selectionchange"&&(Nl.has(p)||tp(p,!1,s),tp(p,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[Al]||(l[Al]=!0,tp("selectionchange",!1,l))}}function Gd(s,l,p,b){switch(bc(l)){case 1:var x=fu;break;case 4:x=Wa;break;default:x=hu}p=x.bind(null,l,p,s),x=void 0,!rr||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(x=!0),b?x!==void 0?s.addEventListener(l,p,{capture:!0,passive:x}):s.addEventListener(l,p,!0):x!==void 0?s.addEventListener(l,p,{passive:x}):s.addEventListener(l,p,!1)}function np(s,l,p,b,x){var P=b;if(!(l&1)&&!(l&2)&&b!==null)e:for(;;){if(b===null)return;var V=b.tag;if(V===3||V===4){var ce=b.stateNode.containerInfo;if(ce===x||ce.nodeType===8&&ce.parentNode===x)break;if(V===4)for(V=b.return;V!==null;){var ye=V.tag;if((ye===3||ye===4)&&(ye=V.stateNode.containerInfo,ye===x||ye.nodeType===8&&ye.parentNode===x))return;V=V.return}for(;ce!==null;){if(V=va(ce),V===null)return;if(ye=V.tag,ye===5||ye===6){b=P=V;continue e}ce=ce.parentNode}}b=b.return}Lr(function(){var Le=P,Ge=ge(p),Xe=[];e:{var qe=Nc.get(s);if(qe!==void 0){var mt=pa,bt=s;switch(s){case"keypress":if(zi(p)===0)break e;case"keydown":case"keyup":mt=Ic;break;case"focusin":bt="focus",mt=In;break;case"focusout":bt="blur",mt=In;break;case"beforeblur":case"afterblur":mt=In;break;case"click":if(p.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":mt=mu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":mt=ks;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":mt=ie;break;case kg:case Ng:case kc:mt=Dc;break;case Ja:mt=xe;break;case"scroll":mt=pu;break;case"wheel":mt=rt;break;case"copy":case"cut":case"paste":mt=Ns;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":mt=_}var Dt=(l&4)!==0,ir=!Dt&&s==="scroll",Ee=Dt?qe!==null?qe+"Capture":null:qe;Dt=[];for(var we=Le,Ce;we!==null;){Ce=we;var it=Ce.stateNode;if(Ce.tag===5&&it!==null&&(Ce=it,Ee!==null&&(it=_n(we,Ee),it!=null&&Dt.push(Tu(we,it,Ce)))),ir)break;we=we.return}0<Dt.length&&(qe=new mt(qe,bt,null,p,Ge),Xe.push({event:qe,listeners:Dt}))}}if(!(l&7)){e:{if(qe=s==="mouseover"||s==="pointerover",mt=s==="mouseout"||s==="pointerout",qe&&p!==ne&&(bt=p.relatedTarget||p.fromElement)&&(va(bt)||bt[Jo]))break e;if((mt||qe)&&(qe=Ge.window===Ge?Ge:(qe=Ge.ownerDocument)?qe.defaultView||qe.parentWindow:window,mt?(bt=p.relatedTarget||p.toElement,mt=Le,bt=bt?va(bt):null,bt!==null&&(ir=Bi(bt),bt!==ir||bt.tag!==5&&bt.tag!==6)&&(bt=null)):(mt=null,bt=Le),mt!==bt)){if(Dt=mu,it="onMouseLeave",Ee="onMouseEnter",we="mouse",(s==="pointerout"||s==="pointerover")&&(Dt=_,it="onPointerLeave",Ee="onPointerEnter",we="pointer"),ir=mt==null?qe:Jt(mt),Ce=bt==null?qe:Jt(bt),qe=new Dt(it,we+"leave",mt,p,Ge),qe.target=ir,qe.relatedTarget=Ce,it=null,va(Ge)===Le&&(Dt=new Dt(Ee,we+"enter",bt,p,Ge),Dt.target=Ce,Dt.relatedTarget=ir,it=Dt),ir=it,mt&&bt)t:{for(Dt=mt,Ee=bt,we=0,Ce=Dt;Ce;Ce=Iu(Ce))we++;for(Ce=0,it=Ee;it;it=Iu(it))Ce++;for(;0<we-Ce;)Dt=Iu(Dt),we--;for(;0<Ce-we;)Ee=Iu(Ee),Ce--;for(;we--;){if(Dt===Ee||Ee!==null&&Dt===Ee.alternate)break t;Dt=Iu(Dt),Ee=Iu(Ee)}Dt=null}else Dt=null;mt!==null&&cr(Xe,qe,mt,Dt,!1),bt!==null&&ir!==null&&cr(Xe,ir,bt,Dt,!0)}}e:{if(qe=Le?Jt(Le):window,mt=qe.nodeName&&qe.nodeName.toLowerCase(),mt==="select"||mt==="input"&&qe.type==="file")var xt=ew;else if(Yd(qe))if(kl)xt=be;else{xt=nw;var Ft=tw}else(mt=qe.nodeName)&&mt.toLowerCase()==="input"&&(qe.type==="checkbox"||qe.type==="radio")&&(xt=bu);if(xt&&(xt=xt(s,Le))){Qh(Xe,xt,p,Ge);break e}Ft&&Ft(s,qe,Le),s==="focusout"&&(Ft=qe._wrapperState)&&Ft.controlled&&qe.type==="number"&&zt(qe,"number",qe.value)}switch(Ft=Le?Jt(Le):window,s){case"focusin":(Yd(Ft)||Ft.contentEditable==="true")&&(Ga=Ft,Xh=Le,ga=null);break;case"focusout":ga=Xh=Ga=null;break;case"mousedown":Su=!0;break;case"contextmenu":case"mouseup":case"dragend":Su=!1,Cc(Xe,p,Ge);break;case"selectionchange":if(yi)break;case"keydown":case"keyup":Cc(Xe,p,Ge)}var Pt;if(Vt)e:{switch(s){case"compositionstart":var Ht="onCompositionStart";break e;case"compositionend":Ht="onCompositionEnd";break e;case"compositionupdate":Ht="onCompositionUpdate";break e}Ht=void 0}else ma?Ml(s,p)&&(Ht="onCompositionEnd"):s==="keydown"&&p.keyCode===229&&(Ht="onCompositionStart");Ht&&(Yr&&p.locale!=="ko"&&(ma||Ht!=="onCompositionStart"?Ht==="onCompositionEnd"&&ma&&(Pt=Sc()):(An=Ge,Es="value"in An?An.value:An.textContent,ma=!0)),Ft=Jd(Le,Ht),0<Ft.length&&(Ht=new Tc(Ht,s,null,p,Ge),Xe.push({event:Ht,listeners:Ft}),Pt?Ht.data=Pt:(Pt=xc(p),Pt!==null&&(Ht.data=Pt)))),(Pt=Mn?wu(s,p):K0(s,p))&&(Le=Jd(Le,"onBeforeInput"),0<Le.length&&(Ge=new Tc("onBeforeInput","beforeinput",null,p,Ge),Xe.push({event:Ge,listeners:Le}),Ge.data=Pt))}Fg(Xe,l)})}function Tu(s,l,p){return{instance:s,listener:l,currentTarget:p}}function Jd(s,l){for(var p=l+"Capture",b=[];s!==null;){var x=s,P=x.stateNode;x.tag===5&&P!==null&&(x=P,P=_n(s,p),P!=null&&b.unshift(Tu(s,P,x)),P=_n(s,l),P!=null&&b.push(Tu(s,P,x))),s=s.return}return b}function Iu(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function cr(s,l,p,b,x){for(var P=l._reactName,V=[];p!==null&&p!==b;){var ce=p,ye=ce.alternate,Le=ce.stateNode;if(ye!==null&&ye===b)break;ce.tag===5&&Le!==null&&(ce=Le,x?(ye=_n(p,P),ye!=null&&V.unshift(Tu(p,ye,ce))):x||(ye=_n(p,P),ye!=null&&V.push(Tu(p,ye,ce)))),p=p.return}V.length!==0&&s.push({event:l,listeners:V})}var Gr=/\r\n?/g,ow=/\u0000|\uFFFD/g;function Pg(s){return(typeof s=="string"?s:""+s).replace(Gr,`
|
|
|
`).replace(ow,"")}function Fc(s,l,p){if(l=Pg(l),Pg(s)!==l&&p)throw Error(n(425))}function Kd(){}var Pc=null,Fl=null;function Oc(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Ps=typeof setTimeout=="function"?setTimeout:void 0,jc=typeof clearTimeout=="function"?clearTimeout:void 0,xu=typeof Promise=="function"?Promise:void 0,Qd=typeof queueMicrotask=="function"?queueMicrotask:typeof xu<"u"?function(s){return xu.resolve(null).then(s).catch(Eu)}:Ps;function Eu(s){setTimeout(function(){throw s})}function rp(s,l){var p=l,b=0;do{var x=p.nextSibling;if(s.removeChild(p),x&&x.nodeType===8)if(p=x.data,p==="/$"){if(b===0){s.removeChild(x),an(l);return}b--}else p!=="$"&&p!=="$?"&&p!=="$!"||b++;p=x}while(p);an(l)}function Os(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return s}function Og(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var p=s.data;if(p==="$"||p==="$!"||p==="$?"){if(l===0)return s;l--}else p==="/$"&&l++}s=s.previousSibling}return null}var Cu=Math.random().toString(36).slice(2),ya="__reactFiber$"+Cu,js="__reactProps$"+Cu,Jo="__reactContainer$"+Cu,Xd="__reactEvents$"+Cu,G="__reactListeners$"+Cu,Mu="__reactHandles$"+Cu;function va(s){var l=s[ya];if(l)return l;for(var p=s.parentNode;p;){if(l=p[Jo]||p[ya]){if(p=l.alternate,l.child!==null||p!==null&&p.child!==null)for(s=Og(s);s!==null;){if(p=s[ya])return p;s=Og(s)}return l}s=p,p=s.parentNode}return null}function Jr(s){return s=s[ya]||s[Jo],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function Jt(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function ef(s){return s[js]||null}var op=[],ku=-1;function Ao(s){return{current:s}}function Hn(s){0>ku||(s.current=op[ku],op[ku]=null,ku--)}function Ln(s,l){ku++,op[ku]=s.current,s.current=l}var Ls={},Kr=Ao(Ls),Fo=Ao(!1),vo=Ls;function Nu(s,l){var p=s.type.contextTypes;if(!p)return Ls;var b=s.stateNode;if(b&&b.__reactInternalMemoizedUnmaskedChildContext===l)return b.__reactInternalMemoizedMaskedChildContext;var x={},P;for(P in p)x[P]=l[P];return b&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=l,s.__reactInternalMemoizedMaskedChildContext=x),x}function Po(s){return s=s.childContextTypes,s!=null}function tf(){Hn(Fo),Hn(Kr)}function jg(s,l,p){if(Kr.current!==Ls)throw Error(n(168));Ln(Kr,l),Ln(Fo,p)}function Lg(s,l,p){var b=s.stateNode;if(l=l.childContextTypes,typeof b.getChildContext!="function")return p;b=b.getChildContext();for(var x in b)if(!(x in l))throw Error(n(108,Je(s)||"Unknown",x));return K({},p,b)}function vi(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Ls,vo=Kr.current,Ln(Kr,s),Ln(Fo,Fo.current),!0}function Rg(s,l,p){var b=s.stateNode;if(!b)throw Error(n(169));p?(s=Lg(s,l,vo),b.__reactInternalMemoizedMergedChildContext=s,Hn(Fo),Hn(Kr),Ln(Kr,s)):Hn(Fo),Ln(Fo,p)}var Qa=null,nf=!1,ip=!1;function _g(s){Qa===null?Qa=[s]:Qa.push(s)}function Pl(s){nf=!0,_g(s)}function Rs(){if(!ip&&Qa!==null){ip=!0;var s=0,l=ct;try{var p=Qa;for(ct=1;s<p.length;s++){var b=p[s];do b=b(!0);while(b!==null)}Qa=null,nf=!1}catch(x){throw Qa!==null&&(Qa=Qa.slice(s+1)),Ha(vs,Rs),x}finally{ct=l,ip=!1}}return null}var Au=[],Qr=0,rf=null,of=0,wi=[],bi=0,Ol=null,wa=1,ba="";function jl(s,l){Au[Qr++]=of,Au[Qr++]=rf,rf=s,of=l}function Bg(s,l,p){wi[bi++]=wa,wi[bi++]=ba,wi[bi++]=Ol,Ol=s;var b=wa;s=ba;var x=32-vr(b)-1;b&=~(1<<x),p+=1;var P=32-vr(l)+x;if(30<P){var V=x-x%5;P=(b&(1<<V)-1).toString(32),b>>=V,x-=V,wa=1<<32-vr(l)+x|p<<x|b,ba=P+s}else wa=1<<P|p<<x|b,ba=s}function Lc(s){s.return!==null&&(jl(s,1),Bg(s,1,0))}function Ll(s){for(;s===rf;)rf=Au[--Qr],Au[Qr]=null,of=Au[--Qr],Au[Qr]=null;for(;s===Ol;)Ol=wi[--bi],wi[bi]=null,ba=wi[--bi],wi[bi]=null,wa=wi[--bi],wi[bi]=null}var Xr=null,Ko=null,Yn=!1,Zi=null;function Sa(s,l){var p=ni(5,null,null,0);p.elementType="DELETED",p.stateNode=l,p.return=s,l=s.deletions,l===null?(s.deletions=[p],s.flags|=16):l.push(p)}function af(s,l){switch(s.tag){case 5:var p=s.type;return l=l.nodeType!==1||p.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(s.stateNode=l,Xr=s,Ko=Os(l.firstChild),!0):!1;case 6:return l=s.pendingProps===""||l.nodeType!==3?null:l,l!==null?(s.stateNode=l,Xr=s,Ko=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(p=Ol!==null?{id:wa,overflow:ba}:null,s.memoizedState={dehydrated:l,treeContext:p,retryLane:1073741824},p=ni(18,null,null,0),p.stateNode=l,p.return=s,s.child=p,Xr=s,Ko=null,!0):!1;default:return!1}}function Xa(s){return(s.mode&1)!==0&&(s.flags&128)===0}function Oo(s){if(Yn){var l=Ko;if(l){var p=l;if(!af(s,l)){if(Xa(s))throw Error(n(418));l=Os(p.nextSibling);var b=Xr;l&&af(s,l)?Sa(b,p):(s.flags=s.flags&-4097|2,Yn=!1,Xr=s)}}else{if(Xa(s))throw Error(n(418));s.flags=s.flags&-4097|2,Yn=!1,Xr=s}}}function Hg(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Xr=s}function Rc(s){if(s!==Xr)return!1;if(!Yn)return Hg(s),Yn=!0,!1;var l;if((l=s.tag!==3)&&!(l=s.tag!==5)&&(l=s.type,l=l!=="head"&&l!=="body"&&!Oc(s.type,s.memoizedProps)),l&&(l=Ko)){if(Xa(s))throw ap(),Error(n(418));for(;l;)Sa(s,l),l=Os(l.nextSibling)}if(Hg(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,l=0;s;){if(s.nodeType===8){var p=s.data;if(p==="/$"){if(l===0){Ko=Os(s.nextSibling);break e}l--}else p!=="$"&&p!=="$!"&&p!=="$?"||l++}s=s.nextSibling}Ko=null}}else Ko=Xr?Os(s.stateNode.nextSibling):null;return!0}function ap(){for(var s=Ko;s;)s=Os(s.nextSibling)}function Da(){Ko=Xr=null,Yn=!1}function Ta(s){Zi===null?Zi=[s]:Zi.push(s)}var Yg=j.ReactCurrentBatchConfig;function $i(s,l){if(s&&s.defaultProps){l=K({},l),s=s.defaultProps;for(var p in s)l[p]===void 0&&(l[p]=s[p]);return l}return l}var Rl=Ao(null),sf=null,_l=null,wr=null;function _c(){wr=_l=sf=null}function lf(s){var l=Rl.current;Hn(Rl),s._currentValue=l}function Si(s,l,p){for(;s!==null;){var b=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,b!==null&&(b.childLanes|=l)):b!==null&&(b.childLanes&l)!==l&&(b.childLanes|=l),s===p)break;s=s.return}}function _s(s,l){sf=s,wr=_l=null,s=s.dependencies,s!==null&&s.firstContext!==null&&(s.lanes&l&&(no=!0),s.firstContext=null)}function wo(s){var l=s._currentValue;if(wr!==s)if(s={context:s,memoizedValue:l,next:null},_l===null){if(sf===null)throw Error(n(308));_l=s,sf.dependencies={lanes:0,firstContext:s}}else _l=_l.next=s;return l}var Qo=null;function uf(s){Qo===null?Qo=[s]:Qo.push(s)}function eo(s,l,p,b){var x=l.interleaved;return x===null?(p.next=p,uf(l)):(p.next=x.next,x.next=p),l.interleaved=p,qi(s,b)}function qi(s,l){s.lanes|=l;var p=s.alternate;for(p!==null&&(p.lanes|=l),p=s,s=s.return;s!==null;)s.childLanes|=l,p=s.alternate,p!==null&&(p.childLanes|=l),p=s,s=s.return;return p.tag===3?p.stateNode:null}var Bs=!1;function sp(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ug(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function Gi(s,l){return{eventTime:s,lane:l,tag:0,payload:null,callback:null,next:null}}function Hs(s,l,p){var b=s.updateQueue;if(b===null)return null;if(b=b.shared,fn&2){var x=b.pending;return x===null?l.next=l:(l.next=x.next,x.next=l),b.pending=l,qi(s,p)}return x=b.interleaved,x===null?(l.next=l,uf(b)):(l.next=x.next,x.next=l),b.interleaved=l,qi(s,p)}function Ys(s,l,p){if(l=l.updateQueue,l!==null&&(l=l.shared,(p&4194240)!==0)){var b=l.lanes;b&=s.pendingLanes,p|=b,l.lanes=p,ot(s,p)}}function lp(s,l){var p=s.updateQueue,b=s.alternate;if(b!==null&&(b=b.updateQueue,p===b)){var x=null,P=null;if(p=p.firstBaseUpdate,p!==null){do{var V={eventTime:p.eventTime,lane:p.lane,tag:p.tag,payload:p.payload,callback:p.callback,next:null};P===null?x=P=V:P=P.next=V,p=p.next}while(p!==null);P===null?x=P=l:P=P.next=l}else x=P=l;p={baseState:b.baseState,firstBaseUpdate:x,lastBaseUpdate:P,shared:b.shared,effects:b.effects},s.updateQueue=p;return}s=p.lastBaseUpdate,s===null?p.firstBaseUpdate=l:s.next=l,p.lastBaseUpdate=l}function cf(s,l,p,b){var x=s.updateQueue;Bs=!1;var P=x.firstBaseUpdate,V=x.lastBaseUpdate,ce=x.shared.pending;if(ce!==null){x.shared.pending=null;var ye=ce,Le=ye.next;ye.next=null,V===null?P=Le:V.next=Le,V=ye;var Ge=s.alternate;Ge!==null&&(Ge=Ge.updateQueue,ce=Ge.lastBaseUpdate,ce!==V&&(ce===null?Ge.firstBaseUpdate=Le:ce.next=Le,Ge.lastBaseUpdate=ye))}if(P!==null){var Xe=x.baseState;V=0,Ge=Le=ye=null,ce=P;do{var qe=ce.lane,mt=ce.eventTime;if((b&qe)===qe){Ge!==null&&(Ge=Ge.next={eventTime:mt,lane:0,tag:ce.tag,payload:ce.payload,callback:ce.callback,next:null});e:{var bt=s,Dt=ce;switch(qe=l,mt=p,Dt.tag){case 1:if(bt=Dt.payload,typeof bt=="function"){Xe=bt.call(mt,Xe,qe);break e}Xe=bt;break e;case 3:bt.flags=bt.flags&-65537|128;case 0:if(bt=Dt.payload,qe=typeof bt=="function"?bt.call(mt,Xe,qe):bt,qe==null)break e;Xe=K({},Xe,qe);break e;case 2:Bs=!0}}ce.callback!==null&&ce.lane!==0&&(s.flags|=64,qe=x.effects,qe===null?x.effects=[ce]:qe.push(ce))}else mt={eventTime:mt,lane:qe,tag:ce.tag,payload:ce.payload,callback:ce.callback,next:null},Ge===null?(Le=Ge=mt,ye=Xe):Ge=Ge.next=mt,V|=qe;if(ce=ce.next,ce===null){if(ce=x.shared.pending,ce===null)break;qe=ce,ce=qe.next,qe.next=null,x.lastBaseUpdate=qe,x.shared.pending=null}}while(!0);if(Ge===null&&(ye=Xe),x.baseState=ye,x.firstBaseUpdate=Le,x.lastBaseUpdate=Ge,l=x.shared.interleaved,l!==null){x=l;do V|=x.lane,x=x.next;while(x!==l)}else P===null&&(x.shared.lanes=0);qs|=V,s.lanes=V,s.memoizedState=Xe}}function zg(s,l,p){if(s=l.effects,l.effects=null,s!==null)for(l=0;l<s.length;l++){var b=s[l],x=b.callback;if(x!==null){if(b.callback=null,b=p,typeof x!="function")throw Error(n(191,x));x.call(b)}}}var Fu=new e.Component().refs;function up(s,l,p,b){l=s.memoizedState,p=p(b,l),p=p==null?l:K({},l,p),s.memoizedState=p,s.lanes===0&&(s.updateQueue.baseState=p)}var df={isMounted:function(s){return(s=s._reactInternals)?Bi(s)===s:!1},enqueueSetState:function(s,l,p){s=s._reactInternals;var b=Do(),x=Js(s),P=Gi(b,x);P.payload=l,p!=null&&(P.callback=p),l=Hs(s,P,x),l!==null&&(Xi(l,s,x,b),Ys(l,s,x))},enqueueReplaceState:function(s,l,p){s=s._reactInternals;var b=Do(),x=Js(s),P=Gi(b,x);P.tag=1,P.payload=l,p!=null&&(P.callback=p),l=Hs(s,P,x),l!==null&&(Xi(l,s,x,b),Ys(l,s,x))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var p=Do(),b=Js(s),x=Gi(p,b);x.tag=2,l!=null&&(x.callback=l),l=Hs(s,x,b),l!==null&&(Xi(l,s,b,p),Ys(l,s,b))}};function ff(s,l,p,b,x,P,V){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(b,P,V):l.prototype&&l.prototype.isPureReactComponent?!pt(p,b)||!pt(x,P):!0}function cp(s,l,p){var b=!1,x=Ls,P=l.contextType;return typeof P=="object"&&P!==null?P=wo(P):(x=Po(l)?vo:Kr.current,b=l.contextTypes,P=(b=b!=null)?Nu(s,x):Ls),l=new l(p,P),s.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=df,s.stateNode=l,l._reactInternals=s,b&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=x,s.__reactInternalMemoizedMaskedChildContext=P),l}function Vg(s,l,p,b){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(p,b),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(p,b),l.state!==s&&df.enqueueReplaceState(l,l.state,null)}function dp(s,l,p,b){var x=s.stateNode;x.props=p,x.state=s.memoizedState,x.refs=Fu,sp(s);var P=l.contextType;typeof P=="object"&&P!==null?x.context=wo(P):(P=Po(l)?vo:Kr.current,x.context=Nu(s,P)),x.state=s.memoizedState,P=l.getDerivedStateFromProps,typeof P=="function"&&(up(s,l,P,p),x.state=s.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(l=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),l!==x.state&&df.enqueueReplaceState(x,x.state,null),cf(s,p,x,b),x.state=s.memoizedState),typeof x.componentDidMount=="function"&&(s.flags|=4194308)}function Bc(s,l,p){if(s=p.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(p._owner){if(p=p._owner,p){if(p.tag!==1)throw Error(n(309));var b=p.stateNode}if(!b)throw Error(n(147,s));var x=b,P=""+s;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===P?l.ref:(l=function(V){var ce=x.refs;ce===Fu&&(ce=x.refs={}),V===null?delete ce[P]:ce[P]=V},l._stringRef=P,l)}if(typeof s!="string")throw Error(n(284));if(!p._owner)throw Error(n(290,s))}return s}function Hc(s,l){throw s=Object.prototype.toString.call(l),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s))}function hf(s){var l=s._init;return l(s._payload)}function Wg(s){function l(Ee,we){if(s){var Ce=Ee.deletions;Ce===null?(Ee.deletions=[we],Ee.flags|=16):Ce.push(we)}}function p(Ee,we){if(!s)return null;for(;we!==null;)l(Ee,we),we=we.sibling;return null}function b(Ee,we){for(Ee=new Map;we!==null;)we.key!==null?Ee.set(we.key,we):Ee.set(we.index,we),we=we.sibling;return Ee}function x(Ee,we){return Ee=Xs(Ee,we),Ee.index=0,Ee.sibling=null,Ee}function P(Ee,we,Ce){return Ee.index=Ce,s?(Ce=Ee.alternate,Ce!==null?(Ce=Ce.index,Ce<we?(Ee.flags|=2,we):Ce):(Ee.flags|=2,we)):(Ee.flags|=1048576,we)}function V(Ee){return s&&Ee.alternate===null&&(Ee.flags|=2),Ee}function ce(Ee,we,Ce,it){return we===null||we.tag!==6?(we=qp(Ce,Ee.mode,it),we.return=Ee,we):(we=x(we,Ce),we.return=Ee,we)}function ye(Ee,we,Ce,it){var xt=Ce.type;return xt===Z?Ge(Ee,we,Ce.props.children,it,Ce.key):we!==null&&(we.elementType===xt||typeof xt=="object"&&xt!==null&&xt.$$typeof===W&&hf(xt)===we.type)?(it=x(we,Ce.props),it.ref=Bc(Ee,we,Ce),it.return=Ee,it):(it=Uf(Ce.type,Ce.key,Ce.props,null,Ee.mode,it),it.ref=Bc(Ee,we,Ce),it.return=Ee,it)}function Le(Ee,we,Ce,it){return we===null||we.tag!==4||we.stateNode.containerInfo!==Ce.containerInfo||we.stateNode.implementation!==Ce.implementation?(we=Gp(Ce,Ee.mode,it),we.return=Ee,we):(we=x(we,Ce.children||[]),we.return=Ee,we)}function Ge(Ee,we,Ce,it,xt){return we===null||we.tag!==7?(we=Wl(Ce,Ee.mode,it,xt),we.return=Ee,we):(we=x(we,Ce),we.return=Ee,we)}function Xe(Ee,we,Ce){if(typeof we=="string"&&we!==""||typeof we=="number")return we=qp(""+we,Ee.mode,Ce),we.return=Ee,we;if(typeof we=="object"&&we!==null){switch(we.$$typeof){case B:return Ce=Uf(we.type,we.key,we.props,null,Ee.mode,Ce),Ce.ref=Bc(Ee,null,we),Ce.return=Ee,Ce;case L:return we=Gp(we,Ee.mode,Ce),we.return=Ee,we;case W:var it=we._init;return Xe(Ee,it(we._payload),Ce)}if($t(we)||he(we))return we=Wl(we,Ee.mode,Ce,null),we.return=Ee,we;Hc(Ee,we)}return null}function qe(Ee,we,Ce,it){var xt=we!==null?we.key:null;if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number")return xt!==null?null:ce(Ee,we,""+Ce,it);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case B:return Ce.key===xt?ye(Ee,we,Ce,it):null;case L:return Ce.key===xt?Le(Ee,we,Ce,it):null;case W:return xt=Ce._init,qe(Ee,we,xt(Ce._payload),it)}if($t(Ce)||he(Ce))return xt!==null?null:Ge(Ee,we,Ce,it,null);Hc(Ee,Ce)}return null}function mt(Ee,we,Ce,it,xt){if(typeof it=="string"&&it!==""||typeof it=="number")return Ee=Ee.get(Ce)||null,ce(we,Ee,""+it,xt);if(typeof it=="object"&&it!==null){switch(it.$$typeof){case B:return Ee=Ee.get(it.key===null?Ce:it.key)||null,ye(we,Ee,it,xt);case L:return Ee=Ee.get(it.key===null?Ce:it.key)||null,Le(we,Ee,it,xt);case W:var Ft=it._init;return mt(Ee,we,Ce,Ft(it._payload),xt)}if($t(it)||he(it))return Ee=Ee.get(Ce)||null,Ge(we,Ee,it,xt,null);Hc(we,it)}return null}function bt(Ee,we,Ce,it){for(var xt=null,Ft=null,Pt=we,Ht=we=0,Fr=null;Pt!==null&&Ht<Ce.length;Ht++){Pt.index>Ht?(Fr=Pt,Pt=null):Fr=Pt.sibling;var gn=qe(Ee,Pt,Ce[Ht],it);if(gn===null){Pt===null&&(Pt=Fr);break}s&&Pt&&gn.alternate===null&&l(Ee,Pt),we=P(gn,we,Ht),Ft===null?xt=gn:Ft.sibling=gn,Ft=gn,Pt=Fr}if(Ht===Ce.length)return p(Ee,Pt),Yn&&jl(Ee,Ht),xt;if(Pt===null){for(;Ht<Ce.length;Ht++)Pt=Xe(Ee,Ce[Ht],it),Pt!==null&&(we=P(Pt,we,Ht),Ft===null?xt=Pt:Ft.sibling=Pt,Ft=Pt);return Yn&&jl(Ee,Ht),xt}for(Pt=b(Ee,Pt);Ht<Ce.length;Ht++)Fr=mt(Pt,Ee,Ht,Ce[Ht],it),Fr!==null&&(s&&Fr.alternate!==null&&Pt.delete(Fr.key===null?Ht:Fr.key),we=P(Fr,we,Ht),Ft===null?xt=Fr:Ft.sibling=Fr,Ft=Fr);return s&&Pt.forEach(function(el){return l(Ee,el)}),Yn&&jl(Ee,Ht),xt}function Dt(Ee,we,Ce,it){var xt=he(Ce);if(typeof xt!="function")throw Error(n(150));if(Ce=xt.call(Ce),Ce==null)throw Error(n(151));for(var Ft=xt=null,Pt=we,Ht=we=0,Fr=null,gn=Ce.next();Pt!==null&&!gn.done;Ht++,gn=Ce.next()){Pt.index>Ht?(Fr=Pt,Pt=null):Fr=Pt.sibling;var el=qe(Ee,Pt,gn.value,it);if(el===null){Pt===null&&(Pt=Fr);break}s&&Pt&&el.alternate===null&&l(Ee,Pt),we=P(el,we,Ht),Ft===null?xt=el:Ft.sibling=el,Ft=el,Pt=Fr}if(gn.done)return p(Ee,Pt),Yn&&jl(Ee,Ht),xt;if(Pt===null){for(;!gn.done;Ht++,gn=Ce.next())gn=Xe(Ee,gn.value,it),gn!==null&&(we=P(gn,we,Ht),Ft===null?xt=gn:Ft.sibling=gn,Ft=gn);return Yn&&jl(Ee,Ht),xt}for(Pt=b(Ee,Pt);!gn.done;Ht++,gn=Ce.next())gn=mt(Pt,Ee,Ht,gn.value,it),gn!==null&&(s&&gn.alternate!==null&&Pt.delete(gn.key===null?Ht:gn.key),we=P(gn,we,Ht),Ft===null?xt=gn:Ft.sibling=gn,Ft=gn);return s&&Pt.forEach(function(Iw){return l(Ee,Iw)}),Yn&&jl(Ee,Ht),xt}function ir(Ee,we,Ce,it){if(typeof Ce=="object"&&Ce!==null&&Ce.type===Z&&Ce.key===null&&(Ce=Ce.props.children),typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case B:e:{for(var xt=Ce.key,Ft=we;Ft!==null;){if(Ft.key===xt){if(xt=Ce.type,xt===Z){if(Ft.tag===7){p(Ee,Ft.sibling),we=x(Ft,Ce.props.children),we.return=Ee,Ee=we;break e}}else if(Ft.elementType===xt||typeof xt=="object"&&xt!==null&&xt.$$typeof===W&&hf(xt)===Ft.type){p(Ee,Ft.sibling),we=x(Ft,Ce.props),we.ref=Bc(Ee,Ft,Ce),we.return=Ee,Ee=we;break e}p(Ee,Ft);break}else l(Ee,Ft);Ft=Ft.sibling}Ce.type===Z?(we=Wl(Ce.props.children,Ee.mode,it,Ce.key),we.return=Ee,Ee=we):(it=Uf(Ce.type,Ce.key,Ce.props,null,Ee.mode,it),it.ref=Bc(Ee,we,Ce),it.return=Ee,Ee=it)}return V(Ee);case L:e:{for(Ft=Ce.key;we!==null;){if(we.key===Ft)if(we.tag===4&&we.stateNode.containerInfo===Ce.containerInfo&&we.stateNode.implementation===Ce.implementation){p(Ee,we.sibling),we=x(we,Ce.children||[]),we.return=Ee,Ee=we;break e}else{p(Ee,we);break}else l(Ee,we);we=we.sibling}we=Gp(Ce,Ee.mode,it),we.return=Ee,Ee=we}return V(Ee);case W:return Ft=Ce._init,ir(Ee,we,Ft(Ce._payload),it)}if($t(Ce))return bt(Ee,we,Ce,it);if(he(Ce))return Dt(Ee,we,Ce,it);Hc(Ee,Ce)}return typeof Ce=="string"&&Ce!==""||typeof Ce=="number"?(Ce=""+Ce,we!==null&&we.tag===6?(p(Ee,we.sibling),we=x(we,Ce),we.return=Ee,Ee=we):(p(Ee,we),we=qp(Ce,Ee.mode,it),we.return=Ee,Ee=we),V(Ee)):p(Ee,we)}return ir}var Us=Wg(!0),fp=Wg(!1),Pu={},Ji=Ao(Pu),zs=Ao(Pu),Yc=Ao(Pu);function Vs(s){if(s===Pu)throw Error(n(174));return s}function pf(s,l){switch(Ln(Yc,l),Ln(zs,s),Ln(Ji,Pu),s=l.nodeType,s){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:yr(null,"");break;default:s=s===8?l.parentNode:l,l=s.namespaceURI||null,s=s.tagName,l=yr(l,s)}Hn(Ji),Ln(Ji,l)}function Ou(){Hn(Ji),Hn(zs),Hn(Yc)}function hp(s){Vs(Yc.current);var l=Vs(Ji.current),p=yr(l,s.type);l!==p&&(Ln(zs,s),Ln(Ji,p))}function pp(s){zs.current===s&&(Hn(Ji),Hn(zs))}var Un=Ao(0);function Uc(s){for(var l=s;l!==null;){if(l.tag===13){var p=l.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||p.data==="$?"||p.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if(l.flags&128)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var zc=[];function mp(){for(var s=0;s<zc.length;s++)zc[s]._workInProgressVersionPrimary=null;zc.length=0}var ju=j.ReactCurrentDispatcher,Kt=j.ReactCurrentBatchConfig,Bl=0,Wn=null,Zn=null,br=null,mf=!1,Vc=!1,to=0,iw=0;function Sr(){throw Error(n(321))}function Wc(s,l){if(l===null)return!1;for(var p=0;p<l.length&&p<s.length;p++)if(!Pe(s[p],l[p]))return!1;return!0}function gf(s,l,p,b,x,P){if(Bl=P,Wn=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,ju.current=s===null||s.memoizedState===null?$c:sw,s=p(b,x),Vc){P=0;do{if(Vc=!1,to=0,25<=P)throw Error(n(301));P+=1,br=Zn=null,l.updateQueue=null,ju.current=Qg,s=p(b,x)}while(Vc)}if(ju.current=ns,l=Zn!==null&&Zn.next!==null,Bl=0,br=Zn=Wn=null,mf=!1,l)throw Error(n(300));return s}function yf(){var s=to!==0;return to=0,s}function Xn(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return br===null?Wn.memoizedState=br=s:br=br.next=s,br}function Dr(){if(Zn===null){var s=Wn.alternate;s=s!==null?s.memoizedState:null}else s=Zn.next;var l=br===null?Wn.memoizedState:br.next;if(l!==null)br=l,Zn=s;else{if(s===null)throw Error(n(310));Zn=s,s={memoizedState:Zn.memoizedState,baseState:Zn.baseState,baseQueue:Zn.baseQueue,queue:Zn.queue,next:null},br===null?Wn.memoizedState=br=s:br=br.next=s}return br}function Hl(s,l){return typeof l=="function"?l(s):l}function vf(s){var l=Dr(),p=l.queue;if(p===null)throw Error(n(311));p.lastRenderedReducer=s;var b=Zn,x=b.baseQueue,P=p.pending;if(P!==null){if(x!==null){var V=x.next;x.next=P.next,P.next=V}b.baseQueue=x=P,p.pending=null}if(x!==null){P=x.next,b=b.baseState;var ce=V=null,ye=null,Le=P;do{var Ge=Le.lane;if((Bl&Ge)===Ge)ye!==null&&(ye=ye.next={lane:0,action:Le.action,hasEagerState:Le.hasEagerState,eagerState:Le.eagerState,next:null}),b=Le.hasEagerState?Le.eagerState:s(b,Le.action);else{var Xe={lane:Ge,action:Le.action,hasEagerState:Le.hasEagerState,eagerState:Le.eagerState,next:null};ye===null?(ce=ye=Xe,V=b):ye=ye.next=Xe,Wn.lanes|=Ge,qs|=Ge}Le=Le.next}while(Le!==null&&Le!==P);ye===null?V=b:ye.next=ce,Pe(b,l.memoizedState)||(no=!0),l.memoizedState=b,l.baseState=V,l.baseQueue=ye,p.lastRenderedState=b}if(s=p.interleaved,s!==null){x=s;do P=x.lane,Wn.lanes|=P,qs|=P,x=x.next;while(x!==s)}else x===null&&(p.lanes=0);return[l.memoizedState,p.dispatch]}function Lu(s){var l=Dr(),p=l.queue;if(p===null)throw Error(n(311));p.lastRenderedReducer=s;var b=p.dispatch,x=p.pending,P=l.memoizedState;if(x!==null){p.pending=null;var V=x=x.next;do P=s(P,V.action),V=V.next;while(V!==x);Pe(P,l.memoizedState)||(no=!0),l.memoizedState=P,l.baseQueue===null&&(l.baseState=P),p.lastRenderedState=P}return[P,b]}function gp(){}function wf(s,l){var p=Wn,b=Dr(),x=l(),P=!Pe(b.memoizedState,x);if(P&&(b.memoizedState=x,no=!0),b=b.queue,wp(Sf.bind(null,p,b,s),[s]),b.getSnapshot!==l||P||br!==null&&br.memoizedState.tag&1){if(p.flags|=2048,Ru(9,bf.bind(null,p,b,x,l),void 0,null),Ar===null)throw Error(n(349));Bl&30||yp(p,l,x)}return x}function yp(s,l,p){s.flags|=16384,s={getSnapshot:l,value:p},l=Wn.updateQueue,l===null?(l={lastEffect:null,stores:null},Wn.updateQueue=l,l.stores=[s]):(p=l.stores,p===null?l.stores=[s]:p.push(s))}function bf(s,l,p,b){l.value=p,l.getSnapshot=b,es(l)&&Zg(s)}function Sf(s,l,p){return p(function(){es(l)&&Zg(s)})}function es(s){var l=s.getSnapshot;s=s.value;try{var p=l();return!Pe(s,p)}catch{return!0}}function Zg(s){var l=qi(s,1);l!==null&&Xi(l,s,1,-1)}function ts(s){var l=Xn();return typeof s=="function"&&(s=s()),l.memoizedState=l.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hl,lastRenderedState:s},l.queue=s,s=s.dispatch=Jg.bind(null,Wn,s),[l.memoizedState,s]}function Ru(s,l,p,b){return s={tag:s,create:l,destroy:p,deps:b,next:null},l=Wn.updateQueue,l===null?(l={lastEffect:null,stores:null},Wn.updateQueue=l,l.lastEffect=s.next=s):(p=l.lastEffect,p===null?l.lastEffect=s.next=s:(b=p.next,p.next=s,s.next=b,l.lastEffect=s)),s}function vp(){return Dr().memoizedState}function _u(s,l,p,b){var x=Xn();Wn.flags|=s,x.memoizedState=Ru(1|l,p,void 0,b===void 0?null:b)}function Df(s,l,p,b){var x=Dr();b=b===void 0?null:b;var P=void 0;if(Zn!==null){var V=Zn.memoizedState;if(P=V.destroy,b!==null&&Wc(b,V.deps)){x.memoizedState=Ru(l,p,P,b);return}}Wn.flags|=s,x.memoizedState=Ru(1|l,p,P,b)}function $g(s,l){return _u(8390656,8,s,l)}function wp(s,l){return Df(2048,8,s,l)}function bp(s,l){return Df(4,2,s,l)}function Sp(s,l){return Df(4,4,s,l)}function qg(s,l){if(typeof l=="function")return s=s(),l(s),function(){l(null)};if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function Dp(s,l,p){return p=p!=null?p.concat([s]):null,Df(4,4,qg.bind(null,l,s),p)}function Tf(){}function bo(s,l){var p=Dr();l=l===void 0?null:l;var b=p.memoizedState;return b!==null&&l!==null&&Wc(l,b[1])?b[0]:(p.memoizedState=[s,l],s)}function Ki(s,l){var p=Dr();l=l===void 0?null:l;var b=p.memoizedState;return b!==null&&l!==null&&Wc(l,b[1])?b[0]:(s=s(),p.memoizedState=[s,l],s)}function Gg(s,l,p){return Bl&21?(Pe(p,l)||(p=ae(),Wn.lanes|=p,qs|=p,s.baseState=!0),l):(s.baseState&&(s.baseState=!1,no=!0),s.memoizedState=p)}function aw(s,l){var p=ct;ct=p!==0&&4>p?p:4,s(!0);var b=Kt.transition;Kt.transition={};try{s(!1),l()}finally{ct=p,Kt.transition=b}}function Zc(){return Dr().memoizedState}function Bu(s,l,p){var b=Js(s);if(p={lane:b,action:p,hasEagerState:!1,eagerState:null,next:null},Tp(s))Kg(l,p);else if(p=eo(s,l,p,b),p!==null){var x=Do();Xi(p,s,b,x),Ip(p,l,b)}}function Jg(s,l,p){var b=Js(s),x={lane:b,action:p,hasEagerState:!1,eagerState:null,next:null};if(Tp(s))Kg(l,x);else{var P=s.alternate;if(s.lanes===0&&(P===null||P.lanes===0)&&(P=l.lastRenderedReducer,P!==null))try{var V=l.lastRenderedState,ce=P(V,p);if(x.hasEagerState=!0,x.eagerState=ce,Pe(ce,V)){var ye=l.interleaved;ye===null?(x.next=x,uf(l)):(x.next=ye.next,ye.next=x),l.interleaved=x;return}}catch{}p=eo(s,l,x,b),p!==null&&(x=Do(),Xi(p,s,b,x),Ip(p,l,b))}}function Tp(s){var l=s.alternate;return s===Wn||l!==null&&l===Wn}function Kg(s,l){Vc=mf=!0;var p=s.pending;p===null?l.next=l:(l.next=p.next,p.next=l),s.pending=l}function Ip(s,l,p){if(p&4194240){var b=l.lanes;b&=s.pendingLanes,p|=b,l.lanes=p,ot(s,p)}}var ns={readContext:wo,useCallback:Sr,useContext:Sr,useEffect:Sr,useImperativeHandle:Sr,useInsertionEffect:Sr,useLayoutEffect:Sr,useMemo:Sr,useReducer:Sr,useRef:Sr,useState:Sr,useDebugValue:Sr,useDeferredValue:Sr,useTransition:Sr,useMutableSource:Sr,useSyncExternalStore:Sr,useId:Sr,unstable_isNewReconciler:!1},$c={readContext:wo,useCallback:function(s,l){return Xn().memoizedState=[s,l===void 0?null:l],s},useContext:wo,useEffect:$g,useImperativeHandle:function(s,l,p){return p=p!=null?p.concat([s]):null,_u(4194308,4,qg.bind(null,l,s),p)},useLayoutEffect:function(s,l){return _u(4194308,4,s,l)},useInsertionEffect:function(s,l){return _u(4,2,s,l)},useMemo:function(s,l){var p=Xn();return l=l===void 0?null:l,s=s(),p.memoizedState=[s,l],s},useReducer:function(s,l,p){var b=Xn();return l=p!==void 0?p(l):l,b.memoizedState=b.baseState=l,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:l},b.queue=s,s=s.dispatch=Bu.bind(null,Wn,s),[b.memoizedState,s]},useRef:function(s){var l=Xn();return s={current:s},l.memoizedState=s},useState:ts,useDebugValue:Tf,useDeferredValue:function(s){return Xn().memoizedState=s},useTransition:function(){var s=ts(!1),l=s[0];return s=aw.bind(null,s[1]),Xn().memoizedState=s,[l,s]},useMutableSource:function(){},useSyncExternalStore:function(s,l,p){var b=Wn,x=Xn();if(Yn){if(p===void 0)throw Error(n(407));p=p()}else{if(p=l(),Ar===null)throw Error(n(349));Bl&30||yp(b,l,p)}x.memoizedState=p;var P={value:p,getSnapshot:l};return x.queue=P,$g(Sf.bind(null,b,P,s),[s]),b.flags|=2048,Ru(9,bf.bind(null,b,P,p,l),void 0,null),p},useId:function(){var s=Xn(),l=Ar.identifierPrefix;if(Yn){var p=ba,b=wa;p=(b&~(1<<32-vr(b)-1)).toString(32)+p,l=":"+l+"R"+p,p=to++,0<p&&(l+="H"+p.toString(32)),l+=":"}else p=iw++,l=":"+l+"r"+p.toString(32)+":";return s.memoizedState=l},unstable_isNewReconciler:!1},sw={readContext:wo,useCallback:bo,useContext:wo,useEffect:wp,useImperativeHandle:Dp,useInsertionEffect:bp,useLayoutEffect:Sp,useMemo:Ki,useReducer:vf,useRef:vp,useState:function(){return vf(Hl)},useDebugValue:Tf,useDeferredValue:function(s){var l=Dr();return Gg(l,Zn.memoizedState,s)},useTransition:function(){var s=vf(Hl)[0],l=Dr().memoizedState;return[s,l]},useMutableSource:gp,useSyncExternalStore:wf,useId:Zc,unstable_isNewReconciler:!1},Qg={readContext:wo,useCallback:bo,useContext:wo,useEffect:wp,useImperativeHandle:Dp,useInsertionEffect:bp,useLayoutEffect:Sp,useMemo:Ki,useReducer:Lu,useRef:vp,useState:function(){return Lu(Hl)},useDebugValue:Tf,useDeferredValue:function(s){var l=Dr();return Zn===null?l.memoizedState=s:Gg(l,Zn.memoizedState,s)},useTransition:function(){var s=Lu(Hl)[0],l=Dr().memoizedState;return[s,l]},useMutableSource:gp,useSyncExternalStore:wf,useId:Zc,unstable_isNewReconciler:!1};function Yl(s,l){try{var p="",b=l;do p+=Ne(b),b=b.return;while(b);var x=p}catch(P){x=`
|
|
|
Error generating stack: `+P.message+`
|
|
|
`+P.stack}return{value:s,source:l,stack:x,digest:null}}function Hu(s,l,p){return{value:s,source:null,stack:p??null,digest:l??null}}function If(s,l){try{console.error(l.value)}catch(p){setTimeout(function(){throw p})}}var xf=typeof WeakMap=="function"?WeakMap:Map;function Ef(s,l,p){p=Gi(-1,p),p.tag=3,p.payload={element:null};var b=l.value;return p.callback=function(){Lf||(Lf=!0,Bp=b),If(s,l)},p}function qc(s,l,p){p=Gi(-1,p),p.tag=3;var b=s.type.getDerivedStateFromError;if(typeof b=="function"){var x=l.value;p.payload=function(){return b(x)},p.callback=function(){If(s,l)}}var P=s.stateNode;return P!==null&&typeof P.componentDidCatch=="function"&&(p.callback=function(){If(s,l),typeof b!="function"&&(Gs===null?Gs=new Set([this]):Gs.add(this));var V=l.stack;this.componentDidCatch(l.value,{componentStack:V!==null?V:""})}),p}function Xg(s,l,p){var b=s.pingCache;if(b===null){b=s.pingCache=new xf;var x=new Set;b.set(l,x)}else x=b.get(l),x===void 0&&(x=new Set,b.set(l,x));x.has(p)||(x.add(p),s=mw.bind(null,s,l,p),l.then(s,s))}function xp(s){do{var l;if((l=s.tag===13)&&(l=s.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return s;s=s.return}while(s!==null);return null}function Gc(s,l,p,b,x){return s.mode&1?(s.flags|=65536,s.lanes=x,s):(s===l?s.flags|=65536:(s.flags|=128,p.flags|=131072,p.flags&=-52805,p.tag===1&&(p.alternate===null?p.tag=17:(l=Gi(-1,1),l.tag=2,Hs(p,l,1))),p.lanes|=1),s)}var ey=j.ReactCurrentOwner,no=!1;function So(s,l,p,b){l.child=s===null?fp(l,null,p,b):Us(l,s.child,p,b)}function Ep(s,l,p,b,x){p=p.render;var P=l.ref;return _s(l,x),b=gf(s,l,p,b,P,x),p=yf(),s!==null&&!no?(l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~x,Ea(s,l,x)):(Yn&&p&&Lc(l),l.flags|=1,So(s,l,b,x),l.child)}function Ia(s,l,p,b,x){if(s===null){var P=p.type;return typeof P=="function"&&!$p(P)&&P.defaultProps===void 0&&p.compare===null&&p.defaultProps===void 0?(l.tag=15,l.type=P,Cp(s,l,P,b,x)):(s=Uf(p.type,null,b,l,l.mode,x),s.ref=l.ref,s.return=l,l.child=s)}if(P=s.child,!(s.lanes&x)){var V=P.memoizedProps;if(p=p.compare,p=p!==null?p:pt,p(V,b)&&s.ref===l.ref)return Ea(s,l,x)}return l.flags|=1,s=Xs(P,b),s.ref=l.ref,s.return=l,l.child=s}function Cp(s,l,p,b,x){if(s!==null){var P=s.memoizedProps;if(pt(P,b)&&s.ref===l.ref)if(no=!1,l.pendingProps=b=P,(s.lanes&x)!==0)s.flags&131072&&(no=!0);else return l.lanes=s.lanes,Ea(s,l,x)}return Cf(s,l,p,b,x)}function Mp(s,l,p){var b=l.pendingProps,x=b.children,P=s!==null?s.memoizedState:null;if(b.mode==="hidden")if(!(l.mode&1))l.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ln(Wu,ti),ti|=p;else{if(!(p&1073741824))return s=P!==null?P.baseLanes|p:p,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:s,cachePool:null,transitions:null},l.updateQueue=null,Ln(Wu,ti),ti|=s,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},b=P!==null?P.baseLanes:p,Ln(Wu,ti),ti|=b}else P!==null?(b=P.baseLanes|p,l.memoizedState=null):b=p,Ln(Wu,ti),ti|=b;return So(s,l,x,p),l.child}function ty(s,l){var p=l.ref;(s===null&&p!==null||s!==null&&s.ref!==p)&&(l.flags|=512,l.flags|=2097152)}function Cf(s,l,p,b,x){var P=Po(p)?vo:Kr.current;return P=Nu(l,P),_s(l,x),p=gf(s,l,p,b,P,x),b=yf(),s!==null&&!no?(l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~x,Ea(s,l,x)):(Yn&&b&&Lc(l),l.flags|=1,So(s,l,p,x),l.child)}function ny(s,l,p,b,x){if(Po(p)){var P=!0;vi(l)}else P=!1;if(_s(l,x),l.stateNode===null)Yu(s,l),cp(l,p,b),dp(l,p,b,x),b=!0;else if(s===null){var V=l.stateNode,ce=l.memoizedProps;V.props=ce;var ye=V.context,Le=p.contextType;typeof Le=="object"&&Le!==null?Le=wo(Le):(Le=Po(p)?vo:Kr.current,Le=Nu(l,Le));var Ge=p.getDerivedStateFromProps,Xe=typeof Ge=="function"||typeof V.getSnapshotBeforeUpdate=="function";Xe||typeof V.UNSAFE_componentWillReceiveProps!="function"&&typeof V.componentWillReceiveProps!="function"||(ce!==b||ye!==Le)&&Vg(l,V,b,Le),Bs=!1;var qe=l.memoizedState;V.state=qe,cf(l,b,V,x),ye=l.memoizedState,ce!==b||qe!==ye||Fo.current||Bs?(typeof Ge=="function"&&(up(l,p,Ge,b),ye=l.memoizedState),(ce=Bs||ff(l,p,ce,b,qe,ye,Le))?(Xe||typeof V.UNSAFE_componentWillMount!="function"&&typeof V.componentWillMount!="function"||(typeof V.componentWillMount=="function"&&V.componentWillMount(),typeof V.UNSAFE_componentWillMount=="function"&&V.UNSAFE_componentWillMount()),typeof V.componentDidMount=="function"&&(l.flags|=4194308)):(typeof V.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=b,l.memoizedState=ye),V.props=b,V.state=ye,V.context=Le,b=ce):(typeof V.componentDidMount=="function"&&(l.flags|=4194308),b=!1)}else{V=l.stateNode,Ug(s,l),ce=l.memoizedProps,Le=l.type===l.elementType?ce:$i(l.type,ce),V.props=Le,Xe=l.pendingProps,qe=V.context,ye=p.contextType,typeof ye=="object"&&ye!==null?ye=wo(ye):(ye=Po(p)?vo:Kr.current,ye=Nu(l,ye));var mt=p.getDerivedStateFromProps;(Ge=typeof mt=="function"||typeof V.getSnapshotBeforeUpdate=="function")||typeof V.UNSAFE_componentWillReceiveProps!="function"&&typeof V.componentWillReceiveProps!="function"||(ce!==Xe||qe!==ye)&&Vg(l,V,b,ye),Bs=!1,qe=l.memoizedState,V.state=qe,cf(l,b,V,x);var bt=l.memoizedState;ce!==Xe||qe!==bt||Fo.current||Bs?(typeof mt=="function"&&(up(l,p,mt,b),bt=l.memoizedState),(Le=Bs||ff(l,p,Le,b,qe,bt,ye)||!1)?(Ge||typeof V.UNSAFE_componentWillUpdate!="function"&&typeof V.componentWillUpdate!="function"||(typeof V.componentWillUpdate=="function"&&V.componentWillUpdate(b,bt,ye),typeof V.UNSAFE_componentWillUpdate=="function"&&V.UNSAFE_componentWillUpdate(b,bt,ye)),typeof V.componentDidUpdate=="function"&&(l.flags|=4),typeof V.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof V.componentDidUpdate!="function"||ce===s.memoizedProps&&qe===s.memoizedState||(l.flags|=4),typeof V.getSnapshotBeforeUpdate!="function"||ce===s.memoizedProps&&qe===s.memoizedState||(l.flags|=1024),l.memoizedProps=b,l.memoizedState=bt),V.props=b,V.state=bt,V.context=ye,b=Le):(typeof V.componentDidUpdate!="function"||ce===s.memoizedProps&&qe===s.memoizedState||(l.flags|=4),typeof V.getSnapshotBeforeUpdate!="function"||ce===s.memoizedProps&&qe===s.memoizedState||(l.flags|=1024),b=!1)}return kp(s,l,p,b,P,x)}function kp(s,l,p,b,x,P){ty(s,l);var V=(l.flags&128)!==0;if(!b&&!V)return x&&Rg(l,p,!1),Ea(s,l,P);b=l.stateNode,ey.current=l;var ce=V&&typeof p.getDerivedStateFromError!="function"?null:b.render();return l.flags|=1,s!==null&&V?(l.child=Us(l,s.child,null,P),l.child=Us(l,null,ce,P)):So(s,l,ce,P),l.memoizedState=b.state,x&&Rg(l,p,!0),l.child}function xa(s){var l=s.stateNode;l.pendingContext?jg(s,l.pendingContext,l.pendingContext!==l.context):l.context&&jg(s,l.context,!1),pf(s,l.containerInfo)}function Mf(s,l,p,b,x){return Da(),Ta(x),l.flags|=256,So(s,l,p,b),l.child}var Jc={dehydrated:null,treeContext:null,retryLane:0};function Kc(s){return{baseLanes:s,cachePool:null,transitions:null}}function Qc(s,l,p){var b=l.pendingProps,x=Un.current,P=!1,V=(l.flags&128)!==0,ce;if((ce=V)||(ce=s!==null&&s.memoizedState===null?!1:(x&2)!==0),ce?(P=!0,l.flags&=-129):(s===null||s.memoizedState!==null)&&(x|=1),Ln(Un,x&1),s===null)return Oo(l),s=l.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?(l.mode&1?s.data==="$!"?l.lanes=8:l.lanes=1073741824:l.lanes=1,null):(V=b.children,s=b.fallback,P?(b=l.mode,P=l.child,V={mode:"hidden",children:V},!(b&1)&&P!==null?(P.childLanes=0,P.pendingProps=V):P=zf(V,b,0,null),s=Wl(s,b,p,null),P.return=l,s.return=l,P.sibling=s,l.child=P,l.child.memoizedState=Kc(p),l.memoizedState=Jc,s):Ws(l,V));if(x=s.memoizedState,x!==null&&(ce=x.dehydrated,ce!==null))return kf(s,l,V,b,ce,x,p);if(P){P=b.fallback,V=l.mode,x=s.child,ce=x.sibling;var ye={mode:"hidden",children:b.children};return!(V&1)&&l.child!==x?(b=l.child,b.childLanes=0,b.pendingProps=ye,l.deletions=null):(b=Xs(x,ye),b.subtreeFlags=x.subtreeFlags&14680064),ce!==null?P=Xs(ce,P):(P=Wl(P,V,p,null),P.flags|=2),P.return=l,b.return=l,b.sibling=P,l.child=b,b=P,P=l.child,V=s.child.memoizedState,V=V===null?Kc(p):{baseLanes:V.baseLanes|p,cachePool:null,transitions:V.transitions},P.memoizedState=V,P.childLanes=s.childLanes&~p,l.memoizedState=Jc,b}return P=s.child,s=P.sibling,b=Xs(P,{mode:"visible",children:b.children}),!(l.mode&1)&&(b.lanes=p),b.return=l,b.sibling=null,s!==null&&(p=l.deletions,p===null?(l.deletions=[s],l.flags|=16):p.push(s)),l.child=b,l.memoizedState=null,b}function Ws(s,l){return l=zf({mode:"visible",children:l},s.mode,0,null),l.return=s,s.child=l}function At(s,l,p,b){return b!==null&&Ta(b),Us(l,s.child,null,p),s=Ws(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function kf(s,l,p,b,x,P,V){if(p)return l.flags&256?(l.flags&=-257,b=Hu(Error(n(422))),At(s,l,V,b)):l.memoizedState!==null?(l.child=s.child,l.flags|=128,null):(P=b.fallback,x=l.mode,b=zf({mode:"visible",children:b.children},x,0,null),P=Wl(P,x,V,null),P.flags|=2,b.return=l,P.return=l,b.sibling=P,l.child=b,l.mode&1&&Us(l,s.child,null,V),l.child.memoizedState=Kc(V),l.memoizedState=Jc,P);if(!(l.mode&1))return At(s,l,V,null);if(x.data==="$!"){if(b=x.nextSibling&&x.nextSibling.dataset,b)var ce=b.dgst;return b=ce,P=Error(n(419)),b=Hu(P,b,void 0),At(s,l,V,b)}if(ce=(V&s.childLanes)!==0,no||ce){if(b=Ar,b!==null){switch(V&-V){case 4:x=2;break;case 16:x=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:x=32;break;case 536870912:x=268435456;break;default:x=0}x=x&(b.suspendedLanes|V)?0:x,x!==0&&x!==P.retryLane&&(P.retryLane=x,qi(s,x),Xi(b,s,x,-1))}return Wp(),b=Hu(Error(n(421))),At(s,l,V,b)}return x.data==="$?"?(l.flags|=128,l.child=s.child,l=gw.bind(null,s),x._reactRetry=l,null):(s=P.treeContext,Ko=Os(x.nextSibling),Xr=l,Yn=!0,Zi=null,s!==null&&(wi[bi++]=wa,wi[bi++]=ba,wi[bi++]=Ol,wa=s.id,ba=s.overflow,Ol=l),l=Ws(l,b.children),l.flags|=4096,l)}function Nf(s,l,p){s.lanes|=l;var b=s.alternate;b!==null&&(b.lanes|=l),Si(s.return,l,p)}function rs(s,l,p,b,x){var P=s.memoizedState;P===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:b,tail:p,tailMode:x}:(P.isBackwards=l,P.rendering=null,P.renderingStartTime=0,P.last=b,P.tail=p,P.tailMode=x)}function ry(s,l,p){var b=l.pendingProps,x=b.revealOrder,P=b.tail;if(So(s,l,b.children,p),b=Un.current,b&2)b=b&1|2,l.flags|=128;else{if(s!==null&&s.flags&128)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&Nf(s,p,l);else if(s.tag===19)Nf(s,p,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}b&=1}if(Ln(Un,b),!(l.mode&1))l.memoizedState=null;else switch(x){case"forwards":for(p=l.child,x=null;p!==null;)s=p.alternate,s!==null&&Uc(s)===null&&(x=p),p=p.sibling;p=x,p===null?(x=l.child,l.child=null):(x=p.sibling,p.sibling=null),rs(l,!1,x,p,P);break;case"backwards":for(p=null,x=l.child,l.child=null;x!==null;){if(s=x.alternate,s!==null&&Uc(s)===null){l.child=x;break}s=x.sibling,x.sibling=p,p=x,x=s}rs(l,!0,p,null,P);break;case"together":rs(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function Yu(s,l){!(l.mode&1)&&s!==null&&(s.alternate=null,l.alternate=null,l.flags|=2)}function Ea(s,l,p){if(s!==null&&(l.dependencies=s.dependencies),qs|=l.lanes,!(p&l.childLanes))return null;if(s!==null&&l.child!==s.child)throw Error(n(153));if(l.child!==null){for(s=l.child,p=Xs(s,s.pendingProps),l.child=p,p.return=l;s.sibling!==null;)s=s.sibling,p=p.sibling=Xs(s,s.pendingProps),p.return=l;p.sibling=null}return l.child}function ro(s,l,p){switch(l.tag){case 3:xa(l),Da();break;case 5:hp(l);break;case 1:Po(l.type)&&vi(l);break;case 4:pf(l,l.stateNode.containerInfo);break;case 10:var b=l.type._context,x=l.memoizedProps.value;Ln(Rl,b._currentValue),b._currentValue=x;break;case 13:if(b=l.memoizedState,b!==null)return b.dehydrated!==null?(Ln(Un,Un.current&1),l.flags|=128,null):p&l.child.childLanes?Qc(s,l,p):(Ln(Un,Un.current&1),s=Ea(s,l,p),s!==null?s.sibling:null);Ln(Un,Un.current&1);break;case 19:if(b=(p&l.childLanes)!==0,s.flags&128){if(b)return ry(s,l,p);l.flags|=128}if(x=l.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),Ln(Un,Un.current),b)break;return null;case 22:case 23:return l.lanes=0,Mp(s,l,p)}return Ea(s,l,p)}var oy,Np,Ap,iy;oy=function(s,l){for(var p=l.child;p!==null;){if(p.tag===5||p.tag===6)s.appendChild(p.stateNode);else if(p.tag!==4&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===l)break;for(;p.sibling===null;){if(p.return===null||p.return===l)return;p=p.return}p.sibling.return=p.return,p=p.sibling}},Np=function(){},Ap=function(s,l,p,b){var x=s.memoizedProps;if(x!==b){s=l.stateNode,Vs(Ji.current);var P=null;switch(p){case"input":x=at(s,x),b=at(s,b),P=[];break;case"select":x=K({},x,{value:void 0}),b=K({},b,{value:void 0}),P=[];break;case"textarea":x=cn(s,x),b=cn(s,b),P=[];break;default:typeof x.onClick!="function"&&typeof b.onClick=="function"&&(s.onclick=Kd)}ui(p,b);var V;p=null;for(Le in x)if(!b.hasOwnProperty(Le)&&x.hasOwnProperty(Le)&&x[Le]!=null)if(Le==="style"){var ce=x[Le];for(V in ce)ce.hasOwnProperty(V)&&(p||(p={}),p[V]="")}else Le!=="dangerouslySetInnerHTML"&&Le!=="children"&&Le!=="suppressContentEditableWarning"&&Le!=="suppressHydrationWarning"&&Le!=="autoFocus"&&(o.hasOwnProperty(Le)?P||(P=[]):(P=P||[]).push(Le,null));for(Le in b){var ye=b[Le];if(ce=x!=null?x[Le]:void 0,b.hasOwnProperty(Le)&&ye!==ce&&(ye!=null||ce!=null))if(Le==="style")if(ce){for(V in ce)!ce.hasOwnProperty(V)||ye&&ye.hasOwnProperty(V)||(p||(p={}),p[V]="");for(V in ye)ye.hasOwnProperty(V)&&ce[V]!==ye[V]&&(p||(p={}),p[V]=ye[V])}else p||(P||(P=[]),P.push(Le,p)),p=ye;else Le==="dangerouslySetInnerHTML"?(ye=ye?ye.__html:void 0,ce=ce?ce.__html:void 0,ye!=null&&ce!==ye&&(P=P||[]).push(Le,ye)):Le==="children"?typeof ye!="string"&&typeof ye!="number"||(P=P||[]).push(Le,""+ye):Le!=="suppressContentEditableWarning"&&Le!=="suppressHydrationWarning"&&(o.hasOwnProperty(Le)?(ye!=null&&Le==="onScroll"&&Bn("scroll",s),P||ce===ye||(P=[])):(P=P||[]).push(Le,ye))}p&&(P=P||[]).push("style",p);var Le=P;(l.updateQueue=Le)&&(l.flags|=4)}},iy=function(s,l,p,b){p!==b&&(l.flags|=4)};function Uu(s,l){if(!Yn)switch(s.tailMode){case"hidden":l=s.tail;for(var p=null;l!==null;)l.alternate!==null&&(p=l),l=l.sibling;p===null?s.tail=null:p.sibling=null;break;case"collapsed":p=s.tail;for(var b=null;p!==null;)p.alternate!==null&&(b=p),p=p.sibling;b===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:b.sibling=null}}function oo(s){var l=s.alternate!==null&&s.alternate.child===s.child,p=0,b=0;if(l)for(var x=s.child;x!==null;)p|=x.lanes|x.childLanes,b|=x.subtreeFlags&14680064,b|=x.flags&14680064,x.return=s,x=x.sibling;else for(x=s.child;x!==null;)p|=x.lanes|x.childLanes,b|=x.subtreeFlags,b|=x.flags,x.return=s,x=x.sibling;return s.subtreeFlags|=b,s.childLanes=p,l}function lw(s,l,p){var b=l.pendingProps;switch(Ll(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return oo(l),null;case 1:return Po(l.type)&&tf(),oo(l),null;case 3:return b=l.stateNode,Ou(),Hn(Fo),Hn(Kr),mp(),b.pendingContext&&(b.context=b.pendingContext,b.pendingContext=null),(s===null||s.child===null)&&(Rc(l)?l.flags|=4:s===null||s.memoizedState.isDehydrated&&!(l.flags&256)||(l.flags|=1024,Zi!==null&&(Up(Zi),Zi=null))),Np(s,l),oo(l),null;case 5:pp(l);var x=Vs(Yc.current);if(p=l.type,s!==null&&l.stateNode!=null)Ap(s,l,p,b,x),s.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!b){if(l.stateNode===null)throw Error(n(166));return oo(l),null}if(s=Vs(Ji.current),Rc(l)){b=l.stateNode,p=l.type;var P=l.memoizedProps;switch(b[ya]=l,b[js]=P,s=(l.mode&1)!==0,p){case"dialog":Bn("cancel",b),Bn("close",b);break;case"iframe":case"object":case"embed":Bn("load",b);break;case"video":case"audio":for(x=0;x<Ka.length;x++)Bn(Ka[x],b);break;case"source":Bn("error",b);break;case"img":case"image":case"link":Bn("error",b),Bn("load",b);break;case"details":Bn("toggle",b);break;case"input":gt(b,P),Bn("invalid",b);break;case"select":b._wrapperState={wasMultiple:!!P.multiple},Bn("invalid",b);break;case"textarea":Xt(b,P),Bn("invalid",b)}ui(p,P),x=null;for(var V in P)if(P.hasOwnProperty(V)){var ce=P[V];V==="children"?typeof ce=="string"?b.textContent!==ce&&(P.suppressHydrationWarning!==!0&&Fc(b.textContent,ce,s),x=["children",ce]):typeof ce=="number"&&b.textContent!==""+ce&&(P.suppressHydrationWarning!==!0&&Fc(b.textContent,ce,s),x=["children",""+ce]):o.hasOwnProperty(V)&&ce!=null&&V==="onScroll"&&Bn("scroll",b)}switch(p){case"input":Zt(b),qt(b,P,!0);break;case"textarea":Zt(b),En(b);break;case"select":case"option":break;default:typeof P.onClick=="function"&&(b.onclick=Kd)}b=x,l.updateQueue=b,b!==null&&(l.flags|=4)}else{V=x.nodeType===9?x:x.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=Cr(p)),s==="http://www.w3.org/1999/xhtml"?p==="script"?(s=V.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof b.is=="string"?s=V.createElement(p,{is:b.is}):(s=V.createElement(p),p==="select"&&(V=s,b.multiple?V.multiple=!0:b.size&&(V.size=b.size))):s=V.createElementNS(s,p),s[ya]=l,s[js]=b,oy(s,l,!1,!1),l.stateNode=s;e:{switch(V=_i(p,b),p){case"dialog":Bn("cancel",s),Bn("close",s),x=b;break;case"iframe":case"object":case"embed":Bn("load",s),x=b;break;case"video":case"audio":for(x=0;x<Ka.length;x++)Bn(Ka[x],s);x=b;break;case"source":Bn("error",s),x=b;break;case"img":case"image":case"link":Bn("error",s),Bn("load",s),x=b;break;case"details":Bn("toggle",s),x=b;break;case"input":gt(s,b),x=at(s,b),Bn("invalid",s);break;case"option":x=b;break;case"select":s._wrapperState={wasMultiple:!!b.multiple},x=K({},b,{value:void 0}),Bn("invalid",s);break;case"textarea":Xt(s,b),x=cn(s,b),Bn("invalid",s);break;default:x=b}ui(p,x),ce=x;for(P in ce)if(ce.hasOwnProperty(P)){var ye=ce[P];P==="style"?Ri(s,ye):P==="dangerouslySetInnerHTML"?(ye=ye?ye.__html:void 0,ye!=null&&ji(s,ye)):P==="children"?typeof ye=="string"?(p!=="textarea"||ye!=="")&&xo(s,ye):typeof ye=="number"&&xo(s,""+ye):P!=="suppressContentEditableWarning"&&P!=="suppressHydrationWarning"&&P!=="autoFocus"&&(o.hasOwnProperty(P)?ye!=null&&P==="onScroll"&&Bn("scroll",s):ye!=null&&R(s,P,ye,V))}switch(p){case"input":Zt(s),qt(s,b,!1);break;case"textarea":Zt(s),En(s);break;case"option":b.value!=null&&s.setAttribute("value",""+ze(b.value));break;case"select":s.multiple=!!b.multiple,P=b.value,P!=null?Gt(s,!!b.multiple,P,!1):b.defaultValue!=null&&Gt(s,!!b.multiple,b.defaultValue,!0);break;default:typeof x.onClick=="function"&&(s.onclick=Kd)}switch(p){case"button":case"input":case"select":case"textarea":b=!!b.autoFocus;break e;case"img":b=!0;break e;default:b=!1}}b&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return oo(l),null;case 6:if(s&&l.stateNode!=null)iy(s,l,s.memoizedProps,b);else{if(typeof b!="string"&&l.stateNode===null)throw Error(n(166));if(p=Vs(Yc.current),Vs(Ji.current),Rc(l)){if(b=l.stateNode,p=l.memoizedProps,b[ya]=l,(P=b.nodeValue!==p)&&(s=Xr,s!==null))switch(s.tag){case 3:Fc(b.nodeValue,p,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&Fc(b.nodeValue,p,(s.mode&1)!==0)}P&&(l.flags|=4)}else b=(p.nodeType===9?p:p.ownerDocument).createTextNode(b),b[ya]=l,l.stateNode=b}return oo(l),null;case 13:if(Hn(Un),b=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(Yn&&Ko!==null&&l.mode&1&&!(l.flags&128))ap(),Da(),l.flags|=98560,P=!1;else if(P=Rc(l),b!==null&&b.dehydrated!==null){if(s===null){if(!P)throw Error(n(318));if(P=l.memoizedState,P=P!==null?P.dehydrated:null,!P)throw Error(n(317));P[ya]=l}else Da(),!(l.flags&128)&&(l.memoizedState=null),l.flags|=4;oo(l),P=!1}else Zi!==null&&(Up(Zi),Zi=null),P=!0;if(!P)return l.flags&65536?l:null}return l.flags&128?(l.lanes=p,l):(b=b!==null,b!==(s!==null&&s.memoizedState!==null)&&b&&(l.child.flags|=8192,l.mode&1&&(s===null||Un.current&1?Tr===0&&(Tr=3):Wp())),l.updateQueue!==null&&(l.flags|=4),oo(l),null);case 4:return Ou(),Np(s,l),s===null&&Fs(l.stateNode.containerInfo),oo(l),null;case 10:return lf(l.type._context),oo(l),null;case 17:return Po(l.type)&&tf(),oo(l),null;case 19:if(Hn(Un),P=l.memoizedState,P===null)return oo(l),null;if(b=(l.flags&128)!==0,V=P.rendering,V===null)if(b)Uu(P,!1);else{if(Tr!==0||s!==null&&s.flags&128)for(s=l.child;s!==null;){if(V=Uc(s),V!==null){for(l.flags|=128,Uu(P,!1),b=V.updateQueue,b!==null&&(l.updateQueue=b,l.flags|=4),l.subtreeFlags=0,b=p,p=l.child;p!==null;)P=p,s=b,P.flags&=14680066,V=P.alternate,V===null?(P.childLanes=0,P.lanes=s,P.child=null,P.subtreeFlags=0,P.memoizedProps=null,P.memoizedState=null,P.updateQueue=null,P.dependencies=null,P.stateNode=null):(P.childLanes=V.childLanes,P.lanes=V.lanes,P.child=V.child,P.subtreeFlags=0,P.deletions=null,P.memoizedProps=V.memoizedProps,P.memoizedState=V.memoizedState,P.updateQueue=V.updateQueue,P.type=V.type,s=V.dependencies,P.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),p=p.sibling;return Ln(Un,Un.current&1|2),l.child}s=s.sibling}P.tail!==null&&Sn()>$u&&(l.flags|=128,b=!0,Uu(P,!1),l.lanes=4194304)}else{if(!b)if(s=Uc(V),s!==null){if(l.flags|=128,b=!0,p=s.updateQueue,p!==null&&(l.updateQueue=p,l.flags|=4),Uu(P,!0),P.tail===null&&P.tailMode==="hidden"&&!V.alternate&&!Yn)return oo(l),null}else 2*Sn()-P.renderingStartTime>$u&&p!==1073741824&&(l.flags|=128,b=!0,Uu(P,!1),l.lanes=4194304);P.isBackwards?(V.sibling=l.child,l.child=V):(p=P.last,p!==null?p.sibling=V:l.child=V,P.last=V)}return P.tail!==null?(l=P.tail,P.rendering=l,P.tail=l.sibling,P.renderingStartTime=Sn(),l.sibling=null,p=Un.current,Ln(Un,b?p&1|2:p&1),l):(oo(l),null);case 22:case 23:return Vp(),b=l.memoizedState!==null,s!==null&&s.memoizedState!==null!==b&&(l.flags|=8192),b&&l.mode&1?ti&1073741824&&(oo(l),l.subtreeFlags&6&&(l.flags|=8192)):oo(l),null;case 24:return null;case 25:return null}throw Error(n(156,l.tag))}function uw(s,l){switch(Ll(l),l.tag){case 1:return Po(l.type)&&tf(),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return Ou(),Hn(Fo),Hn(Kr),mp(),s=l.flags,s&65536&&!(s&128)?(l.flags=s&-65537|128,l):null;case 5:return pp(l),null;case 13:if(Hn(Un),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(n(340));Da()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return Hn(Un),null;case 4:return Ou(),null;case 10:return lf(l.type._context),null;case 22:case 23:return Vp(),null;case 24:return null;default:return null}}var Di=!1,Dn=!1,Fp=typeof WeakSet=="function"?WeakSet:Set,vt=null;function Zs(s,l){var p=s.ref;if(p!==null)if(typeof p=="function")try{p(null)}catch(b){er(s,l,b)}else p.current=null}function Pp(s,l,p){try{p()}catch(b){er(s,l,b)}}var ay=!1;function Xc(s,l){if(Pc=qo,s=kn(),Ec(s)){if("selectionStart"in s)var p={start:s.selectionStart,end:s.selectionEnd};else e:{p=(p=s.ownerDocument)&&p.defaultView||window;var b=p.getSelection&&p.getSelection();if(b&&b.rangeCount!==0){p=b.anchorNode;var x=b.anchorOffset,P=b.focusNode;b=b.focusOffset;try{p.nodeType,P.nodeType}catch{p=null;break e}var V=0,ce=-1,ye=-1,Le=0,Ge=0,Xe=s,qe=null;t:for(;;){for(var mt;Xe!==p||x!==0&&Xe.nodeType!==3||(ce=V+x),Xe!==P||b!==0&&Xe.nodeType!==3||(ye=V+b),Xe.nodeType===3&&(V+=Xe.nodeValue.length),(mt=Xe.firstChild)!==null;)qe=Xe,Xe=mt;for(;;){if(Xe===s)break t;if(qe===p&&++Le===x&&(ce=V),qe===P&&++Ge===b&&(ye=V),(mt=Xe.nextSibling)!==null)break;Xe=qe,qe=Xe.parentNode}Xe=mt}p=ce===-1||ye===-1?null:{start:ce,end:ye}}else p=null}p=p||{start:0,end:0}}else p=null;for(Fl={focusedElem:s,selectionRange:p},qo=!1,vt=l;vt!==null;)if(l=vt,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,vt=s;else for(;vt!==null;){l=vt;try{var bt=l.alternate;if(l.flags&1024)switch(l.tag){case 0:case 11:case 15:break;case 1:if(bt!==null){var Dt=bt.memoizedProps,ir=bt.memoizedState,Ee=l.stateNode,we=Ee.getSnapshotBeforeUpdate(l.elementType===l.type?Dt:$i(l.type,Dt),ir);Ee.__reactInternalSnapshotBeforeUpdate=we}break;case 3:var Ce=l.stateNode.containerInfo;Ce.nodeType===1?Ce.textContent="":Ce.nodeType===9&&Ce.documentElement&&Ce.removeChild(Ce.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(it){er(l,l.return,it)}if(s=l.sibling,s!==null){s.return=l.return,vt=s;break}vt=l.return}return bt=ay,ay=!1,bt}function zu(s,l,p){var b=l.updateQueue;if(b=b!==null?b.lastEffect:null,b!==null){var x=b=b.next;do{if((x.tag&s)===s){var P=x.destroy;x.destroy=void 0,P!==void 0&&Pp(l,p,P)}x=x.next}while(x!==b)}}function ed(s,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var p=l=l.next;do{if((p.tag&s)===s){var b=p.create;p.destroy=b()}p=p.next}while(p!==l)}}function Op(s){var l=s.ref;if(l!==null){var p=s.stateNode;switch(s.tag){case 5:s=p;break;default:s=p}typeof l=="function"?l(s):l.current=s}}function sy(s){var l=s.alternate;l!==null&&(s.alternate=null,sy(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&(delete l[ya],delete l[js],delete l[Xd],delete l[G],delete l[Mu])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function ly(s){return s.tag===5||s.tag===3||s.tag===4}function uy(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||ly(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Af(s,l,p){var b=s.tag;if(b===5||b===6)s=s.stateNode,l?p.nodeType===8?p.parentNode.insertBefore(s,l):p.insertBefore(s,l):(p.nodeType===8?(l=p.parentNode,l.insertBefore(s,p)):(l=p,l.appendChild(s)),p=p._reactRootContainer,p!=null||l.onclick!==null||(l.onclick=Kd));else if(b!==4&&(s=s.child,s!==null))for(Af(s,l,p),s=s.sibling;s!==null;)Af(s,l,p),s=s.sibling}function Ff(s,l,p){var b=s.tag;if(b===5||b===6)s=s.stateNode,l?p.insertBefore(s,l):p.appendChild(s);else if(b!==4&&(s=s.child,s!==null))for(Ff(s,l,p),s=s.sibling;s!==null;)Ff(s,l,p),s=s.sibling}var Ur=null,Xo=!1;function os(s,l,p){for(p=p.child;p!==null;)Vu(s,l,p),p=p.sibling}function Vu(s,l,p){if(po&&typeof po.onCommitFiberUnmount=="function")try{po.onCommitFiberUnmount(Vo,p)}catch{}switch(p.tag){case 5:Dn||Zs(p,l);case 6:var b=Ur,x=Xo;Ur=null,os(s,l,p),Ur=b,Xo=x,Ur!==null&&(Xo?(s=Ur,p=p.stateNode,s.nodeType===8?s.parentNode.removeChild(p):s.removeChild(p)):Ur.removeChild(p.stateNode));break;case 18:Ur!==null&&(Xo?(s=Ur,p=p.stateNode,s.nodeType===8?rp(s.parentNode,p):s.nodeType===1&&rp(s,p),an(s)):rp(Ur,p.stateNode));break;case 4:b=Ur,x=Xo,Ur=p.stateNode.containerInfo,Xo=!0,os(s,l,p),Ur=b,Xo=x;break;case 0:case 11:case 14:case 15:if(!Dn&&(b=p.updateQueue,b!==null&&(b=b.lastEffect,b!==null))){x=b=b.next;do{var P=x,V=P.destroy;P=P.tag,V!==void 0&&(P&2||P&4)&&Pp(p,l,V),x=x.next}while(x!==b)}os(s,l,p);break;case 1:if(!Dn&&(Zs(p,l),b=p.stateNode,typeof b.componentWillUnmount=="function"))try{b.props=p.memoizedProps,b.state=p.memoizedState,b.componentWillUnmount()}catch(ce){er(p,l,ce)}os(s,l,p);break;case 21:os(s,l,p);break;case 22:p.mode&1?(Dn=(b=Dn)||p.memoizedState!==null,os(s,l,p),Dn=b):os(s,l,p);break;default:os(s,l,p)}}function Pf(s){var l=s.updateQueue;if(l!==null){s.updateQueue=null;var p=s.stateNode;p===null&&(p=s.stateNode=new Fp),l.forEach(function(b){var x=yw.bind(null,s,b);p.has(b)||(p.add(b),b.then(x,x))})}}function Ti(s,l){var p=l.deletions;if(p!==null)for(var b=0;b<p.length;b++){var x=p[b];try{var P=s,V=l,ce=V;e:for(;ce!==null;){switch(ce.tag){case 5:Ur=ce.stateNode,Xo=!1;break e;case 3:Ur=ce.stateNode.containerInfo,Xo=!0;break e;case 4:Ur=ce.stateNode.containerInfo,Xo=!0;break e}ce=ce.return}if(Ur===null)throw Error(n(160));Vu(P,V,x),Ur=null,Xo=!1;var ye=x.alternate;ye!==null&&(ye.return=null),x.return=null}catch(Le){er(x,l,Le)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)jp(l,s),l=l.sibling}function jp(s,l){var p=s.alternate,b=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Ti(l,s),ei(s),b&4){try{zu(3,s,s.return),ed(3,s)}catch(Dt){er(s,s.return,Dt)}try{zu(5,s,s.return)}catch(Dt){er(s,s.return,Dt)}}break;case 1:Ti(l,s),ei(s),b&512&&p!==null&&Zs(p,p.return);break;case 5:if(Ti(l,s),ei(s),b&512&&p!==null&&Zs(p,p.return),s.flags&32){var x=s.stateNode;try{xo(x,"")}catch(Dt){er(s,s.return,Dt)}}if(b&4&&(x=s.stateNode,x!=null)){var P=s.memoizedProps,V=p!==null?p.memoizedProps:P,ce=s.type,ye=s.updateQueue;if(s.updateQueue=null,ye!==null)try{ce==="input"&&P.type==="radio"&&P.name!=null&&Et(x,P),_i(ce,V);var Le=_i(ce,P);for(V=0;V<ye.length;V+=2){var Ge=ye[V],Xe=ye[V+1];Ge==="style"?Ri(x,Xe):Ge==="dangerouslySetInnerHTML"?ji(x,Xe):Ge==="children"?xo(x,Xe):R(x,Ge,Xe,Le)}switch(ce){case"input":Tt(x,P);break;case"textarea":Qn(x,P);break;case"select":var qe=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!P.multiple;var mt=P.value;mt!=null?Gt(x,!!P.multiple,mt,!1):qe!==!!P.multiple&&(P.defaultValue!=null?Gt(x,!!P.multiple,P.defaultValue,!0):Gt(x,!!P.multiple,P.multiple?[]:"",!1))}x[js]=P}catch(Dt){er(s,s.return,Dt)}}break;case 6:if(Ti(l,s),ei(s),b&4){if(s.stateNode===null)throw Error(n(162));x=s.stateNode,P=s.memoizedProps;try{x.nodeValue=P}catch(Dt){er(s,s.return,Dt)}}break;case 3:if(Ti(l,s),ei(s),b&4&&p!==null&&p.memoizedState.isDehydrated)try{an(l.containerInfo)}catch(Dt){er(s,s.return,Dt)}break;case 4:Ti(l,s),ei(s);break;case 13:Ti(l,s),ei(s),x=s.child,x.flags&8192&&(P=x.memoizedState!==null,x.stateNode.isHidden=P,!P||x.alternate!==null&&x.alternate.memoizedState!==null||(jf=Sn())),b&4&&Pf(s);break;case 22:if(Ge=p!==null&&p.memoizedState!==null,s.mode&1?(Dn=(Le=Dn)||Ge,Ti(l,s),Dn=Le):Ti(l,s),ei(s),b&8192){if(Le=s.memoizedState!==null,(s.stateNode.isHidden=Le)&&!Ge&&s.mode&1)for(vt=s,Ge=s.child;Ge!==null;){for(Xe=vt=Ge;vt!==null;){switch(qe=vt,mt=qe.child,qe.tag){case 0:case 11:case 14:case 15:zu(4,qe,qe.return);break;case 1:Zs(qe,qe.return);var bt=qe.stateNode;if(typeof bt.componentWillUnmount=="function"){b=qe,p=qe.return;try{l=b,bt.props=l.memoizedProps,bt.state=l.memoizedState,bt.componentWillUnmount()}catch(Dt){er(b,p,Dt)}}break;case 5:Zs(qe,qe.return);break;case 22:if(qe.memoizedState!==null){dy(Xe);continue}}mt!==null?(mt.return=qe,vt=mt):dy(Xe)}Ge=Ge.sibling}e:for(Ge=null,Xe=s;;){if(Xe.tag===5){if(Ge===null){Ge=Xe;try{x=Xe.stateNode,Le?(P=x.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none"):(ce=Xe.stateNode,ye=Xe.memoizedProps.style,V=ye!=null&&ye.hasOwnProperty("display")?ye.display:null,ce.style.display=Eo("display",V))}catch(Dt){er(s,s.return,Dt)}}}else if(Xe.tag===6){if(Ge===null)try{Xe.stateNode.nodeValue=Le?"":Xe.memoizedProps}catch(Dt){er(s,s.return,Dt)}}else if((Xe.tag!==22&&Xe.tag!==23||Xe.memoizedState===null||Xe===s)&&Xe.child!==null){Xe.child.return=Xe,Xe=Xe.child;continue}if(Xe===s)break e;for(;Xe.sibling===null;){if(Xe.return===null||Xe.return===s)break e;Ge===Xe&&(Ge=null),Xe=Xe.return}Ge===Xe&&(Ge=null),Xe.sibling.return=Xe.return,Xe=Xe.sibling}}break;case 19:Ti(l,s),ei(s),b&4&&Pf(s);break;case 21:break;default:Ti(l,s),ei(s)}}function ei(s){var l=s.flags;if(l&2){try{e:{for(var p=s.return;p!==null;){if(ly(p)){var b=p;break e}p=p.return}throw Error(n(160))}switch(b.tag){case 5:var x=b.stateNode;b.flags&32&&(xo(x,""),b.flags&=-33);var P=uy(s);Ff(s,P,x);break;case 3:case 4:var V=b.stateNode.containerInfo,ce=uy(s);Af(s,ce,V);break;default:throw Error(n(161))}}catch(ye){er(s,s.return,ye)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function cy(s,l,p){vt=s,Qi(s)}function Qi(s,l,p){for(var b=(s.mode&1)!==0;vt!==null;){var x=vt,P=x.child;if(x.tag===22&&b){var V=x.memoizedState!==null||Di;if(!V){var ce=x.alternate,ye=ce!==null&&ce.memoizedState!==null||Dn;ce=Di;var Le=Dn;if(Di=V,(Dn=ye)&&!Le)for(vt=x;vt!==null;)V=vt,ye=V.child,V.tag===22&&V.memoizedState!==null?Lp(x):ye!==null?(ye.return=V,vt=ye):Lp(x);for(;P!==null;)vt=P,Qi(P),P=P.sibling;vt=x,Di=ce,Dn=Le}$s(s)}else x.subtreeFlags&8772&&P!==null?(P.return=x,vt=P):$s(s)}}function $s(s){for(;vt!==null;){var l=vt;if(l.flags&8772){var p=l.alternate;try{if(l.flags&8772)switch(l.tag){case 0:case 11:case 15:Dn||ed(5,l);break;case 1:var b=l.stateNode;if(l.flags&4&&!Dn)if(p===null)b.componentDidMount();else{var x=l.elementType===l.type?p.memoizedProps:$i(l.type,p.memoizedProps);b.componentDidUpdate(x,p.memoizedState,b.__reactInternalSnapshotBeforeUpdate)}var P=l.updateQueue;P!==null&&zg(l,P,b);break;case 3:var V=l.updateQueue;if(V!==null){if(p=null,l.child!==null)switch(l.child.tag){case 5:p=l.child.stateNode;break;case 1:p=l.child.stateNode}zg(l,V,p)}break;case 5:var ce=l.stateNode;if(p===null&&l.flags&4){p=ce;var ye=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":ye.autoFocus&&p.focus();break;case"img":ye.src&&(p.src=ye.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var Le=l.alternate;if(Le!==null){var Ge=Le.memoizedState;if(Ge!==null){var Xe=Ge.dehydrated;Xe!==null&&an(Xe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Dn||l.flags&512&&Op(l)}catch(qe){er(l,l.return,qe)}}if(l===s){vt=null;break}if(p=l.sibling,p!==null){p.return=l.return,vt=p;break}vt=l.return}}function dy(s){for(;vt!==null;){var l=vt;if(l===s){vt=null;break}var p=l.sibling;if(p!==null){p.return=l.return,vt=p;break}vt=l.return}}function Lp(s){for(;vt!==null;){var l=vt;try{switch(l.tag){case 0:case 11:case 15:var p=l.return;try{ed(4,l)}catch(ye){er(l,p,ye)}break;case 1:var b=l.stateNode;if(typeof b.componentDidMount=="function"){var x=l.return;try{b.componentDidMount()}catch(ye){er(l,x,ye)}}var P=l.return;try{Op(l)}catch(ye){er(l,P,ye)}break;case 5:var V=l.return;try{Op(l)}catch(ye){er(l,V,ye)}}}catch(ye){er(l,l.return,ye)}if(l===s){vt=null;break}var ce=l.sibling;if(ce!==null){ce.return=l.return,vt=ce;break}vt=l.return}}var cw=Math.ceil,Of=j.ReactCurrentDispatcher,Rp=j.ReactCurrentOwner,Ii=j.ReactCurrentBatchConfig,fn=0,Ar=null,dr=null,zr=0,ti=0,Wu=Ao(0),Tr=0,Zu=null,qs=0,td=0,_p=0,nd=null,jo=null,jf=0,$u=1/0,is=null,Lf=!1,Bp=null,Gs=null,Rf=!1,Ir=null,_f=0,rd=0,Hp=null,od=-1,Bf=0;function Do(){return fn&6?Sn():od!==-1?od:od=Sn()}function Js(s){return s.mode&1?fn&2&&zr!==0?zr&-zr:Yg.transition!==null?(Bf===0&&(Bf=ae()),Bf):(s=ct,s!==0||(s=window.event,s=s===void 0?16:bc(s.type)),s):1}function Xi(s,l,p,b){if(50<rd)throw rd=0,Hp=null,Error(n(185));Te(s,p,b),(!(fn&2)||s!==Ar)&&(s===Ar&&(!(fn&2)&&(td|=p),Tr===4&&Ks(s,zr)),io(s,b),p===1&&fn===0&&!(l.mode&1)&&($u=Sn()+500,nf&&Rs()))}function io(s,l){var p=s.callbackNode;H(s,l);var b=Zo(s,s===Ar?zr:0);if(b===0)p!==null&&Dl(p),s.callbackNode=null,s.callbackPriority=0;else if(l=b&-b,s.callbackPriority!==l){if(p!=null&&Dl(p),l===1)s.tag===0?Pl(hy.bind(null,s)):_g(hy.bind(null,s)),Qd(function(){!(fn&6)&&Rs()}),p=null;else{switch(Nt(b)){case 1:p=vs;break;case 4:p=ws;break;case 16:p=Yi;break;case 536870912:p=ci;break;default:p=Yi}p=by(p,fy.bind(null,s))}s.callbackPriority=l,s.callbackNode=p}}function fy(s,l){if(od=-1,Bf=0,fn&6)throw Error(n(327));var p=s.callbackNode;if(Qs()&&s.callbackNode!==p)return null;var b=Zo(s,s===Ar?zr:0);if(b===0)return null;if(b&30||b&s.expiredLanes||l)l=Hf(s,b);else{l=b;var x=fn;fn|=2;var P=my();(Ar!==s||zr!==l)&&(is=null,$u=Sn()+500,zl(s,l));do try{hw();break}catch(ce){py(s,ce)}while(!0);_c(),Of.current=P,fn=x,dr!==null?l=0:(Ar=null,zr=0,l=Tr)}if(l!==0){if(l===2&&(x=J(s),x!==0&&(b=x,l=Yp(s,x))),l===1)throw p=Zu,zl(s,0),Ks(s,b),io(s,Sn()),p;if(l===6)Ks(s,b);else{if(x=s.current.alternate,!(b&30)&&!dw(x)&&(l=Hf(s,b),l===2&&(P=J(s),P!==0&&(b=P,l=Yp(s,P))),l===1))throw p=Zu,zl(s,0),Ks(s,b),io(s,Sn()),p;switch(s.finishedWork=x,s.finishedLanes=b,l){case 0:case 1:throw Error(n(345));case 2:Vl(s,jo,is);break;case 3:if(Ks(s,b),(b&130023424)===b&&(l=jf+500-Sn(),10<l)){if(Zo(s,0)!==0)break;if(x=s.suspendedLanes,(x&b)!==b){Do(),s.pingedLanes|=s.suspendedLanes&x;break}s.timeoutHandle=Ps(Vl.bind(null,s,jo,is),l);break}Vl(s,jo,is);break;case 4:if(Ks(s,b),(b&4194240)===b)break;for(l=s.eventTimes,x=-1;0<b;){var V=31-vr(b);P=1<<V,V=l[V],V>x&&(x=V),b&=~P}if(b=x,b=Sn()-b,b=(120>b?120:480>b?480:1080>b?1080:1920>b?1920:3e3>b?3e3:4320>b?4320:1960*cw(b/1960))-b,10<b){s.timeoutHandle=Ps(Vl.bind(null,s,jo,is),b);break}Vl(s,jo,is);break;case 5:Vl(s,jo,is);break;default:throw Error(n(329))}}}return io(s,Sn()),s.callbackNode===p?fy.bind(null,s):null}function Yp(s,l){var p=nd;return s.current.memoizedState.isDehydrated&&(zl(s,l).flags|=256),s=Hf(s,l),s!==2&&(l=jo,jo=p,l!==null&&Up(l)),s}function Up(s){jo===null?jo=s:jo.push.apply(jo,s)}function dw(s){for(var l=s;;){if(l.flags&16384){var p=l.updateQueue;if(p!==null&&(p=p.stores,p!==null))for(var b=0;b<p.length;b++){var x=p[b],P=x.getSnapshot;x=x.value;try{if(!Pe(P(),x))return!1}catch{return!1}}}if(p=l.child,l.subtreeFlags&16384&&p!==null)p.return=l,l=p;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Ks(s,l){for(l&=~_p,l&=~td,s.suspendedLanes|=l,s.pingedLanes&=~l,s=s.expirationTimes;0<l;){var p=31-vr(l),b=1<<p;s[p]=-1,l&=~b}}function hy(s){if(fn&6)throw Error(n(327));Qs();var l=Zo(s,0);if(!(l&1))return io(s,Sn()),null;var p=Hf(s,l);if(s.tag!==0&&p===2){var b=J(s);b!==0&&(l=b,p=Yp(s,b))}if(p===1)throw p=Zu,zl(s,0),Ks(s,l),io(s,Sn()),p;if(p===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=l,Vl(s,jo,is),io(s,Sn()),null}function zp(s,l){var p=fn;fn|=1;try{return s(l)}finally{fn=p,fn===0&&($u=Sn()+500,nf&&Rs())}}function Ul(s){Ir!==null&&Ir.tag===0&&!(fn&6)&&Qs();var l=fn;fn|=1;var p=Ii.transition,b=ct;try{if(Ii.transition=null,ct=1,s)return s()}finally{ct=b,Ii.transition=p,fn=l,!(fn&6)&&Rs()}}function Vp(){ti=Wu.current,Hn(Wu)}function zl(s,l){s.finishedWork=null,s.finishedLanes=0;var p=s.timeoutHandle;if(p!==-1&&(s.timeoutHandle=-1,jc(p)),dr!==null)for(p=dr.return;p!==null;){var b=p;switch(Ll(b),b.tag){case 1:b=b.type.childContextTypes,b!=null&&tf();break;case 3:Ou(),Hn(Fo),Hn(Kr),mp();break;case 5:pp(b);break;case 4:Ou();break;case 13:Hn(Un);break;case 19:Hn(Un);break;case 10:lf(b.type._context);break;case 22:case 23:Vp()}p=p.return}if(Ar=s,dr=s=Xs(s.current,null),zr=ti=l,Tr=0,Zu=null,_p=td=qs=0,jo=nd=null,Qo!==null){for(l=0;l<Qo.length;l++)if(p=Qo[l],b=p.interleaved,b!==null){p.interleaved=null;var x=b.next,P=p.pending;if(P!==null){var V=P.next;P.next=x,b.next=V}p.pending=b}Qo=null}return s}function py(s,l){do{var p=dr;try{if(_c(),ju.current=ns,mf){for(var b=Wn.memoizedState;b!==null;){var x=b.queue;x!==null&&(x.pending=null),b=b.next}mf=!1}if(Bl=0,br=Zn=Wn=null,Vc=!1,to=0,Rp.current=null,p===null||p.return===null){Tr=1,Zu=l,dr=null;break}e:{var P=s,V=p.return,ce=p,ye=l;if(l=zr,ce.flags|=32768,ye!==null&&typeof ye=="object"&&typeof ye.then=="function"){var Le=ye,Ge=ce,Xe=Ge.tag;if(!(Ge.mode&1)&&(Xe===0||Xe===11||Xe===15)){var qe=Ge.alternate;qe?(Ge.updateQueue=qe.updateQueue,Ge.memoizedState=qe.memoizedState,Ge.lanes=qe.lanes):(Ge.updateQueue=null,Ge.memoizedState=null)}var mt=xp(V);if(mt!==null){mt.flags&=-257,Gc(mt,V,ce,P,l),mt.mode&1&&Xg(P,Le,l),l=mt,ye=Le;var bt=l.updateQueue;if(bt===null){var Dt=new Set;Dt.add(ye),l.updateQueue=Dt}else bt.add(ye);break e}else{if(!(l&1)){Xg(P,Le,l),Wp();break e}ye=Error(n(426))}}else if(Yn&&ce.mode&1){var ir=xp(V);if(ir!==null){!(ir.flags&65536)&&(ir.flags|=256),Gc(ir,V,ce,P,l),Ta(Yl(ye,ce));break e}}P=ye=Yl(ye,ce),Tr!==4&&(Tr=2),nd===null?nd=[P]:nd.push(P),P=V;do{switch(P.tag){case 3:P.flags|=65536,l&=-l,P.lanes|=l;var Ee=Ef(P,ye,l);lp(P,Ee);break e;case 1:ce=ye;var we=P.type,Ce=P.stateNode;if(!(P.flags&128)&&(typeof we.getDerivedStateFromError=="function"||Ce!==null&&typeof Ce.componentDidCatch=="function"&&(Gs===null||!Gs.has(Ce)))){P.flags|=65536,l&=-l,P.lanes|=l;var it=qc(P,ce,l);lp(P,it);break e}}P=P.return}while(P!==null)}yy(p)}catch(xt){l=xt,dr===p&&p!==null&&(dr=p=p.return);continue}break}while(!0)}function my(){var s=Of.current;return Of.current=ns,s===null?ns:s}function Wp(){(Tr===0||Tr===3||Tr===2)&&(Tr=4),Ar===null||!(qs&268435455)&&!(td&268435455)||Ks(Ar,zr)}function Hf(s,l){var p=fn;fn|=2;var b=my();(Ar!==s||zr!==l)&&(is=null,zl(s,l));do try{fw();break}catch(x){py(s,x)}while(!0);if(_c(),fn=p,Of.current=b,dr!==null)throw Error(n(261));return Ar=null,zr=0,Tr}function fw(){for(;dr!==null;)gy(dr)}function hw(){for(;dr!==null&&!Ya();)gy(dr)}function gy(s){var l=wy(s.alternate,s,ti);s.memoizedProps=s.pendingProps,l===null?yy(s):dr=l,Rp.current=null}function yy(s){var l=s;do{var p=l.alternate;if(s=l.return,l.flags&32768){if(p=uw(p,l),p!==null){p.flags&=32767,dr=p;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{Tr=6,dr=null;return}}else if(p=lw(p,l,ti),p!==null){dr=p;return}if(l=l.sibling,l!==null){dr=l;return}dr=l=s}while(l!==null);Tr===0&&(Tr=5)}function Vl(s,l,p){var b=ct,x=Ii.transition;try{Ii.transition=null,ct=1,pw(s,l,p,b)}finally{Ii.transition=x,ct=b}return null}function pw(s,l,p,b){do Qs();while(Ir!==null);if(fn&6)throw Error(n(327));p=s.finishedWork;var x=s.finishedLanes;if(p===null)return null;if(s.finishedWork=null,s.finishedLanes=0,p===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var P=p.lanes|p.childLanes;if(Ue(s,P),s===Ar&&(dr=Ar=null,zr=0),!(p.subtreeFlags&2064)&&!(p.flags&2064)||Rf||(Rf=!0,by(Yi,function(){return Qs(),null})),P=(p.flags&15990)!==0,p.subtreeFlags&15990||P){P=Ii.transition,Ii.transition=null;var V=ct;ct=1;var ce=fn;fn|=4,Rp.current=null,Xc(s,p),jp(p,s),rw(Fl),qo=!!Pc,Fl=Pc=null,s.current=p,cy(p),du(),fn=ce,ct=V,Ii.transition=P}else s.current=p;if(Rf&&(Rf=!1,Ir=s,_f=x),P=s.pendingLanes,P===0&&(Gs=null),Ua(p.stateNode),io(s,Sn()),l!==null)for(b=s.onRecoverableError,p=0;p<l.length;p++)x=l[p],b(x.value,{componentStack:x.stack,digest:x.digest});if(Lf)throw Lf=!1,s=Bp,Bp=null,s;return _f&1&&s.tag!==0&&Qs(),P=s.pendingLanes,P&1?s===Hp?rd++:(rd=0,Hp=s):rd=0,Rs(),null}function Qs(){if(Ir!==null){var s=Nt(_f),l=Ii.transition,p=ct;try{if(Ii.transition=null,ct=16>s?16:s,Ir===null)var b=!1;else{if(s=Ir,Ir=null,_f=0,fn&6)throw Error(n(331));var x=fn;for(fn|=4,vt=s.current;vt!==null;){var P=vt,V=P.child;if(vt.flags&16){var ce=P.deletions;if(ce!==null){for(var ye=0;ye<ce.length;ye++){var Le=ce[ye];for(vt=Le;vt!==null;){var Ge=vt;switch(Ge.tag){case 0:case 11:case 15:zu(8,Ge,P)}var Xe=Ge.child;if(Xe!==null)Xe.return=Ge,vt=Xe;else for(;vt!==null;){Ge=vt;var qe=Ge.sibling,mt=Ge.return;if(sy(Ge),Ge===Le){vt=null;break}if(qe!==null){qe.return=mt,vt=qe;break}vt=mt}}}var bt=P.alternate;if(bt!==null){var Dt=bt.child;if(Dt!==null){bt.child=null;do{var ir=Dt.sibling;Dt.sibling=null,Dt=ir}while(Dt!==null)}}vt=P}}if(P.subtreeFlags&2064&&V!==null)V.return=P,vt=V;else e:for(;vt!==null;){if(P=vt,P.flags&2048)switch(P.tag){case 0:case 11:case 15:zu(9,P,P.return)}var Ee=P.sibling;if(Ee!==null){Ee.return=P.return,vt=Ee;break e}vt=P.return}}var we=s.current;for(vt=we;vt!==null;){V=vt;var Ce=V.child;if(V.subtreeFlags&2064&&Ce!==null)Ce.return=V,vt=Ce;else e:for(V=we;vt!==null;){if(ce=vt,ce.flags&2048)try{switch(ce.tag){case 0:case 11:case 15:ed(9,ce)}}catch(xt){er(ce,ce.return,xt)}if(ce===V){vt=null;break e}var it=ce.sibling;if(it!==null){it.return=ce.return,vt=it;break e}vt=ce.return}}if(fn=x,Rs(),po&&typeof po.onPostCommitFiberRoot=="function")try{po.onPostCommitFiberRoot(Vo,s)}catch{}b=!0}return b}finally{ct=p,Ii.transition=l}}return!1}function Zp(s,l,p){l=Yl(p,l),l=Ef(s,l,1),s=Hs(s,l,1),l=Do(),s!==null&&(Te(s,1,l),io(s,l))}function er(s,l,p){if(s.tag===3)Zp(s,s,p);else for(;l!==null;){if(l.tag===3){Zp(l,s,p);break}else if(l.tag===1){var b=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof b.componentDidCatch=="function"&&(Gs===null||!Gs.has(b))){s=Yl(p,s),s=qc(l,s,1),l=Hs(l,s,1),s=Do(),l!==null&&(Te(l,1,s),io(l,s));break}}l=l.return}}function mw(s,l,p){var b=s.pingCache;b!==null&&b.delete(l),l=Do(),s.pingedLanes|=s.suspendedLanes&p,Ar===s&&(zr&p)===p&&(Tr===4||Tr===3&&(zr&130023424)===zr&&500>Sn()-jf?zl(s,0):_p|=p),io(s,l)}function vy(s,l){l===0&&(s.mode&1?(l=za,za<<=1,!(za&130023424)&&(za=4194304)):l=1);var p=Do();s=qi(s,l),s!==null&&(Te(s,l,p),io(s,p))}function gw(s){var l=s.memoizedState,p=0;l!==null&&(p=l.retryLane),vy(s,p)}function yw(s,l){var p=0;switch(s.tag){case 13:var b=s.stateNode,x=s.memoizedState;x!==null&&(p=x.retryLane);break;case 19:b=s.stateNode;break;default:throw Error(n(314))}b!==null&&b.delete(l),vy(s,p)}var wy;wy=function(s,l,p){if(s!==null)if(s.memoizedProps!==l.pendingProps||Fo.current)no=!0;else{if(!(s.lanes&p)&&!(l.flags&128))return no=!1,ro(s,l,p);no=!!(s.flags&131072)}else no=!1,Yn&&l.flags&1048576&&Bg(l,of,l.index);switch(l.lanes=0,l.tag){case 2:var b=l.type;Yu(s,l),s=l.pendingProps;var x=Nu(l,Kr.current);_s(l,p),x=gf(null,l,b,s,x,p);var P=yf();return l.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,Po(b)?(P=!0,vi(l)):P=!1,l.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,sp(l),x.updater=df,l.stateNode=x,x._reactInternals=l,dp(l,b,s,p),l=kp(null,l,b,!0,P,p)):(l.tag=0,Yn&&P&&Lc(l),So(null,l,x,p),l=l.child),l;case 16:b=l.elementType;e:{switch(Yu(s,l),s=l.pendingProps,x=b._init,b=x(b._payload),l.type=b,x=l.tag=Yf(b),s=$i(b,s),x){case 0:l=Cf(null,l,b,s,p);break e;case 1:l=ny(null,l,b,s,p);break e;case 11:l=Ep(null,l,b,s,p);break e;case 14:l=Ia(null,l,b,$i(b.type,s),p);break e}throw Error(n(306,b,""))}return l;case 0:return b=l.type,x=l.pendingProps,x=l.elementType===b?x:$i(b,x),Cf(s,l,b,x,p);case 1:return b=l.type,x=l.pendingProps,x=l.elementType===b?x:$i(b,x),ny(s,l,b,x,p);case 3:e:{if(xa(l),s===null)throw Error(n(387));b=l.pendingProps,P=l.memoizedState,x=P.element,Ug(s,l),cf(l,b,null,p);var V=l.memoizedState;if(b=V.element,P.isDehydrated)if(P={element:b,isDehydrated:!1,cache:V.cache,pendingSuspenseBoundaries:V.pendingSuspenseBoundaries,transitions:V.transitions},l.updateQueue.baseState=P,l.memoizedState=P,l.flags&256){x=Yl(Error(n(423)),l),l=Mf(s,l,b,p,x);break e}else if(b!==x){x=Yl(Error(n(424)),l),l=Mf(s,l,b,p,x);break e}else for(Ko=Os(l.stateNode.containerInfo.firstChild),Xr=l,Yn=!0,Zi=null,p=fp(l,null,b,p),l.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling;else{if(Da(),b===x){l=Ea(s,l,p);break e}So(s,l,b,p)}l=l.child}return l;case 5:return hp(l),s===null&&Oo(l),b=l.type,x=l.pendingProps,P=s!==null?s.memoizedProps:null,V=x.children,Oc(b,x)?V=null:P!==null&&Oc(b,P)&&(l.flags|=32),ty(s,l),So(s,l,V,p),l.child;case 6:return s===null&&Oo(l),null;case 13:return Qc(s,l,p);case 4:return pf(l,l.stateNode.containerInfo),b=l.pendingProps,s===null?l.child=Us(l,null,b,p):So(s,l,b,p),l.child;case 11:return b=l.type,x=l.pendingProps,x=l.elementType===b?x:$i(b,x),Ep(s,l,b,x,p);case 7:return So(s,l,l.pendingProps,p),l.child;case 8:return So(s,l,l.pendingProps.children,p),l.child;case 12:return So(s,l,l.pendingProps.children,p),l.child;case 10:e:{if(b=l.type._context,x=l.pendingProps,P=l.memoizedProps,V=x.value,Ln(Rl,b._currentValue),b._currentValue=V,P!==null)if(Pe(P.value,V)){if(P.children===x.children&&!Fo.current){l=Ea(s,l,p);break e}}else for(P=l.child,P!==null&&(P.return=l);P!==null;){var ce=P.dependencies;if(ce!==null){V=P.child;for(var ye=ce.firstContext;ye!==null;){if(ye.context===b){if(P.tag===1){ye=Gi(-1,p&-p),ye.tag=2;var Le=P.updateQueue;if(Le!==null){Le=Le.shared;var Ge=Le.pending;Ge===null?ye.next=ye:(ye.next=Ge.next,Ge.next=ye),Le.pending=ye}}P.lanes|=p,ye=P.alternate,ye!==null&&(ye.lanes|=p),Si(P.return,p,l),ce.lanes|=p;break}ye=ye.next}}else if(P.tag===10)V=P.type===l.type?null:P.child;else if(P.tag===18){if(V=P.return,V===null)throw Error(n(341));V.lanes|=p,ce=V.alternate,ce!==null&&(ce.lanes|=p),Si(V,p,l),V=P.sibling}else V=P.child;if(V!==null)V.return=P;else for(V=P;V!==null;){if(V===l){V=null;break}if(P=V.sibling,P!==null){P.return=V.return,V=P;break}V=V.return}P=V}So(s,l,x.children,p),l=l.child}return l;case 9:return x=l.type,b=l.pendingProps.children,_s(l,p),x=wo(x),b=b(x),l.flags|=1,So(s,l,b,p),l.child;case 14:return b=l.type,x=$i(b,l.pendingProps),x=$i(b.type,x),Ia(s,l,b,x,p);case 15:return Cp(s,l,l.type,l.pendingProps,p);case 17:return b=l.type,x=l.pendingProps,x=l.elementType===b?x:$i(b,x),Yu(s,l),l.tag=1,Po(b)?(s=!0,vi(l)):s=!1,_s(l,p),cp(l,b,x),dp(l,b,x,p),kp(null,l,b,!0,s,p);case 19:return ry(s,l,p);case 22:return Mp(s,l,p)}throw Error(n(156,l.tag))};function by(s,l){return Ha(s,l)}function vw(s,l,p,b){this.tag=s,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=b,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ni(s,l,p,b){return new vw(s,l,p,b)}function $p(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Yf(s){if(typeof s=="function")return $p(s)?1:0;if(s!=null){if(s=s.$$typeof,s===Q)return 11;if(s===le)return 14}return 2}function Xs(s,l){var p=s.alternate;return p===null?(p=ni(s.tag,l,s.key,s.mode),p.elementType=s.elementType,p.type=s.type,p.stateNode=s.stateNode,p.alternate=s,s.alternate=p):(p.pendingProps=l,p.type=s.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=s.flags&14680064,p.childLanes=s.childLanes,p.lanes=s.lanes,p.child=s.child,p.memoizedProps=s.memoizedProps,p.memoizedState=s.memoizedState,p.updateQueue=s.updateQueue,l=s.dependencies,p.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},p.sibling=s.sibling,p.index=s.index,p.ref=s.ref,p}function Uf(s,l,p,b,x,P){var V=2;if(b=s,typeof s=="function")$p(s)&&(V=1);else if(typeof s=="string")V=5;else e:switch(s){case Z:return Wl(p.children,x,P,l);case U:V=8,x|=8;break;case z:return s=ni(12,p,l,x|2),s.elementType=z,s.lanes=P,s;case ue:return s=ni(13,p,l,x),s.elementType=ue,s.lanes=P,s;case ee:return s=ni(19,p,l,x),s.elementType=ee,s.lanes=P,s;case de:return zf(p,x,P,l);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case $:V=10;break e;case te:V=9;break e;case Q:V=11;break e;case le:V=14;break e;case W:V=16,b=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return l=ni(V,p,l,x),l.elementType=s,l.type=b,l.lanes=P,l}function Wl(s,l,p,b){return s=ni(7,s,b,l),s.lanes=p,s}function zf(s,l,p,b){return s=ni(22,s,b,l),s.elementType=de,s.lanes=p,s.stateNode={isHidden:!1},s}function qp(s,l,p){return s=ni(6,s,null,l),s.lanes=p,s}function Gp(s,l,p){return l=ni(4,s.children!==null?s.children:[],s.key,l),l.lanes=p,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}function ww(s,l,p,b,x){this.tag=l,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ke(0),this.expirationTimes=ke(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ke(0),this.identifierPrefix=b,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function Jp(s,l,p,b,x,P,V,ce,ye){return s=new ww(s,l,p,ce,ye),l===1?(l=1,P===!0&&(l|=8)):l=0,P=ni(3,null,null,l),s.current=P,P.stateNode=s,P.memoizedState={element:b,isDehydrated:p,cache:null,transitions:null,pendingSuspenseBoundaries:null},sp(P),s}function bw(s,l,p){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:b==null?null:""+b,children:s,containerInfo:l,implementation:p}}function Sy(s){if(!s)return Ls;s=s._reactInternals;e:{if(Bi(s)!==s||s.tag!==1)throw Error(n(170));var l=s;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(Po(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(n(171))}if(s.tag===1){var p=s.type;if(Po(p))return Lg(s,p,l)}return l}function Dy(s,l,p,b,x,P,V,ce,ye){return s=Jp(p,b,!0,s,x,P,V,ce,ye),s.context=Sy(null),p=s.current,b=Do(),x=Js(p),P=Gi(b,x),P.callback=l??null,Hs(p,P,x),s.current.lanes=x,Te(s,x,b),io(s,b),s}function Vf(s,l,p,b){var x=l.current,P=Do(),V=Js(x);return p=Sy(p),l.context===null?l.context=p:l.pendingContext=p,l=Gi(P,V),l.payload={element:s},b=b===void 0?null:b,b!==null&&(l.callback=b),s=Hs(x,l,V),s!==null&&(Xi(s,x,V,P),Ys(s,x,V)),V}function Wf(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function Ty(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var p=s.retryLane;s.retryLane=p!==0&&p<l?p:l}}function Kp(s,l){Ty(s,l),(s=s.alternate)&&Ty(s,l)}function Sw(){return null}var Qp=typeof reportError=="function"?reportError:function(s){console.error(s)};function Zf(s){this._internalRoot=s}$f.prototype.render=Zf.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));Vf(s,l,null,null)},$f.prototype.unmount=Zf.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;Ul(function(){Vf(null,s,null,null)}),l[Jo]=null}};function $f(s){this._internalRoot=s}$f.prototype.unstable_scheduleHydration=function(s){if(s){var l=mo();s={blockedOn:null,target:s,priority:l};for(var p=0;p<ha.length&&l!==0&&l<ha[p].priority;p++);ha.splice(p,0,s),p===0&&fi(s)}};function Xp(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function qf(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function Iy(){}function Gf(s,l,p,b,x){if(x){if(typeof b=="function"){var P=b;b=function(){var Le=Wf(V);P.call(Le)}}var V=Dy(l,b,s,0,null,!1,!1,"",Iy);return s._reactRootContainer=V,s[Jo]=V.current,Fs(s.nodeType===8?s.parentNode:s),Ul(),V}for(;x=s.lastChild;)s.removeChild(x);if(typeof b=="function"){var ce=b;b=function(){var Le=Wf(ye);ce.call(Le)}}var ye=Jp(s,0,!1,null,null,!1,!1,"",Iy);return s._reactRootContainer=ye,s[Jo]=ye.current,Fs(s.nodeType===8?s.parentNode:s),Ul(function(){Vf(l,ye,p,b)}),ye}function Jf(s,l,p,b,x){var P=p._reactRootContainer;if(P){var V=P;if(typeof x=="function"){var ce=x;x=function(){var ye=Wf(V);ce.call(ye)}}Vf(l,V,s,x)}else V=Gf(p,l,s,x,b);return Wf(V)}Yt=function(s){switch(s.tag){case 3:var l=s.stateNode;if(l.current.memoizedState.isDehydrated){var p=Ui(l.pendingLanes);p!==0&&(ot(l,p|1),io(l,Sn()),!(fn&6)&&($u=Sn()+500,Rs()))}break;case 13:Ul(function(){var b=qi(s,1);if(b!==null){var x=Do();Xi(b,s,1,x)}}),Kp(s,1)}},Tn=function(s){if(s.tag===13){var l=qi(s,134217728);if(l!==null){var p=Do();Xi(l,s,134217728,p)}Kp(s,134217728)}},Co=function(s){if(s.tag===13){var l=Js(s),p=qi(s,l);if(p!==null){var b=Do();Xi(p,s,l,b)}Kp(s,l)}},mo=function(){return ct},Br=function(s,l){var p=ct;try{return ct=s,l()}finally{ct=p}},Ae=function(s,l,p){switch(l){case"input":if(Tt(s,p),l=p.name,p.type==="radio"&&l!=null){for(p=s;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<p.length;l++){var b=p[l];if(b!==s&&b.form===s.form){var x=ef(b);if(!x)throw Error(n(90));Re(b),Tt(b,x)}}}break;case"textarea":Qn(s,p);break;case"select":l=p.value,l!=null&&Gt(s,!!p.multiple,l,!1)}},en=zp,jn=Ul;var Dw={usingClientEntryPoint:!1,Events:[Jr,Jt,ef,nt,kt,zp]},id={findFiberByHostInstance:va,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Tw={bundleType:id.bundleType,version:id.version,rendererPackageName:id.rendererPackageName,rendererConfig:id.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:j.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Ba(s),s===null?null:s.stateNode},findFiberByHostInstance:id.findFiberByHostInstance||Sw,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Kf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kf.isDisabled&&Kf.supportsFiber)try{Vo=Kf.inject(Tw),po=Kf}catch{}}return Mi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Dw,Mi.createPortal=function(s,l){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xp(l))throw Error(n(200));return bw(s,l,null,p)},Mi.createRoot=function(s,l){if(!Xp(s))throw Error(n(299));var p=!1,b="",x=Qp;return l!=null&&(l.unstable_strictMode===!0&&(p=!0),l.identifierPrefix!==void 0&&(b=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),l=Jp(s,1,!1,null,null,p,!1,b,x),s[Jo]=l.current,Fs(s.nodeType===8?s.parentNode:s),new Zf(l)},Mi.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=Ba(l),s=s===null?null:s.stateNode,s},Mi.flushSync=function(s){return Ul(s)},Mi.hydrate=function(s,l,p){if(!qf(l))throw Error(n(200));return Jf(null,s,l,!0,p)},Mi.hydrateRoot=function(s,l,p){if(!Xp(s))throw Error(n(405));var b=p!=null&&p.hydratedSources||null,x=!1,P="",V=Qp;if(p!=null&&(p.unstable_strictMode===!0&&(x=!0),p.identifierPrefix!==void 0&&(P=p.identifierPrefix),p.onRecoverableError!==void 0&&(V=p.onRecoverableError)),l=Dy(l,null,s,1,p??null,x,!1,P,V),s[Jo]=l.current,Fs(s),b)for(s=0;s<b.length;s++)p=b[s],x=p._getVersion,x=x(p._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[p,x]:l.mutableSourceEagerHydrationData.push(p,x);return new $f(l)},Mi.render=function(s,l,p){if(!qf(l))throw Error(n(200));return Jf(null,s,l,!1,p)},Mi.unmountComponentAtNode=function(s){if(!qf(s))throw Error(n(40));return s._reactRootContainer?(Ul(function(){Jf(null,null,s,!1,function(){s._reactRootContainer=null,s[Jo]=null})}),!0):!1},Mi.unstable_batchedUpdates=zp,Mi.unstable_renderSubtreeIntoContainer=function(s,l,p,b){if(!qf(p))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return Jf(s,l,p,!1,b)},Mi.version="18.2.0-next-9e3b772b8-20220608",Mi}function HE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(HE)}catch(e){console.error(e)}}HE();BE.exports=WF();var s0=BE.exports;const Z1=$r(s0);var sg,YE=s0;sg=Pa.createRoot=YE.createRoot;Pa.hydrateRoot=YE.hydrateRoot;const ZF=e=>{const{children:t,className:n,clickSpaceDestroy:r,destroy:o}=e,i=()=>{r&&o()},a=u=>{(u.key==="Escape"||(u.ctrlKey||u.metaKey)&&u.key.toLowerCase()==="w")&&o()};return y.jsx("div",{className:`dialog-wrapper ${n}`,onClick:i,onKeyDown:u=>a(u),children:y.jsx("div",{className:"dialog-container",onClick:u=>u.stopPropagation(),children:t})})};function l0(e,t,n){const r=document.createElement("div");document.body.append(r),setTimeout(()=>{var d;(d=r.firstElementChild)==null||d.classList.add("showup")},0);const o={destroy:()=>{var d,f;(d=r.firstElementChild)==null||d.classList.remove("showup"),(f=r.firstElementChild)==null||f.classList.add("showoff"),setTimeout(()=>{r.detach(),u.unmount(),document.body.find(".domtoimage-thino")&&document.body.findAll(".domtoimage-thino").forEach(g=>{g.detach()})},Ex)}},i={...n,destroy:o.destroy};let a=y.jsx(ZF,{destroy:o.destroy,clickSpaceDestroy:!0,...e,children:y.jsx(t,{...i})});a=y.jsx(Ra,{store:_e,context:Ot,children:a});const u=Pa.createRoot(r);return u.render(a),o}const $F=e=>{const{shownStatus:t,setShownStatus:n}=e,{dailyNotesState:{app:r,settings:o,plugin:i},globalState:{manifest:a}}=F.useContext(Ot),u=F.useRef(null);F.useEffect(()=>{if(t){const D=T=>{var I;(I=u.current)!=null&&I.contains(T.target)||T.stopPropagation(),n(!1)};window.addEventListener("click",D,{capture:!0,once:!0})}},[t]);const d=F.useCallback(async D=>{const{type:T}=D;if(T.startsWith("text"))try{return`${await W1.parseHtml(D)}`}catch(I){new C.Notice(I)}},[]),f=F.useCallback(()=>{const D=document.createElement("input");document.body.appendChild(D),D.type="file",D.multiple=!1,D.accept="text/html",D.onchange=async()=>{if(!D.files||D.files.length===0)return;const T=D.files[0];await d(T),document.body.removeChild(D)},D.click()},[]),m=()=>{r.setting.open(),r.setting.openTabById(a.id||"obsidian-memos")},g=()=>{if(o!=null&&o.needVerify){dt.setLocked(!0);return}else new C.Notice(E("You have not set a password or enable this feature yet")),r.setting.open(),r.setting.openTabById(a.id||"obsidian-memos")},v=()=>{new QS(r,a.version).open()},w=()=>{dt.setShowSiderbarInMobileView(!1),i.settingTab.updateSettings("FirstLoaded",!0)};return y.jsxs("div",{className:`menu-btns-popup ${t?"":"hidden"}`,ref:u,children:[y.jsxs("div",{className:"btn action-btn",onClick:m,children:[y.jsx("span",{ref:D=>{D&&C.setIcon(D,"user")},className:"icon"}),E("Settings")]}),(o==null?void 0:o.needVerify)&&y.jsxs("div",{className:"btn action-btn",onClick:g,children:[y.jsx("span",{ref:D=>{D&&C.setIcon(D,"lock")},className:"icon"}),E("Lock")]}),y.jsxs("div",{className:"btn action-btn",onClick:f,children:[y.jsx("span",{ref:D=>{D&&C.setIcon(D,"import")},className:"icon"}),E("Import")]}),y.jsxs("div",{className:"btn action-btn",onClick:v,children:[y.jsx("span",{ref:D=>{D&&C.setIcon(D,"file-text")},className:"icon"}),E("ChangeLog")]}),y.jsxs("div",{className:"btn action-btn",onClick:w,children:[y.jsx("span",{ref:D=>{D&&C.setIcon(D,"file-text")},className:"icon"}),E("Setting guide")]})]})};function UE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=UE(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Kn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=UE(e))&&(r&&(r+=" "),r+=t);return r}const qF=e=>{const t={};return e.forEach(n=>{const r=ut.getDateString(n.createdAt);t[r]?t[r]++:t[r]=1}),Object.keys(t).sort((n,r)=>t[r]-t[n])[0]},GF=e=>{const t={};return e.forEach(n=>{const r=ut.getTimeString(n.createdAt).split(":")[0];t[r]?t[r]++:t[r]=1}),Object.keys(t).sort((n,r)=>t[r]-t[n])[0]},$1=({statusType:e})=>{const{memoState:{memos:t,tags:n},locationState:{pathname:r},dailyNotesState:{settings:o,app:i}}=F.useContext(Ot),[a,u]=F.useState(0),[d,f]=F.useState(0),[m,g]=F.useState(0),[v,w]=F.useState(null),[D,T]=F.useState(!1),I=se.useRef(null),[k,A]=F.useState(0),[R,j]=F.useState(0),[B,L]=F.useState(0),[Z,U]=F.useState(""),[z,$]=F.useState(""),[te,Q]=F.useState(!1),[ue,ee]=F.useState(null);F.useEffect(()=>{const oe=t.filter(he=>!he.deletedAt&&he.rowStatus!=="ARCHIVED");L(oe.filter(he=>{var K;return(K=he.thinoType)==null?void 0:K.startsWith("TASK")}).length),U(qF(t)),$(GF(t))},[t]),F.useLayoutEffect(()=>{if(!i)return;const{tags:oe,memos:he,days:K}=JF(i);g(oe),u(he),f(K)},[i]),F.useEffect(()=>{let oe=0;const he=a-k,K=1e3,re=pe=>{oe||(oe=pe);const Ie=pe-oe;if(Ie<K){const Oe=Ie/K;A(k+he*Oe),requestAnimationFrame(re)}else A(a)};requestAnimationFrame(re)},[a]),F.useEffect(()=>{let oe=0;const he=d-R,K=1e3,re=pe=>{oe||(oe=pe);const Ie=pe-oe;if(Ie<K){const Oe=Ie/K;j(R+he*Oe),requestAnimationFrame(re)}else j(d)};requestAnimationFrame(re)},[d]),F.useEffect(()=>{!o||!i||(T(a>9999||m>999||d>999),KF({tags:m,memos:a,days:d},i))},[a,m,d]),F.useEffect(()=>{je.initialized&&t&&r==="/"&&(g(n.length),u(t.filter(oe=>!(oe.deletedAt!==""&&oe.deletedAt)).length),w(t.length>0?t[t.length-1]:null))},[n,t,r]),F.useEffect(()=>{if(!je.initialized)return;if(!v){f(0);return}if(!I.current||!(v!=null&&v.createdAt))return;C.requireApiVersion("1.4.4")&&C.setTooltip(I.current,E("Started from")+" "+ut.getDateTimeString((v==null?void 0:v.createdAt)??""));const oe=Math.ceil((Date.now()-ut.getTimeStampByDate(v==null?void 0:v.createdAt))/1e3/3600/24);f(t?oe:0)},[v]);const le=(oe,he)=>{if(te&&he===ue){st.setMemoFilter(""),Q(!1);return}const K=tn.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([oe]));tn.pushQuery(K),st.setMemoFilter(K.id),Q(!0),ee(he)},W=()=>{le({type:"LIST",value:{operator:"IS_NOT",value:"LIST"},relation:"AND"},"LIST")},de=()=>{le({type:"TYPE",value:{operator:"IS_NOT",value:"NOT_TAGGED"},relation:"AND"},"TYPE")};return y.jsx("div",{className:Kn("status-text-container",D?"text-overflow":"",e),children:e==="banner"?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"status-text memos-text",children:[y.jsx("span",{className:"amount-text",children:Math.round(k)}),y.jsx("span",{className:"type-text",children:"THINO"})]}),y.jsxs("div",{className:"status-text tags-text",children:[y.jsx("span",{className:"amount-text",children:m}),y.jsx("span",{className:"type-text",children:E("TAG")})]}),y.jsxs("div",{ref:I,className:"status-text duration-text",onClick:()=>{dt.setShowSiderbarInMobileView(!1),st.setPathname("/daily")},children:[y.jsx("span",{className:"amount-text",children:Math.round(R)??0}),y.jsx("span",{className:"type-text",children:E("DAY")})]})]}):y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"status-sidebar-header title-text",children:y.jsx("span",{className:"normal-text",children:E("Thino status")})}),y.jsxs("div",{className:"status-sidebar-wrapper",children:[y.jsxs("div",{className:"status-text memos-text",children:[y.jsx("span",{className:"type-text",children:E("Thino amount")}),y.jsx("span",{className:"amount-text",children:Math.round(k)})]}),y.jsxs("div",{className:"status-text memos-text",onClick:W,children:[y.jsx("span",{className:"type-text",children:E("Task amount")}),y.jsx("span",{className:"amount-text",children:Math.round(B)??0})]}),y.jsxs("div",{className:"status-text tags-text",onClick:de,children:[y.jsx("span",{className:"type-text",children:E("Used tags")}),y.jsx("span",{className:"amount-text",children:m})]}),y.jsxs("div",{ref:I,className:"status-text duration-text",onClick:()=>{dt.setShowSiderbarInMobileView(!1),st.setPathname("/daily")},children:[y.jsx("span",{className:"type-text",children:E("Used days")}),y.jsx("span",{className:"amount-text",children:Math.round(R)??0})]}),y.jsxs("div",{className:"status-text most-active-day-text",onClick:()=>{const oe=C.moment(Z,"YYYY/MM/DD").startOf("day").valueOf(),he=C.moment(Z,"YYYY/MM/DD").endOf("day").valueOf();st.setFromAndToQuery(oe,he)},children:[y.jsx("span",{className:"type-text",children:E("Most active day")}),y.jsx("span",{className:"amount-text",children:Z})]}),y.jsxs("div",{className:"status-text most-active-hour-text",children:[y.jsx("span",{className:"type-text",children:E("Most active hour")}),y.jsx("span",{className:"amount-text",children:z})]})]})]})})};function zE(e){return`userBannerCache:${e}`}function JF(e){try{const t=zE(e==null?void 0:e.appId),n=Wr.get([t])[t];return n?JSON.parse(n):{tags:0,memos:0,days:0}}catch(t){return console.error(t),{tags:0,memos:0,days:0}}}function KF({tags:e,memos:t,days:n},r){try{const o={tags:e,memos:t,days:n},i=zE(r==null?void 0:r.appId);Wr.set({[i]:JSON.stringify(o)})}catch(o){console.error(o)}}const QF=[{text:E("AND"),value:"AND"},{text:E("OR"),value:"OR"}],ec={TAG:{value:"TAG",text:E("TAG"),operators:[{text:E("INCLUDE"),value:"CONTAIN"},{text:E("EXCLUDE"),value:"NOT_CONTAIN"}]},TYPE:{value:"TYPE",text:E("TYPE"),operators:[{value:"IS",text:E("IS")},{value:"IS_NOT",text:E("ISNOT")}],values:[{value:"CONNECTED",text:E("LINKED")},{value:"NOT_TAGGED",text:E("NO TAGS")},{value:"LINKED",text:E("HAS LINKS")},{value:"IMAGED",text:E("HAS IMAGES")}]},TEXT:{value:"TEXT",text:E("TEXT"),operators:[{value:"CONTAIN",text:E("INCLUDE")},{value:"NOT_CONTAIN",text:E("EXCLUDE")}]},DATE:{value:"DATE",text:E("DATE"),operators:[{value:"NOT_CONTAIN",text:E("BEFORE")},{value:"CONTAIN",text:E("AFTER")}]},LIST:{value:"LIST",text:E("LIST"),operators:[{value:"IS",text:E("IS")},{value:"IS_NOT",text:E("ISNOT")}],values:[{value:"TODO",text:E("TODO")},{value:"DONE",text:E("DONE")},{value:"LIST",text:E("JOURNAL")},{value:"OTHER",text:E("OTHER")}]},SOURCE:{value:"SOURCE",text:E("SOURCE"),operators:[{value:"IS",text:E("IS")},{value:"IS_NOT",text:E("ISNOT")}],values:[{value:"DAILY",text:E("DAILY")},{value:"MULTI",text:E("MULTI")},{value:"FILE",text:E("FILE")},{value:"CANVAS",text:E("CANVAS")}]}},Vb=ec.TYPE.values,XF=e=>{for(const t of Vb)if(t.value===e)return t.text;return""},sT=()=>({type:"TAG",value:{operator:"CONTAIN",value:""},relation:"AND"}),jh=(e,t)=>{let n=!0;for(const r of t){const{relation:o}=r,i=e5(e,r);o==="OR"?n=n||i:n=n&&i}return n},e5=(e,t)=>{const{type:n,value:{operator:r,value:o}}=t;if(o==="")return!0;let i=!0;if(n==="TAG"){let a=!0;const u=new Set;for(const d of Array.from(e.content.match(gr)||[])){const m=d.replace(gr,"$1").trim().split("/");let g="";for(const v of m)g+=v,u.add(g),g+="/"}for(const d of Array.from(e.content.match(jr)||[])){const m=d.replace(jr,"$1").trim().split("/");let g="";for(const v of m)g+=v,u.add(g),g+="/"}u.has(o)||(a=!1),r==="NOT_CONTAIN"&&(a=!a),i=a}else if(n==="TYPE"){let a=!1;(o==="NOT_TAGGED"&&e.content.match(gr)===null&&e.content.match(so)===null||o==="LINKED"&&e.content.match(Od)!==null||o==="IMAGED"&&e.content.match(jd)!==null||o==="CONNECTED"&&e.content.match(hc)!==null)&&(a=!0),r==="IS_NOT"&&(a=!a),i=a}else if(n==="TEXT"){let a=e.content.toLowerCase().includes(o.toLowerCase());r==="NOT_CONTAIN"&&(a=!a),i=a}else if(n==="LIST"){let u=(e.thinoType==="JOURNAL"?"LIST":e.thinoType==="TASK-TODO"?"TODO":e.thinoType==="TASK-DONE"?"DONE":"OTHER").contains(o);r==="IS_NOT"&&(u=!u),i=u}else if(n==="SOURCE"){let a=e.sourceType===o;r==="IS_NOT"&&(a=!a),i=a}else if(n==="DATE"){const a=C.moment(o,"YYYY-MM-DD").isValid();let u,d;if(a)u=C.moment(o,"YYYY-MM-DD"),d=u.isBefore(C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"),"day");else{const m=(app.plugins.enabledPlugins.has("nldates-obsidian")&&app.plugins.getPlugin("nldates-obsidian")).parseDate(o);m.date!==null&&(d=m.moment.isBefore(C.moment(e.createdAt),"day"))}r==="NOT_CONTAIN"&&(d=!d),i=d}return i=e.linkId===""?i:!1,i};function ml(e){const[t,n]=F.useState(()=>!!e),r=F.useCallback(o=>{n(typeof o=="boolean"?o:i=>!i)},[]);return[t,r]}const lg=()=>{const{dailyNotesState:{app:e,view:t},locationState:{query:{type:n}}}=F.useContext(Ot),r=se.useRef(null),o=se.useRef(null),[i,a]=ml(!1);F.useEffect(()=>{!r||!t||!e||(t.registerEvent(e.workspace.on("blur-on-memos",()=>{var g;(g=r.current)==null||g.blur()})),t.registerEvent(e.workspace.on("focus-on-searchBar",()=>{var g;(g=r.current)==null||g.focus()})))},[r,e,t]),F.useEffect(()=>{o&&C.setIcon(o.current,"search")},[o]);const u=g=>{const{type:v}=st.getState().query;g===v&&(g=""),st.setMemoTypeQuery(g)},d=g=>{const v=g.currentTarget.value;if(!v.contains(" -time: ")){st.setTextQuery(v);return}const w=v.split(" -time: ")[1],D=w.length>10?w.match(/\d{4}-\d{2}-\d{2}/g):null;if(D==null){st.setTextQuery(v.split(" -time: ")[0]);return}if(D.length===1){const T=C.moment(D[0]);st.setTimeQuery({from:T.startOf("day").valueOf(),to:T.endOf("day").valueOf()})}else if(D.length===2){const T=C.moment(D[0]),I=C.moment(D[1]);st.setTimeQuery({from:T.startOf("day").valueOf(),to:I.endOf("day").valueOf()})}st.setTextQuery(v.split(" -time: ")[0])},f=()=>{a(!0)},m=()=>{a(!1)};return y.jsxs("div",{className:"search-bar-container",children:[y.jsxs("div",{className:"search-bar-inputer",children:[y.jsx("span",{ref:o,className:"btn icon-img"}),y.jsx("input",{ref:r,className:"text-input",type:"text",onMouseOver:f,onMouseOut:m,placeholder:i?E("Type here"):"",onChange:d})]}),y.jsx("div",{className:"quickly-action-wrapper",children:y.jsxs("div",{className:"quickly-action-container",children:[y.jsx("span",{className:"title-text",children:E("Quick filter")}),y.jsxs("div",{className:"section-container types-container",children:[y.jsxs("span",{className:"section-text",children:[E("TYPE"),":"]}),y.jsx("div",{className:"values-container",children:Vb.map((g,v)=>y.jsxs("div",{children:[y.jsx("span",{className:`type-item ${n===g.value?"selected":""}`,onClick:()=>{u(g.value)},children:g.text}),v+1<Vb.length?y.jsx("span",{className:"split-text",children:"/"}):null]},g.value))})]})]})})]})},t5=e=>{const{children:t,when:n}=e;return n?y.jsx(y.Fragment,{children:t}):null},Aa=t5;function Fn(){const e=document.createDocumentFragment();e.createEl("div",{cls:"thino-info"}).createEl("div",{text:E("This is a pro feature, please upgrade to pro version to use it.")});const r=e.createEl("div",{cls:"thino-link"}).createEl("div",{text:E("You can get pro version from: ")}),o=localStorage.getItem("language");let i="https://pkmer.cn/products/UserProfile/";o&&o==="zh"?i="https://pkmer.cn/products/thino/":i="https://thino.pkmer.net/en/",r.createEl("a",{text:"PKMer",attr:{href:i}}),new C.Notice(e,5e3)}const{exec:n5,execSync:jre}=C.Platform.isDesktop&&require("child_process"),{createHash:r5}=C.Platform.isDesktop&&require("crypto"),o5={native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"},i5=C.Platform.isDesktop&&{darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:`${o5[a5()]}\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`,linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"};function a5(){return process.platform!=="win32"?"":process.arch==="ia32"&&Object.hasOwnProperty.call(process.env,"PROCESSOR_ARCHITEW6432")?"mixed":"native"}function s5(e){return r5("sha256").update(e).digest("hex")}function l5(e){switch(process.platform){case"darwin":return e.split("IOPlatformUUID")[1].split(`
|
|
|
`)[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return e.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":return e.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"freebsd":return e.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw new Error(`Unsupported platform: ${process.platform}`)}}function Jn(e=!1){return new Promise((t,n)=>{n5(i5[process.platform],{},(r,o)=>{if(r)return n(new Error(`Error while obtaining machine id: ${r.stack}`));const i=l5(o.toString());return t(e?i:s5(i))})})}const lT={list:"align-left",waterfall:"layout-grid",calendar:"calendar",minimal:"list",table:"table",chat:"message-square",moments:"chrome"},u5=e=>{const{dailyNotesState:{app:t,view:n,verifyState:r,settings:o},globalState:{manifest:i,isMobileView:a}}=F.useContext(Ot),u=F.useRef(null),d=F.useRef(null),[f,m]=F.useState((window.app||t).loadLocalStorage("thinoListView")),[g,v]=F.useState(null);F.useEffect(()=>{if(!i||!t)return;const D=t==null?void 0:t.plugins.getPlugin(i.id);v(D),m(D==null?void 0:D.settings.MemoListView),dt.setMemoListView(D==null?void 0:D.settings.MemoListView)},[i,t]),F.useEffect(()=>{if(!t||!n||!g||!g.settings)return;const D=()=>{var I;if(n.leaf.height===0)return;const T=(I=g==null?void 0:g.settings)==null?void 0:I.MemoListView;T==="chat"||T==="moments"||(n.leaf.width>950?(m(T),dt.setMemoListView(T)):n.leaf.width<=950&&(dt.setMemoListView("list"),m("list")))};D(),d.current||(d.current=t.workspace.on("resize",D),n.registerEvent(d.current))},[t,n,g]),F.useEffect(()=>{u&&(C.setIcon(u.current,lT[f||"list"]),dt.setMemoListView(f),C.requireApiVersion("1.4.4")&&C.setTooltip(u.current,E("Switch view")))},[f]);const w=async D=>{var j;const T=!C.Platform.isDesktop&&await((j=window.Capacitor)==null?void 0:j.Plugins.Device.getId()),I=C.Platform.isDesktop?await Jn():T.identifier||T.uuid;if(!r||(r==null?void 0:r.appId)!==I){Fn();return}const k=async B=>{dt.setMemoListView(B),g&&(g.settings.MemoListView=B,await g.saveSettings()),m(B)},A=[{view:"list",title:E("List")},{view:"chat",title:E("Chat")},{view:"moments",title:E("Moments")}];a||A.push({view:"waterfall",title:E("Waterfall")},{view:"calendar",title:E("Calendar")},{view:"table",title:E("Table")});const R=new C.Menu;A.forEach(({view:B,title:L})=>{R.addItem(Z=>{Z.setChecked(f===B).setIcon(lT[B]).setTitle(L).onClick(()=>{f!==B&&k(B)})})}),R.showAtMouseEvent(D.nativeEvent)};return y.jsx("div",{className:`memos-view-switcher-wrapper ${e.className?e.className:""} pro`,ref:u,onClick:w})},c5=()=>{const e=F.useRef(null);return F.useEffect(()=>{e&&(C.setIcon(e.current,"calendar-check"),C.setTooltip&&C.setTooltip(e.current,E("Daily Memos")))},[e]),y.jsx("div",{className:"memos-review-entry-wrapper",ref:e,onClick:()=>{st.setPathname("/daily")}})},Gw=()=>({type:"initialText",value:"",timestamp:Date.now(),selectionStart:0,selectionEnd:0}),uT={initialValue:"",interval:300};class d5{constructor(t,n=uT){this.listeners=[],this.runUndo=()=>{const r=this.actions[this.currentIndex].selectionStart;this.currentIndex>0&&this.currentIndex--,this.element.value=this.actions[this.currentIndex].value,this.element.setSelectionRange(r,r),this.dispatchChange()},this.runRedo=()=>{this.currentIndex<this.actions.length-1&&this.currentIndex++;const r=this.actions[this.currentIndex].selectionEnd;this.element.value=this.actions[this.currentIndex].value,this.element.setSelectionRange(r,r),this.dispatchChange()},this.getActions=()=>this.actions,this.setState=(r,o)=>{this.actions=[...r],this.currentIndex=o<this.actions.length?o:this.actions.length-1,this.dispatchChange()},this.resetState=()=>{this.actions=[Gw()],this.currentIndex=0,this.dispatchChange()},this.destroy=()=>{this.rmEventListeners()},this.subscribe=r=>{this.listeners.push(r)},this.handleElementKeydown=r=>{const o=r;o.key==="z"&&!o.shiftKey&&(o.metaKey||o.ctrlKey)?(r.preventDefault(),this.runUndo()):(o.key==="z"&&o.shiftKey&&(o.metaKey||o.ctrlKey)||o.key==="y"&&(o.metaKey||o.ctrlKey))&&(r.preventDefault(),this.runRedo())},this.handleElementInput=r=>{const o=r,i=this.actions[this.currentIndex];this.pushNewAction({type:o.inputType,value:this.element.value,timestamp:Date.now(),selectionStart:this.element.selectionEnd-(this.element.value.length-i.value.length),selectionEnd:this.element.selectionEnd})},this.addEventListeners=()=>{this.element.addEventListener("keydown",this.handleElementKeydown),this.element.addEventListener("input",this.handleElementInput)},this.rmEventListeners=()=>{this.element.removeEventListener("keydown",this.handleElementKeydown),this.element.removeEventListener("input",this.handleElementInput)},this.pushNewAction=r=>{const o=this.actions[this.currentIndex];o&&o.type===r.type&&r.timestamp-o.timestamp<this.config.interval?this.actions[this.currentIndex]=Object.assign(Object.assign({},o),{value:r.value,selectionEnd:r.selectionEnd,timestamp:r.timestamp}):(this.config.maxSize&&this.currentIndex>=this.config.maxSize?(this.actions.shift(),this.actions[0]=Gw()):this.currentIndex++,this.actions[this.currentIndex]=r,this.actions=this.actions.slice(0,this.currentIndex+1)),this.dispatchChange()},this.dispatchChange=()=>{for(const r of this.listeners)r([...this.actions],this.currentIndex)},this.element=t,this.config=Object.assign(Object.assign({},uT),n),this.config.initialActions&&this.config.initialActions.length>0?(this.actions=this.config.initialActions,this.config.initialIndex!==void 0&&this.config.initialIndex<this.actions.length?this.currentIndex=this.config.initialIndex:this.currentIndex=this.actions.length-1):(this.actions=[Gw()],this.currentIndex=0,this.config.initialValue!==""&&(this.actions.push({type:"insertText",value:this.config.initialValue,timestamp:Date.now(),selectionStart:0,selectionEnd:this.config.initialValue.length}),this.currentIndex++)),this.element.value=this.actions[this.currentIndex].value,this.addEventListeners()}}function f5(){const[,e]=F.useState(!1);return F.useCallback(()=>{e(n=>!n)},[])}var VE={exports:{}};(function(e){(function(){var t=["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"],n=typeof window<"u",r=n&&window.mozInnerScreenX!=null;function o(i,a,u){if(!n)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var d=u&&u.debug||!1;if(d){var f=document.querySelector("#input-textarea-caret-position-mirror-div");f&&f.parentNode.removeChild(f)}var m=document.createElement("div");m.id="input-textarea-caret-position-mirror-div",document.body.appendChild(m);var g=m.style,v=window.getComputedStyle?getComputedStyle(i):i.currentStyle;g.whiteSpace="pre-wrap",i.nodeName!=="INPUT"&&(g.wordWrap="break-word"),g.position="absolute",d||(g.visibility="hidden"),t.forEach(function(T){g[T]=v[T]}),r?i.scrollHeight>parseInt(v.height)&&(g.overflowY="scroll"):g.overflow="hidden",m.textContent=i.value.substring(0,a),i.nodeName==="INPUT"&&(m.textContent=m.textContent.replace(/\s/g," "));var w=document.createElement("span");w.textContent=i.value.substring(a)||".",m.appendChild(w);var D={top:w.offsetTop+parseInt(v.borderTopWidth),left:w.offsetLeft+parseInt(v.borderLeftWidth)};return d?w.style.backgroundColor="#aaa":document.body.removeChild(m),D}e.exports=o})()})(VE);var h5=VE.exports;const p5=$r(h5);var WE=Vr.CustomEvent;function m5(){try{var e=new WE("cat",{detail:{foo:"bar"}});return e.type==="cat"&&e.detail.foo==="bar"}catch{}return!1}var g5=m5()?WE:typeof document<"u"&&typeof document.createEvent=="function"?function(t,n){var r=document.createEvent("CustomEvent");return n?r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail):r.initCustomEvent(t,!1,!1,void 0),r}:function(t,n){var r=document.createEventObject();return r.type=t,n?(r.bubbles=!!n.bubbles,r.cancelable=!!n.cancelable,r.detail=n.detail):(r.bubbles=!1,r.cancelable=!1,r.detail=void 0),r};const y5=$r(g5);function v5(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){v5(e,o,n[o])})}return e}function ug(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u0(e,t,n){return t&&cT(e.prototype,t),n&&cT(e,n),e}function dh(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dh=function(n){return typeof n}:dh=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},dh(e)}function iv(e){return typeof Symbol=="function"&&dh(Symbol.iterator)==="symbol"?iv=function(n){return dh(n)}:iv=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":dh(n)},iv(e)}function b5(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c0(e,t){return t&&(iv(t)==="object"||typeof t=="function")?t:b5(e)}function mh(e){return mh=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},mh(e)}function Wb(e,t){return Wb=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},Wb(e,t)}function d0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wb(e,t)}function S5(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function D5(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function T5(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function I5(e){return S5(e)||D5(e)||T5()}var oa={ESC:27,UP:38,DOWN:40,LEFT:37,RIGHT:39,ENTER:13,TAB:9},x5=function e(){var t=this;ug(this,e),this.startListen=function(n){n&&n.addEventListener("keydown",t.f)},this.stopListen=function(n){n&&n.removeEventListener("keydown",t.f)},this.add=function(n,r){var o=n;return typeof o!="object"&&(o=[o]),t.listeners[t.index]={keyCode:o,fn:r},t.index++},this.remove=function(n){delete t.listeners[n]},this.removeAll=function(){t.listeners={},t.index=1},this.index=1,this.listeners={},this.f=function(n){if(n){var r=n.keyCode||n.which;Object.values(t.listeners).forEach(function(o){var i=o.keyCode,a=o.fn;i.includes(r)&&(n.stopPropagation(),n.preventDefault(),a(n))})}}},yd=new x5,E5=function(e){d0(t,e);function t(){var n,r;ug(this,t);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=c0(this,(n=mh(t)).call.apply(n,[this].concat(i))),r.selectItem=function(){var u=r.props,d=u.item,f=u.onSelectHandler;f(d)},r}return u0(t,[{key:"shouldComponentUpdate",value:function(r){return this.props.item!==r.item||this.props.selected!==r.selected||this.props.style!==r.style||this.props.className!==r.className}},{key:"render",value:function(){var r=this,o=this.props,i=o.component,a=o.style,u=o.onClickHandler,d=o.item,f=o.selected,m=o.className,g=o.innerRef;return se.createElement("li",{className:"rta__item ".concat(f===!0?"rta__item--selected":""," ").concat(m||""),style:a},se.createElement("div",{className:"rta__entity ".concat(f===!0?"rta__entity--selected":""),role:"button",tabIndex:0,onClick:u,onFocus:this.selectItem,onMouseEnter:this.selectItem,onTouchStart:function(){r.clicked=!0,r.selectItem()},onTouchEnd:function(w){w.preventDefault(),r.clicked&&u(w)},onTouchMove:function(){r.clicked=!1},onTouchCancel:function(){r.clicked=!1},ref:g},se.createElement(i,{selected:f,entity:d})))}}]),t}(se.Component),C5=function(e){d0(t,e);function t(){var n,r;ug(this,t);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=c0(this,(n=mh(t)).call.apply(n,[this].concat(i))),r.state={selectedItem:null},r.cachedIdOfItems=new Map,r.onPressEnter=function(u){typeof u<"u"&&u.preventDefault();var d=r.props.values;r.modifyText(d[r.getPositionInList()])},r.getPositionInList=function(){var u=r.props.values,d=r.state.selectedItem;return d?u.findIndex(function(f){return r.getId(f)===r.getId(d)}):0},r.getId=function(u){if(r.cachedIdOfItems.has(u))return r.cachedIdOfItems.get(u);var d=r.props.getTextToReplace(u),f=function(){if(d){if(d.key)return d.key;if(typeof u=="string"||!u.key)return d.text}if(!u.key)throw new Error("Item ".concat(JSON.stringify(u),' has to have defined "key" property'));return u.key},m=f();return r.cachedIdOfItems.set(u,m),m},r.listeners=[],r.itemsRef={},r.modifyText=function(u){if(u){var d=r.props.onSelect;d(u)}},r.selectItem=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,f=r.props.onItemHighlighted;r.state.selectedItem!==u&&r.setState({selectedItem:u},function(){f(u),d&&r.props.dropdownScroll(r.itemsRef[r.getId(u)])})},r.scroll=function(u){u.preventDefault();var d=r.props.values,f=u.keyCode||u.which,m=r.getPositionInList(),g;switch(f){case oa.DOWN:g=m+1;break;case oa.UP:g=m-1;break;default:g=m;break}g=(g%d.length+d.length)%d.length,r.selectItem(d[g],[oa.DOWN,oa.UP].includes(f))},r.isSelected=function(u){var d=r.state.selectedItem;return d?r.getId(d)===r.getId(u):!1},r}return u0(t,[{key:"componentDidMount",value:function(){this.listeners.push(yd.add([oa.DOWN,oa.UP],this.scroll),yd.add([oa.ENTER,oa.TAB],this.onPressEnter));var r=this.props.values;r&&r[0]&&this.selectItem(r[0])}},{key:"componentDidUpdate",value:function(r){var o=this,i=r.values,a=this.props.values,u=i.map(function(f){return o.getId(f)}).join(""),d=a.map(function(f){return o.getId(f)}).join("");u!==d&&a&&a[0]&&this.selectItem(a[0])}},{key:"componentWillUnmount",value:function(){for(var r;this.listeners.length;)r=this.listeners.pop(),yd.remove(r)}},{key:"render",value:function(){var r=this,o=this.props,i=o.values,a=o.component,u=o.style,d=o.itemClassName,f=o.className,m=o.itemStyle;return se.createElement("ul",{className:"rta__list ".concat(f||""),style:u},i.map(function(g){return se.createElement(E5,{key:r.getId(g),innerRef:function(w){r.itemsRef[r.getId(g)]=w},selected:r.isSelected(g),item:g,className:d,style:m,onClickHandler:r.onPressEnter,onSelectHandler:r.selectItem,component:a})}))}}]),t}(se.Component);function M5(e,t){var n=parseInt(getComputedStyle(t).getPropertyValue("height"),10),r=parseInt(getComputedStyle(e).getPropertyValue("height"),10)-n,o=t.offsetTop,i=e.scrollTop;o<i+r&&i<o||(e.scrollTop=o)}var dT="next",Ku={X:{LEFT:"rta__autocomplete--left",RIGHT:"rta__autocomplete--right"},Y:{TOP:"rta__autocomplete--top",BOTTOM:"rta__autocomplete--bottom"}},fT=function(t){return console.error("RTA: dataProvider fails: ".concat(t,`
|
|
|
|
|
|
Check the documentation or create issue if you think it's bug. https://github.com/webscopeio/react-textarea-autocomplete/issues`))},k5=[".","^","$","*","+","-","?","(",")","[","]","{","}","\\","|"],Oy=function(t){return I5(t).map(function(n){return k5.includes(n)?"\\".concat(n):n}).join("")},N5=function(e){d0(t,e);function t(){return ug(this,t),c0(this,mh(t).apply(this,arguments))}return u0(t,[{key:"componentDidMount",value:function(){var r=this.props.boundariesElement;if(typeof r=="string"){var o=document.querySelector(r);if(!o)throw new Error("RTA: Invalid prop boundariesElement: it has to be string or HTMLElement.");this.containerElem=o}else if(r instanceof HTMLElement)this.containerElem=r;else throw new Error("RTA: Invalid prop boundariesElement: it has to be string or HTMLElement.");if(!this.containerElem||!this.containerElem.contains(this.ref))throw new Error("RTA: Invalid prop boundariesElement: it has to be one of the parents of the RTA.")}},{key:"componentDidUpdate",value:function(){var r,o,i=this.props.top||0,a=this.props.left||0,u=[],d=[],f=0,m=0,g=this.containerElem.getBoundingClientRect(),v=this.ref.getBoundingClientRect(),w=this.props.textareaRef.getBoundingClientRect(),D=window.getComputedStyle(this.ref),T=parseInt(D.getPropertyValue("margin-top"),10),I=parseInt(D.getPropertyValue("margin-bottom"),10),k=parseInt(D.getPropertyValue("margin-left"),10),A=parseInt(D.getPropertyValue("margin-right"),10),R=T+I+w.top+i+v.height,j=k+A+w.left+a+v.width;j>g.right&&w.left+a>v.width?(m=a-v.width,u.push(Ku.X.LEFT),d.push(Ku.X.RIGHT)):(m=a,u.push(Ku.X.RIGHT),d.push(Ku.X.LEFT)),R>g.bottom&&w.top+i>v.height?(f=i-v.height,u.push(Ku.Y.TOP),d.push(Ku.Y.BOTTOM)):(f=i,u.push(Ku.Y.BOTTOM),d.push(Ku.Y.TOP)),this.props.renderToBody&&(f+=w.top,m+=w.left),this.ref.style.top="".concat(f,"px"),this.ref.style.left="".concat(m,"px"),(r=this.ref.classList).remove.apply(r,d),(o=this.ref.classList).add.apply(o,u)}},{key:"render",value:function(){var r=this,o=this.props,i=o.style,a=o.className,u=o.innerRef,d=o.children,f=o.renderToBody,m=document.body,g=se.createElement("div",{ref:function(w){r.ref=w,u(w)},className:"rta__autocomplete ".concat(a||""),style:i},d);return f&&m!==null?Z1.createPortal(g,m):g}}]),t}(se.Component),ZE=function(e){d0(t,e);function t(n){var r;ug(this,t),r=c0(this,mh(t).call(this,n)),r.state={top:null,left:null,currentTrigger:null,actualToken:"",data:null,value:"",dataLoading:!1,selectionEnd:0,component:null,textToReplace:null},r.escListenerInit=function(){r.escListener||(r.escListener=yd.add(oa.ESC,r._closeAutocomplete))},r.escListenerDestroy=function(){r.escListener&&(yd.remove(r.escListener),r.escListener=null)},r.getSelectionPosition=function(){return r.textareaRef?{selectionStart:r.textareaRef.selectionStart,selectionEnd:r.textareaRef.selectionEnd}:null},r.getSelectedText=function(){if(!r.textareaRef)return null;var d=r.textareaRef,f=d.selectionStart,m=d.selectionEnd;return f===m?null:r.state.value.substr(f,m-f)},r.setCaretPosition=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;r.textareaRef&&(r.textareaRef.focus(),r.textareaRef.setSelectionRange(d,d))},r.getCaretPosition=function(){if(!r.textareaRef)return 0;var d=r.textareaRef.selectionEnd;return d},r._handleCaretChange=function(d){var f=function(){var v=r.getCaretPosition()-1;r.lastTrigger=r.lastTrigger?v:0};if(d.type==="keydown"){var m=d.keyCode||d.which;switch(m){case oa.UP:case oa.DOWN:r._isAutocompleteOpen()||f();break;case oa.LEFT:case oa.RIGHT:f();break}return}f()},r._onSelect=function(d){var f=r.state,m=f.selectionEnd,g=f.currentTrigger,v=f.value,w=r.props.onItemSelected;if(g){var D=r._getTextToReplace(g);if(!D){r._closeAutocomplete();return}var T=D(d);if(!T){r._closeAutocomplete();return}w&&w({currentTrigger:g,item:d});var I=function($,te,Q){switch($){case"start":return Q;case"next":case"end":return Q+te.length;default:if(!Number.isInteger($))throw new Error('RTA: caretPosition should be "start", "next", "end" or number.');return $}},k=v.slice(0,m),A=Oy(g),R=k.length-k.lastIndexOf(g),j=k.search(new RegExp("(?!".concat(A,")$")))-R,B=T.caretPosition==="next"?"".concat(T.text," "):T.text,L=I(T.caretPosition,B,j),Z=k.substring(0,j)+B,U=v.replace(k,Z);r.setState({value:U,dataLoading:!1},function(){var z=r.tokenRegExpEnding.exec(B),$=z?z[0].length:1;r.lastTrigger=L&&L-$,r.textareaRef.value=U,r.textareaRef.selectionEnd=L,r._changeHandler();var te=r.textareaRef.scrollTop;r.setCaretPosition(L),window.chrome&&(r.textareaRef.scrollTop=te)})}},r._getTextToReplace=function(d){var f=r.props.trigger[d];if(!d||!f)return null;var m=f.output;return function(g){if(typeof g=="object"&&(!m||typeof m!="function"))throw new Error('Output functor is not defined! If you are using items as object you have to define "output" function. https://github.com/webscopeio/react-textarea-autocomplete#trigger-type');if(m){var v=m(g,d);if(v===void 0||typeof v=="number")throw new Error(`Output functor should return string or object in shape {text: string, caretPosition: string | number}.
|
|
|
Got "`.concat(String(v),'". Check the implementation for trigger "').concat(d,`"
|
|
|
|
|
|
See https://github.com/webscopeio/react-textarea-autocomplete#trigger-type for more information.
|
|
|
`));if(v===null)return null;if(typeof v=="string")return{text:v,caretPosition:dT};if(!v.text&&typeof v.text!="string")throw new Error('Output "text" is not defined! Object should has shape {text: string, caretPosition: string | number}. Check the implementation for trigger "'.concat(d,`"
|
|
|
`));if(!v.caretPosition)throw new Error('Output "caretPosition" is not defined! Object should has shape {text: string, caretPosition: string | number}. Check the implementation for trigger "'.concat(d,`"
|
|
|
`));return v}if(typeof g!="string")throw new Error(`Output item should be string
|
|
|
`);return{text:"".concat(d).concat(g).concat(d),caretPosition:dT}}},r._getCurrentTriggerSettings=function(){var d=r.state.currentTrigger;return d?r.props.trigger[d]:null},r._getValuesFromProvider=function(){var d=r.state,f=d.currentTrigger,m=d.actualToken,g=r._getCurrentTriggerSettings();if(!(!f||!g)){var v=g.dataProvider,w=g.component;if(typeof v!="function")throw new Error("Trigger provider has to be a function!");r.setState({dataLoading:!0});var D=v(m);D instanceof Promise||(D=Promise.resolve(D)),D.then(function(T){if(!Array.isArray(T))throw new Error("Trigger provider has to provide an array!");if(typeof w!="function")throw new Error("Component should be defined!");if(f===r.state.currentTrigger){if(!T.length){r._closeAutocomplete();return}r.setState({dataLoading:!1,data:T,component:w})}}).catch(function(T){return fT(T.message)})}},r._getSuggestions=function(){var d=r.state,f=d.currentTrigger,m=d.data;return!f||!m||m&&!m.length?null:m},r._createRegExp=function(){var d=r.props.trigger;r.tokenRegExp=new RegExp("(".concat(Object.keys(d).sort(function(f,m){return f<m?1:f>m?-1:0}).map(function(f){return Oy(f)}).join("|"),")((?:(?!\\1)[^\\s])*$)")),r.tokenRegExpEnding=new RegExp("(".concat(Object.keys(d).sort(function(f,m){return f<m?1:f>m?-1:0}).map(function(f){return Oy(f)}).join("|"),")$"))},r._closeAutocomplete=function(){var d=r.state.currentTrigger;r.escListenerDestroy(),r.setState({data:null,dataLoading:!1,currentTrigger:null},function(){d&&r._onItemHighlightedHandler(null)})},r._cleanUpProps=function(){var d=w5({},r.props),f=["loadingComponent","boundariesElement","containerStyle","minChar","scrollToItem","ref","innerRef","onChange","onCaretPositionChange","className","value","trigger","listStyle","itemStyle","containerStyle","loaderStyle","className","containerClassName","listClassName","itemClassName","loaderClassName","dropdownStyle","dropdownClassName","movePopupAsYouType","textAreaComponent","renderToBody","onItemSelected","onItemHighlighted"];for(var m in d)f.includes(m)&&delete d[m];return d},r._changeHandler=function(d){var f=r.props,m=f.trigger,g=f.onChange,v=f.minChar,w=f.onCaretPositionChange,D=f.movePopupAsYouType,T=r.state,I=T.top,k=T.left,A=d;A||(A=new y5("change",{bubbles:!0}),r.textareaRef.dispatchEvent(A));var R=A.target||r.textareaRef,j=R.selectionEnd,B=R.value;if(r.lastValueBubbledEvent=B,g&&A&&(A.persist&&A.persist(),g(new Proxy(A,{get:function(K,re,pe){return re==="target"?R:Reflect.get(K,re,pe)}}))),w){var L=r.getCaretPosition();w(L)}r.setState({value:B});var Z=function(){var K=p5(R,j),re=K.top,pe=K.left;r.setState({top:re-r.textareaRef.scrollTop||0,left:pe})},U=function(K){r.lastTrigger=j-K,r._closeAutocomplete(),Z()};if(j<=r.lastTrigger){var z=B.slice(0,j),$=r.tokenRegExp.exec(z);U($?$[0].length:0)}var te=B.slice(r.lastTrigger,j),Q=r.tokenRegExp.exec(te),ue=Q&&Q[0],ee=Q&&Q[1]||null,le=ee?ee.length-1:0,W=r.tokenRegExpEnding.exec(te);if(W?U(W[0].length):r._isAutocompleteOpen()||r._closeAutocomplete(),(!ue||ue.length<=v+le)&&(r.state.currentTrigger&&!m[r.state.currentTrigger].allowWhitespace||!r.state.currentTrigger)){r._closeAutocomplete();return}if(ee&&m[ee].afterWhitespace&&!/\s/.test(B[j-ue.length-1])&&B[j-ue.length-1]!==void 0){r._closeAutocomplete();return}if(r.state.currentTrigger&&m[r.state.currentTrigger].allowWhitespace){if(Q=new RegExp("".concat(Oy(r.state.currentTrigger),".*$")).exec(B.slice(0,j)),ue=Q&&Q[0],!ue){r._closeAutocomplete();return}ee=Object.keys(m).find(function(he){return he.slice(0,le+1)===ue.slice(0,le+1)})||null}var de=ue.slice(1);if(ee){(D||I===null&&k===null||r.state.currentTrigger!==ee)&&Z(),r.escListenerInit();var oe=r._getTextToReplace(ee);r.setState({selectionEnd:j,currentTrigger:ee,textToReplace:oe,actualToken:de},function(){try{r._getValuesFromProvider()}catch(he){fT(he.message)}})}},r._selectHandler=function(d){var f=r.props,m=f.onCaretPositionChange,g=f.onSelect;if(m){var v=r.getCaretPosition();m(v)}g&&(d.persist(),g(d))},r._shouldStayOpen=function(d){var f=d.relatedTarget;return f===null&&(f=document.activeElement),!!(r.dropdownRef&&f instanceof Node&&r.dropdownRef.contains(f))},r._onClick=function(d){var f=r.props.onClick;f&&(d.persist(),f(d)),!r._shouldStayOpen(d)&&r._closeAutocomplete()},r._onBlur=function(d){var f=r.props.onBlur;f&&(d.persist(),f(d)),!r._shouldStayOpen(d)&&r._closeAutocomplete()},r._onScrollHandler=function(){r._closeAutocomplete()},r._onItemHighlightedHandler=function(d){var f=r.props.onItemHighlighted,m=r.state.currentTrigger;if(f)if(typeof f=="function")f({currentTrigger:m,item:d});else throw new Error("`onItemHighlighted` has to be a function")},r._dropdownScroll=function(d){var f=r.props.scrollToItem;if(f){if(f===!0){M5(r.dropdownRef,d);return}if(typeof f!="function"||f.length!==2)throw new Error("`scrollToItem` has to be boolean (true for default implementation) or function with two parameters: container, item.");f(r.dropdownRef,d)}},r._isAutocompleteOpen=function(){var d=r.state,f=d.dataLoading,m=d.currentTrigger,g=r._getSuggestions();return!!((f||g)&&m)},r._textareaRef=function(d){r.props.innerRef&&r.props.innerRef(d),r.textareaRef=d},r.lastTrigger=0,r.escListener=null;var o=r.props,i=o.loadingComponent,a=o.trigger,u=o.value;if(u&&(r.state.value=u),r._createRegExp(),!i)throw new Error("RTA: loadingComponent is not defined");if(!a)throw new Error("RTA: trigger is not defined");return r}return u0(t,[{key:"componentDidMount",value:function(){yd.startListen(this.textareaRef),this.textareaRef&&this.textareaRef.addEventListener("focus",this._handleCaretChange),this.textareaRef&&this.textareaRef.addEventListener("click",this._handleCaretChange),this.textareaRef&&this.textareaRef.addEventListener("keydown",this._handleCaretChange)}},{key:"componentDidUpdate",value:function(r){var o=r.trigger,i=r.value,a=this.props,u=a.trigger,d=a.value;Object.keys(u).join("")!==Object.keys(o).join("")&&this._createRegExp(),i!==d&&this.lastValueBubbledEvent!==d&&(this.lastTrigger=0,this._changeHandler())}},{key:"componentWillUnmount",value:function(){this.escListenerDestroy(),yd.stopListen(this.textareaRef),this.textareaRef&&this.textareaRef.removeEventListener("focus",this._handleCaretChange),this.textareaRef&&this.textareaRef.removeEventListener("click",this._handleCaretChange),this.textareaRef&&this.textareaRef.removeEventListener("keydown",this._handleCaretChange)}},{key:"render",value:function(){var r=this,o=this.props,i=o.loadingComponent,a=o.style,u=o.className,d=o.listStyle,f=o.itemStyle,m=o.boundariesElement,g=o.movePopupAsYouType,v=o.listClassName,w=o.itemClassName,D=o.dropdownClassName,T=o.dropdownStyle,I=o.containerStyle,k=o.containerClassName,A=o.loaderStyle,R=o.loaderClassName,j=o.textAreaComponent,B=o.renderToBody,L=this.state,Z=L.left,U=L.top,z=L.dataLoading,$=L.component,te=L.value,Q=L.textToReplace,ue=this._isAutocompleteOpen(),ee=this._getSuggestions(),le={},W;return j.component?(W=j.component,le[j.ref]=this._textareaRef):(W=j,le.ref=this._textareaRef),se.createElement("div",{className:"rta ".concat(z===!0?"rta--loading":""," ").concat(k||""),style:I},se.createElement(W,Object.assign({},this._cleanUpProps(),{className:"rta__textarea ".concat(u||""),onChange:this._changeHandler,onSelect:this._selectHandler,onScroll:this._onScrollHandler,onClick:this._onClick,onBlur:this._onBlur,value:te,style:a},le)),ue&&se.createElement(N5,{innerRef:function(oe){r.dropdownRef=oe},top:U,left:Z,style:T,className:D,movePopupAsYouType:g,boundariesElement:m,textareaRef:this.textareaRef,renderToBody:B},ee&&$&&Q&&se.createElement(C5,{values:ee,component:$,style:d,className:v,itemClassName:w,itemStyle:f,getTextToReplace:Q,onItemHighlighted:this._onItemHighlightedHandler,onSelect:this._onSelect,dropdownScroll:this._dropdownScroll}),z&&se.createElement("div",{className:"rta__loader ".concat(ee!==null?"rta__loader--suggestion-data":"rta__loader--empty-suggestion-data"," ").concat(R||""),style:A},se.createElement(i,{data:ee}))))}}],[{key:"getDerivedStateFromProps",value:function(r){var o=r.value;return o==null?null:{value:o}}}]),t}(se.Component);ZE.defaultProps={movePopupAsYouType:!1,value:null,minChar:1,boundariesElement:"body",scrollToItem:!0,textAreaComponent:"textarea",renderToBody:!1};const A5=()=>{const{app:e}=yt.getState(),t=e.metadataCache.getTags();return[...Object.keys(t)].map(n=>n.split("#").pop())},F5=e=>{let t=[];const n=yt.getState().settings;if(n&&(n!=null&&n.UseVaultTags))t=A5();else{const{tags:i}=je.getState();t=i}const r=e.toLowerCase(),o=[];return t.forEach(i=>{i&&i.toLowerCase().contains(r)&&o.push({name:i,char:i})}),o},P5=e=>{const{app:t}=yt.getState(),n=t.vault.getAllLoadedFiles(),r=[];let o;return n.forEach(i=>{e==="["?o="":e.contains("[")&&(o=e.slice(1));const a=o.toLowerCase();i instanceof C.TFile&&["md","png","jpg","canvas","jpeg","gif"].contains(i.extension)&&i.path.toLowerCase().contains(a)&&r.push({name:i.basename,char:i.name,file:i})}),r};var Jw=F,O5=function(e){return typeof e=="function"},j5=function(e){var t=Jw.useState(e),n=t[0],r=t[1],o=Jw.useRef(n),i=Jw.useCallback(function(a){o.current=O5(a)?a(o.current):a,r(o.current)},[]);return[n,i,o]},L5=j5;const oi=$r(L5);function Sm(e,t){const n=Object.keys(t).map(r=>R5(e,r,t[r]));return n.length===1?n[0]:function(){n.forEach(r=>r())}}function R5(e,t,n){const r=e[t],o=e.hasOwnProperty(t);let i=n(r);return r&&Object.setPrototypeOf(i,r),Object.setPrototypeOf(a,i),e[t]=a,u;function a(...d){return i===r&&e[t]===a&&u(),i.apply(this,d)}function u(){e[t]===a&&(o?e[t]=r:delete e[t]),i!==r&&(i=r,Object.setPrototypeOf(a,r||Function))}}function _5(e){return e.containerEl.matches(".memos-list-view")}const B5=(e,t)=>{const{dailyNotesState:{app:n,plugin:r,editor:o,view:i,dailyNotes:a}}=F.useContext(Ot),[u,d]=F.useState(null),[f,m]=F.useState(!1),[g,v]=F.useState(""),[w,D]=F.useState(null),T=F.useRef(C.debounce((U,z,$)=>{Y5(U,z,$)},100));F.useEffect(()=>{var U;if(!w){if(!a&&!(n&&window.app)){const z=(U=n||window.app)==null?void 0:U.vault.getMarkdownFiles();D(z[0]);return}for(const z in a)if(a[z]instanceof C.TFile){D(a[z]);break}}},[a]),F.useEffect(()=>{if(!(!e||!o)&&!f)return R(e),()=>{m(!1),u==null||u.destroy()}},[o,e]),F.useEffect(()=>{if(!u||!n)return;const U=H5(n,t?"modal":"view");v(U),(u==null?void 0:u.editor).replaceSelection(U)},[u,n]),F.useEffect(()=>{!u||!n||T.current(g,n,t?"modal":"view")},[g,n]);const I=()=>{u&&u.toggleSource()},k=C.debounce((U,z)=>A(U,z),500,!0),A=(U,z)=>{U&&v(z)},R=U=>{if(!i){new C.Notice(E("Please open thino first"));return}if(o&&i){i.register(Sm(o.constructor.prototype,{onUpdate:$=>function(...te){if($.call(this,te),this.owner.getViewType()==="thino_view"||this.owner instanceof ac){const Q=this.get();k(this.owner,Q)}},getMode:()=>function(){return"source"}})),i.register(Sm(C.Workspace.prototype,{getActiveViewOfType:$=>function(te){const Q=$.call(this,te);if(!Q&&(te==null?void 0:te.VIEW_TYPE)==="markdown"){const ue=this.activeLeaf;if(ue.view instanceof ac)return ue.view}return Q},setActiveLeaf:$=>function(te,Q){if(_5(te)&&($.call(this,te,Q),te.activeTime=17e11),$.call(this,te,Q),te.view instanceof ac){const ue=dt.getState().instanceList.get(te.id);if(!ue)return;self.app.workspace.activeEditor=ue.owner,te.view.editor=ue.editor}},getActiveFile:$=>function(){var Q;const te=$.call(this);return((Q=this.activeLeaf)==null?void 0:Q.view)instanceof ac&&w||te}}));let z;t?z=new o.constructor(i.app,U,t):z=new o.constructor(i.app,U,i),o&&!t&&dt.setInstance(`${i.leaf.id}`,z),z.owner.editor=z.editor,z.set&&z.set("",!0),z.owner.onMarkdownScroll=()=>{},n.workspace.trigger("thino-editor-created",U,z.editor),m(!0),d(z)}};return{instance:u,value:g,set:U=>{try{u&&((u==null?void 0:u.editor).replaceSelection(U),v(U))}catch(z){console.error(z)}},get:()=>u?u.get():"",append:(U,z)=>{if(!u||z&&z!==u.owner.leaf.id)return;const te=(u.get()||"")+U;(u==null?void 0:u.editor).replaceSelection(U),v(te)},clear:()=>{u&&(u.clear(),v(""))},toggleSource:I}};function $E(e,t){return`thinoEditorContentCache:${e}:${t||"view"}`}function H5(e,t){try{const n=$E(e==null?void 0:e.appId,t);return Wr.get([n])[n]||""}catch(n){return console.error(n),""}}function Y5(e,t,n){try{const r=$E(t==null?void 0:t.appId,n);Wr.set({[r]:e})}catch(r){console.error(r)}}function U5(e,t){return{line:e.line,ch:e.ch+t}}const hT=({entity:{name:e,char:t,file:n}})=>y.jsx("div",{children:`${t}`}),z5=({data:e})=>y.jsx("div",{children:"Loading"});let tl;const V5=F.forwardRef((e,t)=>{var Oe;const{globalState:{useTinyUndoHistoryCache:n,globalEditorShown:r,memoListView:o},dailyNotesState:{settings:i,app:a}}=F.useContext(Ot),{SaveMemoButtonLabel:u,SaveMemoButtonIcon:d}=i,{className:f,inputerType:m,initialContent:g,placeholder:v,showConfirmBtn:w,showCancelBtn:D,onConfirmBtnClick:T,onCancelBtnClick:I,onContentChange:k}=e,A=F.useRef(null),R=F.useRef(null),j=F.useRef(null),B=f5(),{instance:L,value:Z,set:U,get:z,append:$,clear:te,toggleSource:Q}=B5(R.current,e.modal),[,ue,ee]=oi(0),[le,W]=oi(!1);F.useEffect(()=>{var Ne,Be;if(i&&i.FocusOnEditor)switch(m){case"minimal":case"memos":(Ne=A.current)==null||Ne.focus();break;case"obsidian":L&&((Be=L.editor)==null||Be.focus())}},[i,L]),F.useEffect(()=>{if(!a)return;const Ne=a.workspace.getLeavesOfType(Bo);let Be,Je;Ne.length>0?(Je=Ne[0].view.containerEl,Be=Je.offsetHeight):(Je=document,Be=window.outerHeight),ue(Be)},[a]),F.useEffect(()=>{!A.current||m==="obsidian"||g&&(A.current.value=g,B())},[]),F.useEffect(()=>{var Ne;if(m!=="obsidian")if(n){if(!A.current)return;const{tinyUndoActionsCache:Be,tinyUndoIndexCache:Je}=Wr.get(["tinyUndoActionsCache","tinyUndoIndexCache"]);return j.current=new d5(A.current,{interval:5e3,initialActions:Be,initialIndex:Je}),j.current.subscribe((ze,Qe)=>{Wr.set({tinyUndoActionsCache:ze,tinyUndoIndexCache:Qe})}),()=>{var ze;(ze=j.current)==null||ze.destroy()}}else(Ne=j.current)==null||Ne.destroy(),j.current=null,Wr.remove(["tinyUndoActionsCache","tinyUndoIndexCache"])},[n]),F.useEffect(()=>{A.current&&(A.current.style.height="auto",A.current.style.height=(A.current.scrollHeight??0)+"px")},[(Oe=A.current)==null?void 0:Oe.value]),F.useImperativeHandle(t,()=>({element:A.current,blur:()=>{var Ne,Be;switch(m){case"minimal":case"memos":(Ne=A.current)==null||Ne.blur();break;case"obsidian":L&&((Be=L.editor)==null||Be.blur())}},focus:Ne=>{var Be,Je,ze,Qe,It;switch(m){case"minimal":case"memos":(Be=A.current)==null||Be.focus();break;case"obsidian":if(L){if(Ne&&Ne!==((Qe=(ze=(Je=L==null?void 0:L.owner)==null?void 0:Je.view)==null?void 0:ze.leaf)==null?void 0:Qe.id))return;(It=L.editor)==null||It.focus()}}},insertTag:Ne=>{var Be,Je,ze;switch(m){case"minimal":case"memos":{if(!A.current)return;const Qe=A.current.value;A.current.value=Qe.slice(0,A.current.selectionStart)+"# "+Qe.slice(A.current.selectionStart),k(A.current.value),B();break}case"obsidian":if(Ne&&Ne!==((ze=(Je=(Be=L==null?void 0:L.owner)==null?void 0:Be.view)==null?void 0:Je.leaf)==null?void 0:ze.id))return;if(L){const Qe=L.editor,It=Qe.getCursor("from");Qe.replaceRange("#",It),Qe.setSelection(U5(It,1))}break}},insertText:(Ne,Be)=>{switch(m){case"minimal":case"memos":{if(!A.current)return;const Je=A.current.value;A.current.value=Je.slice(0,A.current.selectionStart)+Ne+Je.slice(A.current.selectionStart),k(A.current.value),B()}break;case"obsidian":L&&$(Ne,Be);break}},setContent:Ne=>{switch(m){case"minimal":case"memos":A.current&&(A.current.value=Ne,k(A.current.value),B());break;case"obsidian":L&&U(Ne);break}},getContent:()=>{switch(m){case"minimal":case"memos":return A.current?A.current.value:"";case"obsidian":return z()}},toggleSource:()=>{switch(m){case"minimal":case"memos":break;case"obsidian":Q();break}},clear:()=>{switch(m){case"minimal":case"memos":A.current&&(A.current.value="",k(A.current.value),B());break;case"obsidian":te();break}}}),[L,m]);const de=Ne=>{if(!A.current)return;const{fileManager:Be}=_e.getState().dailyNotesState.app;if(Ne.currentTrigger==="#"){const Je=A.current.value;let ze;tl!=null?ze=tl.length:ze=0;let Qe=A.current.selectionStart;for(let It=0;It<Je.length;It++)/\s/g.test(Je[Qe])||Qe++;A.current.value=Je.slice(0,A.current.selectionStart-ze)+Ne.item.char+Je.slice(Qe),k(A.current.value),B()}else if(Ne.currentTrigger==="[["){const Je=Be.generateMarkdownLink(Ne.item.file,Ne.item.file.path,"",""),ze=A.current.value;let Qe;tl!=null?Je.contains("[[")||Ne.item.file.extension!=="md"?Qe=tl.length+1:Qe=tl.length+2:Qe=2;let It=A.current.selectionStart;for(let Zt=0;Zt<ze.length;Zt++)/\s/g.test(ze[It])||It++;A.current.value=ze.slice(0,A.current.selectionStart-Qe)+Je+ze.slice(It),k(A.current.value),B()}},oe=F.useCallback(()=>{var Ne;k(((Ne=A.current)==null?void 0:Ne.value)||""),B()},[]),he=()=>{var Ne;switch(m){case"minimal":case"memos":if(!A.current)return;A.current.value=re(),T(A.current.value),A.current.value="",B(),(Ne=j.current)==null||Ne.resetState();break;case"obsidian":T(z()),te(),B();break}},K=F.useCallback(()=>{switch(m){case"minimal":case"memos":A.current&&(A.current.value="",k(A.current.value),B());break;case"obsidian":te();break}I()},[m,L,A]),re=()=>Wr.get(["thinoEditorContentCache"]).thinoEditorContentCache||"",pe=()=>{if(A.current)return A.current.value=re(),A.current.value},Ie=Ne=>{switch(Ne){case"memos":return y.jsx(ZE,{className:`common-editor-inputer scroll ${le?" editing":""}`,loadingComponent:z5,placeholder:v,movePopupAsYouType:!0,value:pe(),innerRef:Be=>{A.current=Be},onFocus:()=>{W(!0)},onBlur:()=>{W(!1)},onInput:oe,style:{maxHeight:`${ee.current>400?ee.current-400:100}px`},dropdownStyle:{minWidth:180,maxHeight:250,overflowY:"auto"},minChar:0,onItemSelected:de,scrollToItem:!0,trigger:{"#":{dataProvider:Be=>(tl=Be,F5(Be).map(({name:Je,char:ze})=>({name:Je,char:ze}))),component:hT,afterWhitespace:!0,output:Be=>Be.char},"[[":{dataProvider:Be=>(tl=Be,P5(Be).slice(0,10).map(({name:Je,char:ze,file:Qe})=>({name:Je,char:ze,file:Qe}))),component:hT,afterWhitespace:!0,output:Be=>Be.char}}});case"minimal":return y.jsx("textarea",{style:{minHeight:48},className:"common-editor-inputer scroll",rows:1,placeholder:v,ref:A,onInput:oe});case"obsidian":return y.jsx("div",{className:"common-editor-inputer common-editor-mod-cm6",onClick:()=>{var Be;(Be=L==null?void 0:L.editor)==null||Be.focus()},ref:R});default:return y.jsx("div",{className:"common-editor-inputer common-editor-mod-cm6",ref:R})}};return y.jsxs("div",{className:"common-editor-wrapper "+f,children:[Ie(m),y.jsxs("div",{className:"common-tools-wrapper",children:[y.jsx("div",{className:"common-tools-container",children:y.jsx(Aa,{when:e.tools!==void 0,children:e.tools})}),y.jsxs("div",{className:"btns-container",children:[y.jsx(Aa,{when:D,children:y.jsx("button",{className:"action-btn cancel-btn",onClick:()=>{i&&i.DefaultEditorLocation==="Top"&&!r&&K()},onPointerDown:()=>{(i&&i.DefaultEditorLocation==="Bottom"||r)&&K()},children:st.getState().pathname==="/"&&o==="chat"&&((i==null?void 0:i.chatViewStyle)==="fluent"||(i==null?void 0:i.chatViewStyle)==="inline")?"":E("CANCEL EDIT")})}),y.jsx(Aa,{when:w,children:y.jsxs("button",{title:"Ctrl/Cmd + Enter to save thino",className:"action-btn confirm-btn",onClick:()=>{i&&i.DefaultEditorLocation==="Top"&&!r&&he()},onPointerDown:()=>{(i&&i.DefaultEditorLocation==="Bottom"||r)&&he()},children:[o==="chat"&&((i==null?void 0:i.chatViewStyle)==="fluent"||(i==null?void 0:i.chatViewStyle)==="inline")?"":u,y.jsx("span",{className:"icon-text",children:null})]})})]})]})]})}),W5=typeof window<"u"?F.useLayoutEffect:F.useEffect;function Z5(e,t,n,r){const o=F.useRef(t);W5(()=>{o.current=t},[t]),F.useEffect(()=>{const i=(n==null?void 0:n.current)||window;if(!(i&&i.addEventListener))return;const a=u=>{o.current(u)};return i.addEventListener(e,a,r),()=>{i.removeEventListener(e,a,r)}},[e,n,r])}function cg(e,t,n="mousedown"){Z5(n,r=>{const o=r.target;if(!o||!o.isConnected||o.closest(".suggestion-container")||o.closest(".menu"))return;(Array.isArray(e)?e.every(a=>a.current&&!a.current.contains(o)):e.current&&!e.current.contains(o))&&t(r)})}const qE=e=>{const{year:t,handleYearChange:n}=e,[r,o]=F.useState([]),[i,a]=F.useState(t),u=F.useRef(null),d=F.useRef(null),[f,m]=se.useState(!1),g=se.useRef(null);cg(g,()=>{m(!1)}),F.useEffect(()=>{u.current&&C.setIcon(u.current,"chevron-left"),d.current&&C.setIcon(d.current,"chevron-right")},[u,d,f]),F.useEffect(()=>{w(i)},[t]);const w=D=>{const T=parseInt(D),I=T-T%10,k=[];for(let A=0;A<10;A++)k.push(`${I+A}`);o(k)};return y.jsxs(y.Fragment,{children:[y.jsxs("span",{className:"btn year-btn",onClick:()=>{m(!f)},children:[y.jsx("span",{children:t}),y.jsx("span",{children:E("year")})]}),f&&y.jsxs("div",{ref:g,className:"year-picker-wrapper",children:[y.jsxs("div",{className:"year-picker-header",children:[y.jsxs("div",{className:"year-picker-header-title",children:[i," "+(E("year")||"")]}),y.jsxs("div",{className:"year-picker-header-btns",children:[y.jsx("span",{className:"btn",ref:u,onClick:()=>{const D=parseInt(i)-10;a(D.toString()),w(D.toString())}}),y.jsx("span",{className:"btn",ref:d,onClick:()=>{const D=parseInt(i)+10;a(D.toString()),w(D.toString())}})]})]}),y.jsx("div",{className:"year-picker-body",children:y.jsx("div",{className:"year-picker-body-list",children:r.map(D=>y.jsx("div",{className:`year-picker-body-item ${D===i?"selected":""}`,onClick:()=>{a(D),n(D),m(!1)},children:D},D))})})]})]})},GE=e=>{const{month:t,handleMonthChange:n}=e,[r,o]=F.useState([]),[i,a]=F.useState((parseInt(t)+1).toString()),[u,d]=se.useState(!1),f=se.useRef(null);cg(f,()=>{d(!1)}),F.useEffect(()=>{g()},[t]);const g=()=>{const v=[];for(let w=1;w<=12;w++)v.push(`${w}`);o(v)};return y.jsxs(y.Fragment,{children:[y.jsxs("span",{className:"btn month-btn",onClick:()=>{d(!u)},children:[y.jsxs("span",{children:[E("monthsShort")[parseInt(t)]||parseInt(t)+1," "]}),y.jsx("span",{children:E("month")||""})]}),u&&y.jsxs("div",{ref:f,className:"month-picker-wrapper",children:[y.jsxs("div",{className:"month-picker-header",children:[y.jsxs("div",{className:"month-picker-header-title",children:[i," "+(E("month")||"")]}),y.jsx("div",{className:"month-picker-header-btns"})]}),y.jsx("div",{className:"month-picker-body",children:y.jsx("div",{className:"month-picker-body-list",children:r.map(v=>y.jsx("div",{className:`month-picker-body-item ${v===i?"selected":""}`,onClick:()=>{a(v),n(v),d(!1)},children:v},v))})})]})]})},f0=e=>{const{className:t,datestamp:n,handleDateStampChange:r}=e,[o,i]=F.useState(am(n)),[a,u]=F.useState(n);F.useEffect(()=>{i(am(n))},[n]);const d=new Date(o),f=d.getDay(),m=[];for(let D=0;D<f;D++)m.push({date:0,datestamp:d.getTime()-fl*(7-D)});const g=$5(o);for(let D=1;D<=g;D++)m.push({date:D,datestamp:d.getTime()+fl*(D-1)});const v=(D,T)=>{r(T,D.nativeEvent),u(T)},w=D=>{const T=d.getFullYear(),I=d.getMonth()+1;let k=0;I===1&&D===-1?k=new Date(`${T-1}/12/1`).getTime():I===12&&D===1?k=new Date(`${T+1}/1/1`).getTime():k=new Date(`${T}/${I+D}/1`).getTime(),i(am(k))};return y.jsxs("div",{className:`date-picker-wrapper ${t}`,children:[y.jsxs("div",{className:"date-picker-header",children:[y.jsx("span",{ref:D=>{D&&C.setIcon(D,"chevron-left")},className:"btn btn-text",onClick:()=>w(-1)}),y.jsxs("span",{className:"normal-text",children:[y.jsx(qE,{year:d.getFullYear().toString(),handleYearChange:D=>{i(am(new Date(`${D}/${d.getMonth()+1}/1`).getTime()))}}),y.jsx(GE,{month:d.getMonth().toString(),handleMonthChange:D=>{i(am(new Date(`${d.getFullYear()}/${parseInt(D)}/1`).getTime()))}})]}),y.jsx("span",{ref:D=>{D&&C.setIcon(D,"chevron-right")},className:"btn btn-text",onClick:()=>w(1)})]}),y.jsxs("div",{className:"date-picker-day-container",children:[y.jsx("div",{className:"date-picker-day-header",children:E("weekDaysShort").map(D=>y.jsx("span",{className:"day-item",children:D},D))}),y.jsx("div",{className:"date-picker-day-content",children:m.map(D=>D.date===0?y.jsx("span",{className:"day-item null",children:""},D.datestamp):y.jsx("span",{className:`day-item ${D.datestamp===n?"current":""} ${D.datestamp===a?"selected":""}`,onClick:T=>v(T,D.datestamp),children:y.jsx("span",{className:"day-item-text",children:D.date})},D.datestamp))})]})]})};function $5(e){const t=new Date(e),n=new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`);return((n.getMonth()===11?new Date(`${n.getFullYear()+1}/1/1`):new Date(`${n.getFullYear()}/${n.getMonth()+2}/1`)).getTime()-n.getTime())/fl}function am(e){const t=new Date(e);return new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`).getTime()}var pT=function(t){return t.reduce(function(n,r){var o=r[0],i=r[1];return n[o]=i,n},{})},mT=typeof window<"u"&&window.document&&window.document.createElement?F.useLayoutEffect:F.useEffect,Ai="top",Oa="bottom",ja="right",Fi="left",q1="auto",dg=[Ai,Oa,ja,Fi],gh="start",Am="end",q5="clippingParents",JE="viewport",sm="popper",G5="reference",gT=dg.reduce(function(e,t){return e.concat([t+"-"+gh,t+"-"+Am])},[]),G1=[].concat(dg,[q1]).reduce(function(e,t){return e.concat([t,t+"-"+gh,t+"-"+Am])},[]),J5="beforeRead",K5="read",Q5="afterRead",X5="beforeMain",eP="main",tP="afterMain",nP="beforeWrite",rP="write",oP="afterWrite",iP=[J5,K5,Q5,X5,eP,tP,nP,rP,oP];function gl(e){return e?(e.nodeName||"").toLowerCase():null}function sa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Td(e){var t=sa(e).Element;return e instanceof t||e instanceof Element}function Fa(e){var t=sa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function J1(e){if(typeof ShadowRoot>"u")return!1;var t=sa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function aP(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!Fa(i)||!gl(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var u=o[a];u===!1?i.removeAttribute(a):i.setAttribute(a,u===!0?"":u)}))})}function sP(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),u=a.reduce(function(d,f){return d[f]="",d},{});!Fa(o)||!gl(o)||(Object.assign(o.style,u),Object.keys(i).forEach(function(d){o.removeAttribute(d)}))})}}const lP={name:"applyStyles",enabled:!0,phase:"write",fn:aP,effect:sP,requires:["computeStyles"]};function hl(e){return e.split("-")[0]}var bd=Math.max,Ev=Math.min,yh=Math.round;function Zb(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function KE(){return!/^((?!chrome|android).)*safari/i.test(Zb())}function vh(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Fa(e)&&(o=e.offsetWidth>0&&yh(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&yh(r.height)/e.offsetHeight||1);var a=Td(e)?sa(e):window,u=a.visualViewport,d=!KE()&&n,f=(r.left+(d&&u?u.offsetLeft:0))/o,m=(r.top+(d&&u?u.offsetTop:0))/i,g=r.width/o,v=r.height/i;return{width:g,height:v,top:m,right:f+g,bottom:m+v,left:f,x:f,y:m}}function K1(e){var t=vh(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function QE(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&J1(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function nu(e){return sa(e).getComputedStyle(e)}function uP(e){return["table","td","th"].indexOf(gl(e))>=0}function pc(e){return((Td(e)?e.ownerDocument:e.document)||window.document).documentElement}function h0(e){return gl(e)==="html"?e:e.assignedSlot||e.parentNode||(J1(e)?e.host:null)||pc(e)}function yT(e){return!Fa(e)||nu(e).position==="fixed"?null:e.offsetParent}function cP(e){var t=/firefox/i.test(Zb()),n=/Trident/i.test(Zb());if(n&&Fa(e)){var r=nu(e);if(r.position==="fixed")return null}var o=h0(e);for(J1(o)&&(o=o.host);Fa(o)&&["html","body"].indexOf(gl(o))<0;){var i=nu(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function fg(e){for(var t=sa(e),n=yT(e);n&&uP(n)&&nu(n).position==="static";)n=yT(n);return n&&(gl(n)==="html"||gl(n)==="body"&&nu(n).position==="static")?t:n||cP(e)||t}function Q1(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Dm(e,t,n){return bd(e,Ev(t,n))}function dP(e,t,n){var r=Dm(e,t,n);return r>n?n:r}function XE(){return{top:0,right:0,bottom:0,left:0}}function eC(e){return Object.assign({},XE(),e)}function tC(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var fP=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,eC(typeof t!="number"?t:tC(t,dg))};function hP(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,u=hl(n.placement),d=Q1(u),f=[Fi,ja].indexOf(u)>=0,m=f?"height":"width";if(!(!i||!a)){var g=fP(o.padding,n),v=K1(i),w=d==="y"?Ai:Fi,D=d==="y"?Oa:ja,T=n.rects.reference[m]+n.rects.reference[d]-a[d]-n.rects.popper[m],I=a[d]-n.rects.reference[d],k=fg(i),A=k?d==="y"?k.clientHeight||0:k.clientWidth||0:0,R=T/2-I/2,j=g[w],B=A-v[m]-g[D],L=A/2-v[m]/2+R,Z=Dm(j,L,B),U=d;n.modifiersData[r]=(t={},t[U]=Z,t.centerOffset=Z-L,t)}}function pP(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||QE(t.elements.popper,o)&&(t.elements.arrow=o))}const nC={name:"arrow",enabled:!0,phase:"main",fn:hP,effect:pP,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wh(e){return e.split("-")[1]}var mP={top:"auto",right:"auto",bottom:"auto",left:"auto"};function gP(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:yh(n*o)/o||0,y:yh(r*o)/o||0}}function vT(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,u=e.position,d=e.gpuAcceleration,f=e.adaptive,m=e.roundOffsets,g=e.isFixed,v=a.x,w=v===void 0?0:v,D=a.y,T=D===void 0?0:D,I=typeof m=="function"?m({x:w,y:T}):{x:w,y:T};w=I.x,T=I.y;var k=a.hasOwnProperty("x"),A=a.hasOwnProperty("y"),R=Fi,j=Ai,B=window;if(f){var L=fg(n),Z="clientHeight",U="clientWidth";if(L===sa(n)&&(L=pc(n),nu(L).position!=="static"&&u==="absolute"&&(Z="scrollHeight",U="scrollWidth")),o===Ai||(o===Fi||o===ja)&&i===Am){j=Oa;var z=g&&L===B&&B.visualViewport?B.visualViewport.height:L[Z];T-=z-r.height,T*=d?1:-1}if(o===Fi||(o===Ai||o===Oa)&&i===Am){R=ja;var $=g&&L===B&&B.visualViewport?B.visualViewport.width:L[U];w-=$-r.width,w*=d?1:-1}}var te=Object.assign({position:u},f&&mP),Q=m===!0?gP({x:w,y:T},sa(n)):{x:w,y:T};if(w=Q.x,T=Q.y,d){var ue;return Object.assign({},te,(ue={},ue[j]=A?"0":"",ue[R]=k?"0":"",ue.transform=(B.devicePixelRatio||1)<=1?"translate("+w+"px, "+T+"px)":"translate3d("+w+"px, "+T+"px, 0)",ue))}return Object.assign({},te,(t={},t[j]=A?T+"px":"",t[R]=k?w+"px":"",t.transform="",t))}function yP(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,u=n.roundOffsets,d=u===void 0?!0:u,f={placement:hl(t.placement),variation:wh(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,vT(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:d})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,vT(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:d})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const rC={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:yP,data:{}};var jy={passive:!0};function vP(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,u=a===void 0?!0:a,d=sa(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach(function(m){m.addEventListener("scroll",n.update,jy)}),u&&d.addEventListener("resize",n.update,jy),function(){i&&f.forEach(function(m){m.removeEventListener("scroll",n.update,jy)}),u&&d.removeEventListener("resize",n.update,jy)}}const oC={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:vP,data:{}};var wP={left:"right",right:"left",bottom:"top",top:"bottom"};function av(e){return e.replace(/left|right|bottom|top/g,function(t){return wP[t]})}var bP={start:"end",end:"start"};function wT(e){return e.replace(/start|end/g,function(t){return bP[t]})}function X1(e){var t=sa(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function eS(e){return vh(pc(e)).left+X1(e).scrollLeft}function SP(e,t){var n=sa(e),r=pc(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,u=0,d=0;if(o){i=o.width,a=o.height;var f=KE();(f||!f&&t==="fixed")&&(u=o.offsetLeft,d=o.offsetTop)}return{width:i,height:a,x:u+eS(e),y:d}}function DP(e){var t,n=pc(e),r=X1(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=bd(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=bd(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-r.scrollLeft+eS(e),d=-r.scrollTop;return nu(o||n).direction==="rtl"&&(u+=bd(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:u,y:d}}function tS(e){var t=nu(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function iC(e){return["html","body","#document"].indexOf(gl(e))>=0?e.ownerDocument.body:Fa(e)&&tS(e)?e:iC(h0(e))}function Tm(e,t){var n;t===void 0&&(t=[]);var r=iC(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=sa(r),a=o?[i].concat(i.visualViewport||[],tS(r)?r:[]):r,u=t.concat(a);return o?u:u.concat(Tm(h0(a)))}function $b(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function TP(e,t){var n=vh(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function bT(e,t,n){return t===JE?$b(SP(e,n)):Td(t)?TP(t,n):$b(DP(pc(e)))}function IP(e){var t=Tm(h0(e)),n=["absolute","fixed"].indexOf(nu(e).position)>=0,r=n&&Fa(e)?fg(e):e;return Td(r)?t.filter(function(o){return Td(o)&&QE(o,r)&&gl(o)!=="body"}):[]}function xP(e,t,n,r){var o=t==="clippingParents"?IP(e):[].concat(t),i=[].concat(o,[n]),a=i[0],u=i.reduce(function(d,f){var m=bT(e,f,r);return d.top=bd(m.top,d.top),d.right=Ev(m.right,d.right),d.bottom=Ev(m.bottom,d.bottom),d.left=bd(m.left,d.left),d},bT(e,a,r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function aC(e){var t=e.reference,n=e.element,r=e.placement,o=r?hl(r):null,i=r?wh(r):null,a=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,d;switch(o){case Ai:d={x:a,y:t.y-n.height};break;case Oa:d={x:a,y:t.y+t.height};break;case ja:d={x:t.x+t.width,y:u};break;case Fi:d={x:t.x-n.width,y:u};break;default:d={x:t.x,y:t.y}}var f=o?Q1(o):null;if(f!=null){var m=f==="y"?"height":"width";switch(i){case gh:d[f]=d[f]-(t[m]/2-n[m]/2);break;case Am:d[f]=d[f]+(t[m]/2-n[m]/2);break}}return d}function Fm(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,u=n.boundary,d=u===void 0?q5:u,f=n.rootBoundary,m=f===void 0?JE:f,g=n.elementContext,v=g===void 0?sm:g,w=n.altBoundary,D=w===void 0?!1:w,T=n.padding,I=T===void 0?0:T,k=eC(typeof I!="number"?I:tC(I,dg)),A=v===sm?G5:sm,R=e.rects.popper,j=e.elements[D?A:v],B=xP(Td(j)?j:j.contextElement||pc(e.elements.popper),d,m,a),L=vh(e.elements.reference),Z=aC({reference:L,element:R,strategy:"absolute",placement:o}),U=$b(Object.assign({},R,Z)),z=v===sm?U:L,$={top:B.top-z.top+k.top,bottom:z.bottom-B.bottom+k.bottom,left:B.left-z.left+k.left,right:z.right-B.right+k.right},te=e.modifiersData.offset;if(v===sm&&te){var Q=te[o];Object.keys($).forEach(function(ue){var ee=[ja,Oa].indexOf(ue)>=0?1:-1,le=[Ai,Oa].indexOf(ue)>=0?"y":"x";$[ue]+=Q[le]*ee})}return $}function EP(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,u=n.flipVariations,d=n.allowedAutoPlacements,f=d===void 0?G1:d,m=wh(r),g=m?u?gT:gT.filter(function(D){return wh(D)===m}):dg,v=g.filter(function(D){return f.indexOf(D)>=0});v.length===0&&(v=g);var w=v.reduce(function(D,T){return D[T]=Fm(e,{placement:T,boundary:o,rootBoundary:i,padding:a})[hl(T)],D},{});return Object.keys(w).sort(function(D,T){return w[D]-w[T]})}function CP(e){if(hl(e)===q1)return[];var t=av(e);return[wT(e),t,wT(t)]}function MP(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,u=a===void 0?!0:a,d=n.fallbackPlacements,f=n.padding,m=n.boundary,g=n.rootBoundary,v=n.altBoundary,w=n.flipVariations,D=w===void 0?!0:w,T=n.allowedAutoPlacements,I=t.options.placement,k=hl(I),A=k===I,R=d||(A||!D?[av(I)]:CP(I)),j=[I].concat(R).reduce(function(Oe,Ne){return Oe.concat(hl(Ne)===q1?EP(t,{placement:Ne,boundary:m,rootBoundary:g,padding:f,flipVariations:D,allowedAutoPlacements:T}):Ne)},[]),B=t.rects.reference,L=t.rects.popper,Z=new Map,U=!0,z=j[0],$=0;$<j.length;$++){var te=j[$],Q=hl(te),ue=wh(te)===gh,ee=[Ai,Oa].indexOf(Q)>=0,le=ee?"width":"height",W=Fm(t,{placement:te,boundary:m,rootBoundary:g,altBoundary:v,padding:f}),de=ee?ue?ja:Fi:ue?Oa:Ai;B[le]>L[le]&&(de=av(de));var oe=av(de),he=[];if(i&&he.push(W[Q]<=0),u&&he.push(W[de]<=0,W[oe]<=0),he.every(function(Oe){return Oe})){z=te,U=!1;break}Z.set(te,he)}if(U)for(var K=D?3:1,re=function(Ne){var Be=j.find(function(Je){var ze=Z.get(Je);if(ze)return ze.slice(0,Ne).every(function(Qe){return Qe})});if(Be)return z=Be,"break"},pe=K;pe>0;pe--){var Ie=re(pe);if(Ie==="break")break}t.placement!==z&&(t.modifiersData[r]._skip=!0,t.placement=z,t.reset=!0)}}const sC={name:"flip",enabled:!0,phase:"main",fn:MP,requiresIfExists:["offset"],data:{_skip:!1}};function ST(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function DT(e){return[Ai,ja,Oa,Fi].some(function(t){return e[t]>=0})}function kP(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Fm(t,{elementContext:"reference"}),u=Fm(t,{altBoundary:!0}),d=ST(a,r),f=ST(u,o,i),m=DT(d),g=DT(f);t.modifiersData[n]={referenceClippingOffsets:d,popperEscapeOffsets:f,isReferenceHidden:m,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":m,"data-popper-escaped":g})}const lC={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:kP};function NP(e,t,n){var r=hl(e),o=[Fi,Ai].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],u=i[1];return a=a||0,u=(u||0)*o,[Fi,ja].indexOf(r)>=0?{x:u,y:a}:{x:a,y:u}}function AP(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=G1.reduce(function(m,g){return m[g]=NP(g,t.rects,i),m},{}),u=a[t.placement],d=u.x,f=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=f),t.modifiersData[r]=a}const uC={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:AP};function FP(e){var t=e.state,n=e.name;t.modifiersData[n]=aC({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const cC={name:"popperOffsets",enabled:!0,phase:"read",fn:FP,data:{}};function PP(e){return e==="x"?"y":"x"}function OP(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,u=a===void 0?!1:a,d=n.boundary,f=n.rootBoundary,m=n.altBoundary,g=n.padding,v=n.tether,w=v===void 0?!0:v,D=n.tetherOffset,T=D===void 0?0:D,I=Fm(t,{boundary:d,rootBoundary:f,padding:g,altBoundary:m}),k=hl(t.placement),A=wh(t.placement),R=!A,j=Q1(k),B=PP(j),L=t.modifiersData.popperOffsets,Z=t.rects.reference,U=t.rects.popper,z=typeof T=="function"?T(Object.assign({},t.rects,{placement:t.placement})):T,$=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),te=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Q={x:0,y:0};if(L){if(i){var ue,ee=j==="y"?Ai:Fi,le=j==="y"?Oa:ja,W=j==="y"?"height":"width",de=L[j],oe=de+I[ee],he=de-I[le],K=w?-U[W]/2:0,re=A===gh?Z[W]:U[W],pe=A===gh?-U[W]:-Z[W],Ie=t.elements.arrow,Oe=w&&Ie?K1(Ie):{width:0,height:0},Ne=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:XE(),Be=Ne[ee],Je=Ne[le],ze=Dm(0,Z[W],Oe[W]),Qe=R?Z[W]/2-K-ze-Be-$.mainAxis:re-ze-Be-$.mainAxis,It=R?-Z[W]/2+K+ze+Je+$.mainAxis:pe+ze+Je+$.mainAxis,Zt=t.elements.arrow&&fg(t.elements.arrow),Re=Zt?j==="y"?Zt.clientTop||0:Zt.clientLeft||0:0,tt=(ue=te==null?void 0:te[j])!=null?ue:0,at=de+Qe-tt-Re,gt=de+It-tt,Et=Dm(w?Ev(oe,at):oe,de,w?bd(he,gt):he);L[j]=Et,Q[j]=Et-de}if(u){var Tt,qt=j==="x"?Ai:Fi,zt=j==="x"?Oa:ja,$t=L[B],Gt=B==="y"?"height":"width",cn=$t+I[qt],Xt=$t-I[zt],Qn=[Ai,Fi].indexOf(k)!==-1,En=(Tt=te==null?void 0:te[B])!=null?Tt:0,Cr=Qn?cn:$t-Z[Gt]-U[Gt]-En+$.altAxis,yr=Qn?$t+Z[Gt]+U[Gt]-En-$.altAxis:Xt,Rn=w&&Qn?dP(Cr,$t,yr):Dm(w?Cr:cn,$t,w?yr:Xt);L[B]=Rn,Q[B]=Rn-$t}t.modifiersData[r]=Q}}const dC={name:"preventOverflow",enabled:!0,phase:"main",fn:OP,requiresIfExists:["offset"]};function jP(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function LP(e){return e===sa(e)||!Fa(e)?X1(e):jP(e)}function RP(e){var t=e.getBoundingClientRect(),n=yh(t.width)/e.offsetWidth||1,r=yh(t.height)/e.offsetHeight||1;return n!==1||r!==1}function _P(e,t,n){n===void 0&&(n=!1);var r=Fa(t),o=Fa(t)&&RP(t),i=pc(t),a=vh(e,o,n),u={scrollLeft:0,scrollTop:0},d={x:0,y:0};return(r||!r&&!n)&&((gl(t)!=="body"||tS(i))&&(u=LP(t)),Fa(t)?(d=vh(t,!0),d.x+=t.clientLeft,d.y+=t.clientTop):i&&(d.x=eS(i))),{x:a.left+u.scrollLeft-d.x,y:a.top+u.scrollTop-d.y,width:a.width,height:a.height}}function BP(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(u){if(!n.has(u)){var d=t.get(u);d&&o(d)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function HP(e){var t=BP(e);return iP.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function YP(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function UP(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var TT={placement:"bottom",modifiers:[],strategy:"absolute"};function IT(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function fC(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,i=o===void 0?TT:o;return function(u,d,f){f===void 0&&(f=i);var m={placement:"bottom",orderedModifiers:[],options:Object.assign({},TT,i),modifiersData:{},elements:{reference:u,popper:d},attributes:{},styles:{}},g=[],v=!1,w={state:m,setOptions:function(k){var A=typeof k=="function"?k(m.options):k;T(),m.options=Object.assign({},i,m.options,A),m.scrollParents={reference:Td(u)?Tm(u):u.contextElement?Tm(u.contextElement):[],popper:Tm(d)};var R=HP(UP([].concat(r,m.options.modifiers)));return m.orderedModifiers=R.filter(function(j){return j.enabled}),D(),w.update()},forceUpdate:function(){if(!v){var k=m.elements,A=k.reference,R=k.popper;if(IT(A,R)){m.rects={reference:_P(A,fg(R),m.options.strategy==="fixed"),popper:K1(R)},m.reset=!1,m.placement=m.options.placement,m.orderedModifiers.forEach(function($){return m.modifiersData[$.name]=Object.assign({},$.data)});for(var j=0;j<m.orderedModifiers.length;j++){if(m.reset===!0){m.reset=!1,j=-1;continue}var B=m.orderedModifiers[j],L=B.fn,Z=B.options,U=Z===void 0?{}:Z,z=B.name;typeof L=="function"&&(m=L({state:m,options:U,name:z,instance:w})||m)}}}},update:YP(function(){return new Promise(function(I){w.forceUpdate(),I(m)})}),destroy:function(){T(),v=!0}};if(!IT(u,d))return w;w.setOptions(f).then(function(I){!v&&f.onFirstUpdate&&f.onFirstUpdate(I)});function D(){m.orderedModifiers.forEach(function(I){var k=I.name,A=I.options,R=A===void 0?{}:A,j=I.effect;if(typeof j=="function"){var B=j({state:m,name:k,instance:w,options:R}),L=function(){};g.push(B||L)}})}function T(){g.forEach(function(I){return I()}),g=[]}return w}}var zP=[oC,cC,rC,lP,uC,sC,dC,nC,lC],hC=fC({defaultModifiers:zP}),VP=typeof Element<"u",WP=typeof Map=="function",ZP=typeof Set=="function",$P=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function sv(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,o;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!sv(e[r],t[r]))return!1;return!0}var i;if(WP&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!sv(r.value[1],t.get(r.value[0])))return!1;return!0}if(ZP&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if($P&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;if(VP&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((o[r]==="_owner"||o[r]==="__v"||o[r]==="__o")&&e.$$typeof)&&!sv(e[o[r]],t[o[r]]))return!1;return!0}return e!==e&&t!==t}var qP=function(t,n){try{return sv(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const GP=$r(qP);var JP=[],p0=function(t,n,r){r===void 0&&(r={});var o=F.useRef(null),i={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||JP},a=F.useState({styles:{popper:{position:i.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),u=a[0],d=a[1],f=F.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(w){var D=w.state,T=Object.keys(D.elements);s0.flushSync(function(){d({styles:pT(T.map(function(I){return[I,D.styles[I]||{}]})),attributes:pT(T.map(function(I){return[I,D.attributes[I]]}))})})},requires:["computeStyles"]}},[]),m=F.useMemo(function(){var v={onFirstUpdate:i.onFirstUpdate,placement:i.placement,strategy:i.strategy,modifiers:[].concat(i.modifiers,[f,{name:"applyStyles",enabled:!1}])};return GP(o.current,v)?o.current||v:(o.current=v,v)},[i.onFirstUpdate,i.placement,i.strategy,i.modifiers,f]),g=F.useRef();return mT(function(){g.current&&g.current.setOptions(m)},[m]),mT(function(){if(!(t==null||n==null)){var v=r.createPopper||hC,w=v(t,n,m);return g.current=w,function(){w.destroy(),g.current=null}}},[t,n,r.createPopper]),{state:g.current?g.current.state:null,styles:u.styles,attributes:u.attributes,update:g.current?g.current.update:null,forceUpdate:g.current?g.current.forceUpdate:null}},KP=function(){},QP=KP;const XP=$r(QP),eO=(e,t)=>({placement:e,modifiers:[{name:"flip",options:{allowedAutoPlacements:t,rootBoundary:"document"}},{name:"preventOverflow",options:{rootBoundary:"document"}}]}),tO=e=>{const n=F.useRef(null),[r,o]=F.useState(null),[i,a]=F.useState(0);let u,d;const f=()=>{if(C.Platform.isMobile){u="right-end",d=["bottom"];return}const g=window.innerWidth-i>280*1.2,v=window.innerWidth-i<280,w=window.innerWidth>280*1.5;if(e.DefaultEditorLocation!=="Bottom"){g?(u="right-end",d=["left-end"]):v&&w?(u="left-end",d=["right-end"]):(u="bottom",d=["bottom"]);return}g?(u="top-end",d=["top-start"]):v&&i>280?(u="top-start",d=["top-end"]):(u="top",d=["top"])};F.useEffect(()=>{e&&f()},[i,e==null?void 0:e.DefaultEditorLocation]);const m=p0(n.current,r,eO(u,d));return{setPosX:a,popperRef:n,setPopperElement:o,popper:m}},nO=()=>{const e=new Set,t=st.getState().query.filter,n=st.getState().query.tag,r=tn.getQueryById(t||"");if(r&&r.querystring){const o=JSON.parse(r.querystring);if(Array.isArray(o))for(const i of o)i.type==="TAG"&&i.value&&i.value.operator==="CONTAIN"&&e.add(i.value.value)}return n&&e.add(n),Array.from(e)},rO=e=>{const{offsetLeft:t,offsetTop:n,offsetHeight:r,offsetWidth:o,selectionEnd:i}=e,a=document.createElement("div"),u=window.getComputedStyle(e);for(const T of u)a.style.setProperty(T,u.getPropertyValue(T));a.style.position="fixed",a.style.visibility="hidden",a.style.whiteSpace="pre-wrap";const f=e.tagName==="INPUT"?e.value.replace(/ /g,"."):e.value;a.textContent=f.substring(0,i||0),e.tagName==="TEXTAREA"&&(a.style.height="auto");const m=document.createElement("span");m.textContent=f.substring(i||0)||".",a.appendChild(m),document.body.appendChild(a);const{offsetLeft:g,offsetTop:v,offsetHeight:w,offsetWidth:D}=m;return document.body.removeChild(a),{x:t+g,y:n+v,h:r+w,w:o+D}},Sd=({className:e,editorType:t,destroy:n,modal:r})=>{const{globalState:o,dailyNotesState:{app:i,settings:a,view:u,verifyState:d}}=F.useContext(Ot),[f,m]=ml(!0),g=F.useRef(f),[v,w]=oi(!0),D=F.useRef(null),T=F.useRef(null),I=F.useRef(o),[k,A]=oi(!1),[R,j]=oi(!1),{setPosX:B,popperRef:L,setPopperElement:Z,popper:U}=tO(a),[z]=oi(parseInt(C.moment().format("x"))),$=F.useRef(null),[te,Q]=oi((a==null?void 0:a.EnabledLocationList.length)===1?a==null?void 0:a.EnabledLocationList[0].value:(a==null?void 0:a.MemoSaveLocation)||"DAILY"),ue=F.useRef(a.MemoSaveLocation||"DAILY");F.useEffect(()=>{g.current=f},[f]),F.useEffect(()=>{!T.current||!i||!u||(u.registerEvent(i.workspace.on("focus-on-textarea",Re=>{var tt;(tt=T.current)==null||tt.focus(Re==null?void 0:Re.id)})),u.registerEvent(i.workspace.on("blur-on-memos",()=>{var Re;(Re=T.current)==null||Re.blur()})),u.registerEvent(i.workspace.on("send-to-thino",async(Re,tt)=>{var at,gt;if(typeof Re=="string")(at=T.current)==null||at.insertText(Re+`
|
|
|
`,tt.id);else{const Et=Re.toPNG(),Tt=new Blob([Et],{type:"image/png"}),qt=new File([Tt],"image.png",{type:"image/png",lastModified:Date.now()});if(!qt)return;const zt=await he(qt);zt&&((gt=T.current)==null||gt.insertText(zt+`
|
|
|
`,tt.id))}})))},[T,u,i]),F.useEffect(()=>{a&&m(a.DefaultPrefix==="List")},[a==null?void 0:a.DefaultPrefix]),F.useEffect(()=>{if(a){if(a.EnabledLocationList.length===1){Q(a.EnabledLocationList[0].value);return}Q(a.MemoSaveLocation||"DAILY")}},[a==null?void 0:a.MemoSaveLocation,a==null?void 0:a.EnabledLocationList]),F.useEffect(()=>{var at;if(!a||!$.current)return;const Re=(at=km.find(gt=>gt.title===te))==null?void 0:at.icon;C.setIcon($.current,Re),C.requireApiVersion("1.4.4")&&C.setTooltip($.current,E("Thino Save To: ")+te),ue.current=te;const tt=o.manifest;if(tt){const gt=i==null?void 0:i.plugins.getPlugin(tt.id);if(gt){if(gt.settings.MemoSaveLocation===te)return;gt.settings.MemoSaveLocation=te,gt.saveSettings()}}},[te,v]),F.useEffect(()=>{T.current&&a.MemoSaveLocation&&Q(a.MemoSaveLocation)},[$,a]),F.useEffect(()=>{if(!T.current||!a||C.Platform.isDesktop||o.globalEditorShown)return;const Re=a.UseButtonToShowEditor&&a.DefaultEditorLocation==="Bottom";if(C.Platform.isDesktop){w(!0);return}if(t&&t==="inline"){w(!0);return}if(w(C.Platform.isMobile&&!Re),!Re||o.memoListView==="chat")return;const tt=document.body.find(".memolist-wrapper");tt&&(tt.onscroll=()=>{if(o.globalEditorShown)return;if(!o.memoListView&&dt.getState().memoListView==="chat"){tt.onscroll=null;return}const at=T.current.getContent();C.Platform.isMobile&&Re&&!at&&w(!1)})},[o.globalEditorShown,t,T]);const ee=()=>{j(!1)};F.useEffect(()=>{var Re,tt,at,gt,Et,Tt,qt,zt,$t;if(i&&(o.markMemoId||(Re=o.editMemoId)!=null&&Re.trim()&&o.editMemoId!==I.current.editMemoId)){const Gt=i.workspace.getLeavesOfType("thino_view");Gt.length>0&&i.workspace.revealLeaf(Gt[0])}if(o.markMemoId){const Gt=`${E("MARK")}: [@THINO](${o.markMemoId})`;(tt=T.current)==null||tt.insertText(Gt),(at=T.current)==null||at.focus(),dt.setMarkMemoId("");return}if((gt=o.editMemoId)!=null&>.trim()&&o.editMemoId!==I.current.editMemoId){const Gt=je.getMemoById(o.editMemoId);if(Gt)switch(m(Gt.thinoType==="JOURNAL"),a.EditorType){case"memos":(Et=T.current)==null||Et.setContent(Gt.content.replace(/ \^\S{6}$/,"")||""),(Tt=T.current)==null||Tt.focus();break;case"obsidian":(qt=T.current)==null||qt.clear(),(zt=T.current)==null||zt.setContent(Gt.content.replace(/ \^\S{6}$/,"")||""),($t=T.current)==null||$t.focus();break}}I.current=o},[o.markMemoId,o.editMemoId]),F.useEffect(()=>{var Re,tt,at;!T.current||k||a.EditorType==="memos"&&((Re=T.current)==null||Re.element.addEventListener("paste",le),(tt=T.current)==null||tt.element.addEventListener("drop",W),(at=T.current)==null||at.element.addEventListener("click",de),A(!0))},[T.current]);const le=async Re=>{var tt;if(Re.clipboardData&&Re.clipboardData.files.length>0){Re.preventDefault();const at=Re.clipboardData.files;for(const gt of at){const Et=await he(gt);Et&&((tt=T.current)==null||tt.insertText(Et))}}},W=async Re=>{var tt;if(Re.dataTransfer&&Re.dataTransfer.files.length>0){Re.preventDefault();const at=Re.dataTransfer.files;for(const gt of at){const Et=await he(gt);Et&&((tt=T.current)==null||tt.insertText(Et))}}},de=()=>{var Re;pe(((Re=T.current)==null?void 0:Re.element.value)||"")},oe=async(Re,tt)=>{var Et,Tt,qt;const at=Re.ctrlKey||Re.metaKey,gt=Re.altKey;if(Re.key==="Escape"&&o.globalEditorShown&&(dt.setGlobalEditorShown(!1),Re.preventDefault()),at&&Re.key==="Enter"){Re.preventDefault(),Re.stopPropagation(),tt?(await K((Tt=T.current)==null?void 0:Tt.getContent()),(qt=T.current)==null||qt.clear()):await K((Et=T.current)==null?void 0:Et.element.value);return}if(gt)for(let zt=0;zt<a.EnabledLocationList.length;zt++)Re.key===(zt+1).toString()&&Q(a.EnabledLocationList[zt].value);setTimeout(()=>{var zt;tt||pe(((zt=T.current)==null?void 0:zt.element.value)||"")})},he=F.useCallback(async Re=>{const{type:tt}=Re;if(tt.startsWith("image"))try{return`${await W1.upload(Re)}`}catch(at){new C.Notice(at)}},[]),K=async Re=>{if(!Re||Re.trim()===""){new C.Notice(E("Content cannot be empty"));return}const tt=yt.getState().settings,at=tt==null?void 0:tt.addTagAutomatically,gt=tt==null?void 0:tt.addTagWithNewline,Et=tt==null?void 0:tt.addTagPosition,qt=(nO()||[]).filter(cn=>!Re.includes(`#${cn}`)),zt=async(cn,Xt)=>{Xt=Xt.replaceAll(" "," "),Ly("");try{if(!cn){let En;switch(ue.current){case"CANVAS":En=await je.createMemoCanvas({text:Xt,isList:g.current});break;case"MULTI":En=await je.createMemoMultiFile({content:Xt,isList:g.current});break;case"DAILY":En=await je.createMemoDaily(Xt,g.current);break;case"FILE":En=await je.createMemoSingleFile({content:Xt,isList:g.current});break}if(!En)return;je.pushMemo(En),(!at||qt.length===0)&&st.clearQuery();const Cr=i||yt.getState().app,yr=Cr==null?void 0:Cr.loadLocalStorage("tokenForSync");En&&yr&&a.startSync&&setTimeout(async()=>{try{if(ue.current!=="DAILY"){const Rn=await M1({content:Xt,thinoType:"FILE"});await je.updateMemoById(En.id,Rn,!0)}}catch(Rn){console.error(Rn)}},200);return}const Qn=je.getMemoById(cn);if(Qn&&(Qn.content!==Xt||Qn.thinoType!==(g.current?"JOURNAL":"TASK-TODO"))){const En=await je.updateMemo(Qn.id,Xt,g.current?"JOURNAL":Qn.thinoType.startsWith("TASK")?Qn.thinoType:"TASK-TODO");En.updatedAt=ut.getDateTimeString(Date.now()),je.editMemo(En)}dt.setEditMemoId("")}catch(Qn){new C.Notice(Qn.message)}},{editMemoId:$t}=dt.getState(),Gt=qt&&qt.length>0&&at?Et==="Beginning"?`${qt.map(cn=>`#${cn}`).join(" ")} ${gt?`
|
|
|
`:""}${Re}`:`${Re} ${gt?`
|
|
|
`:""}${qt.map(cn=>`#${cn}`).join(" ")}`:Re;await zt($t,Gt),n&&n(),Ly("")},re=F.useCallback(()=>{var Re;dt.setEditMemoId(""),(Re=T.current)==null||Re.setContent(""),Ly("")},[]),pe=F.useCallback(Re=>{if(Ly(Re??""),!T.current)return;const tt=T.current.getContent(),at=T.current.element.selectionStart,gt=tt.slice(0,at),Et=tt.slice(at);(gt.endsWith("@")||gt.endsWith("📆"))&&Et.startsWith(" ")||(gt.endsWith("@")||gt.endsWith("📆"))&&Et===""?(ze(),j(!0)):j(!1),setTimeout(()=>{var Tt;(Tt=T.current)==null||Tt.focus()})},[a.EditorType]),Ie=Re=>{if(!T.current||!a)return;Re&&(ee(),m(!1));const tt=T.current.getContent(),at=T.current.element.selectionStart,gt=tt.slice(0,at),Et=tt.slice(at),Tt=C.moment(Re);if(gt.endsWith("@"))switch(a.InsertDateFormat){case"Dataview":T.current.element.value=tt.slice(0,T.current.element.selectionStart-1)+"[due::"+Tt.format("YYYY-MM-DD")+"]"+Et,T.current.element.setSelectionRange(at+17,at+17),T.current.focus(),pe(T.current.element.value);break;case"Tasks":T.current.element.value=tt.slice(0,T.current.element.selectionStart-1)+"📆"+Tt.format("YYYY-MM-DD")+Et,T.current.element.setSelectionRange(at+11,at+11),T.current.focus(),pe(T.current.element.value)}else{T.current.element.value=gt+Tt.format("YYYY-MM-DD")+Et,T.current.element.setSelectionRange(at+10,at+10),T.current.focus(),pe(T.current.element.value);return}},Oe=()=>{T.current&&m()},Ne=async()=>{var at;const Re=!C.Platform.isDesktop&&await((at=window.Capacitor)==null?void 0:at.Plugins.Device.getId()),tt=C.Platform.isDesktop?await Jn():Re.identifier||Re.uuid;return!d||(d==null?void 0:d.appId)!==tt?(Fn(),!1):!0},Be=async Re=>{if(!await Ne())return;const tt=new C.Menu;a.EnabledLocationList.forEach(Tt=>{tt.addItem(qt=>{var zt;qt.setTitle(E(Tt.value)).setIcon(((zt=km.find($t=>$t.title===Tt.value))==null?void 0:zt.icon)??"file").setChecked(te===Tt.value).onClick(()=>{Q(Tt.value)})})});let at=Re.target,gt=null;for(;!at.hasClass("location-wrapper")&&(gt=at.parentElement,gt);)at=gt;const Et=at.getBoundingClientRect();setTimeout(()=>{tt.showAtPosition({x:Et.x,y:Et.bottom,width:Et.width,left:!1,overlap:!0})},200)},Je=F.useCallback(()=>{var Re,tt;if(!(!T.current&&a.EditorType==="memos"))switch(a.EditorType){case"obsidian":(Re=T.current)==null||Re.focus(),(tt=T.current)==null||tt.insertTag();break;case"memos":{const at=T.current.getContent(),gt=T.current.element.selectionStart,Et=at.slice(0,gt),Tt=at.slice(gt);let qt=Et+"# "+Tt,zt=Et.length+1;Et.endsWith("#")&&Tt.startsWith(" ")&&(qt=Et.slice(0,Et.length-1)+Tt.slice(1),zt=Et.length-1),T.current.element.value=qt,T.current.element.setSelectionRange(zt,zt),T.current.focus();const $t=new Event("input",{bubbles:!0,cancelable:!0});T.current.element.dispatchEvent($t),pe(T.current.element.value)}}},[i]),ze=F.useCallback(()=>{if(!T.current||!L.current||!a||!i)return;const at=i.workspace.getLeavesOfType(Bo)[0].view.containerEl,gt=280,Et=at.clientWidth,{x:Tt,y:qt}=rO(T.current.element);let zt,$t;C.Platform.isMobile?(window.innerWidth-Tt>gt?zt=(Tt+gt+16>Et,Tt+18):window.innerWidth-Tt<gt?zt=(Tt+gt+16>Et,Tt+34):zt=T.current.element.clientWidth/2,a.DefaultEditorLocation==="Bottom"&&window.innerWidth>875?$t=qt+4:a.DefaultEditorLocation==="Bottom"&&window.innerWidth<=875?$t=qt+19:a.DefaultEditorLocation==="Top"&&window.innerWidth<=875&&($t=qt+36)):(zt=(Tt+gt+16>Et,Tt+18),$t=qt+34),B(Tt),L.current.style.left=`${zt}px`,L.current.style.top=`${$t}px`},[a,i]),Qe=F.useCallback(()=>{const Re=document.createElement("input");document.body.appendChild(Re),Re.type="file",Re.multiple=!1,Re.accept="image/png, image/gif, image/jpeg",Re.onchange=async()=>{var gt;if(!Re.files||Re.files.length===0)return;const tt=Re.files[0],at=await he(tt);at&&((gt=T.current)==null||gt.insertText(at)),document.body.removeChild(Re)},Re.click()},[]),It=!!o.editMemoId,Zt=F.useMemo(()=>({className:"memo-editor",inputerType:a.EditorType||"obsidian",modal:r,initialContent:oO(),placeholder:E("What do you think now..."),showConfirmBtn:!0,showCancelBtn:It,showTools:!0,onConfirmBtnClick:K,onCancelBtnClick:re,onContentChange:pe}),[It,a.EditorType]);return y.jsxs(y.Fragment,{children:[!o.globalEditorShown&&t==="block"&&y.jsx("div",{ref:Re=>{D.current=Re,Re&&C.setIcon&&C.setIcon(Re,"plus-circle")},className:`memo-show-editor-button ${v?"hidden":""}`,onClick:()=>{var Re;(Re=D.current.firstElementChild)==null||Re.toggleClass("rotate-hidden",!0),setTimeout(()=>{w(!0),D.current.firstElementChild.toggleClass("rotate-hidden",!1)},500),setTimeout(()=>{var tt;(tt=T.current)==null||tt.focus()},600)}}),y.jsxs("div",{className:`memo-editor-wrapper ${e||""} ${It?"edit-ing":""} ${o.globalEditorShown?"fullscreen-editor":""} ${v?"":"hidden"}`,onKeyDownCapture:Re=>oe(Re,!0),children:[y.jsx("span",{className:`tip-text ${It?"":"hidden"}`,children:"Modifying..."}),y.jsx(V5,{ref:T,...Zt,tools:y.jsxs(y.Fragment,{children:[y.jsx("span",{ref:Re=>{Re&&C.setIcon(Re,"hash")},className:"btn action-btn add-tag",onClick:()=>{a&&a.DefaultEditorLocation==="Top"&&!o.globalEditorShown&&Je()},onPointerDown:()=>{(a&&a.DefaultEditorLocation==="Bottom"||o.globalEditorShown)&&Je()}}),y.jsx("span",{ref:Re=>{Re&&C.setIcon(Re,"paperclip")},className:"btn action-btn file-upload",onClick:()=>{a&&a.DefaultEditorLocation==="Top"&&!o.globalEditorShown&&Qe()},onPointerDown:()=>{(a&&a.DefaultEditorLocation==="Bottom"||o.globalEditorShown)&&Qe()}}),y.jsx("span",{ref:Re=>{Re&&C.setIcon(Re,f?"layout-list":"check-square")},className:Kn("btn action-btn list-or-task",f?"list":"task"),onClick:()=>{a&&a.DefaultEditorLocation==="Top"&&!o.globalEditorShown&&Oe()},onPointerDown:()=>{(a&&a.DefaultEditorLocation==="Bottom"||o.globalEditorShown)&&Oe()}}),y.jsx("div",{ref:Re=>{Re&&(C.setIcon&&C.setIcon(Re,o.globalEditorShown?"shrink":"expand"),C.setTooltip&&C.setTooltip(Re,o.globalEditorShown?E("Exit fullscreen mode"):E("Enter fullscreen mode")))},className:"action-btn show-editor pro",onPointerDown:async()=>{await Ne()&&(w(!0),dt.setGlobalEditorShown(!o.globalEditorShown))}}),y.jsx("div",{className:"action-btn split-line pro"}),y.jsx("div",{className:"action-btn location-wrapper pro",onClick:async Re=>{a&&a.DefaultEditorLocation==="Top"&&!o.globalEditorShown&&await Be(Re)},onPointerDown:async Re=>{(a&&a.DefaultEditorLocation==="Bottom"||o.globalEditorShown)&&await Be(Re)},children:y.jsx("div",{ref:$,className:"action-btn file-location-btn"})})]})}),y.jsx("div",{ref:L,className:"date-picker",children:R&&y.jsx("div",{tabIndex:-1,style:U.styles.popper,...U.attributes.popper,ref:Z,role:"dialog",children:y.jsx(f0,{className:`editor-date-picker ${R?"":"hidden"}`,datestamp:z,handleDateStampChange:Ie})})})]})]})};function oO(){return Wr.get(["thinoEditorContentCache"]).thinoEditorContentCache??""}function Ly(e){Wr.set({thinoEditorContentCache:e})}const iO=e=>{const t=[];return e.map(n=>{t.length==0?t.push({date:C.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),have:[n]}):t.some(o=>{if(o.date==C.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"))return o.have.push(n),!0})||t.push({date:C.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),have:[n]})}),t},aO=e=>je.getState().commentMemos.filter(t=>t.linkId===e.hasId).sort((t,n)=>ut.getTimeStampByDate(t.createdAt)-ut.getTimeStampByDate(n.createdAt)).map(t=>({...t,createdAtStr:ut.getDateTimeString(t.createdAt),dateStr:ut.getDateString(t.createdAt)})),sO=e=>{const t=yt.getState().settings,n=u6(),r=t!=null&&t.ShowDate?" ":"",o="YYYY/MM/DD HH:mm:ss",i=/comment:(.*)$/g,a=/^\d{14}/g,u=(g,v,w)=>{const D=C.moment(g.createdAt,o).format("HH:mm");return w?w.replace(/{TIME}/g,D).replace(/{CONTENT}/g,v):`${D} ${v}`},d=g=>{const v=g.match(/TASK-(.*)?/g);return v?v[1]:""},f=g=>g==="TASK-TODO"?"- [ ] ":g==="TASK-DONE"?"- [x] ":g.match(/TASK-(.*)?/g)?`- [${d(g)}] `:"- ",m=g=>g.reduce((v,w)=>{const D=w.sourceType!=="MULTI"?`${w.content}`:`[[${w.path}]]`,T=t!=null&&t.ShowTime?u(w,D,t==null?void 0:t.DefaultMemoComposition):D,I=`${f(w.thinoType)}${T}`;let k="";return t.CommentOnMemos&&w.hasId!==void 0&&w.hasId!==""&&(k=aO(w).reduce((R,j)=>{const B=f(j.thinoType),L=j.content.replace(i,"").replace(a,""),Z=t!=null&&t.ShowDate?`${B}[[${C.moment(j.createdAt).format(n)}]] ${C.moment(j.createdAt).format("HH:mm")} ${L}`:`${B}${L}`;return R+r+" "+Z+`
|
|
|
`},"")),v+r+I.replace(/ \^\S{6}/g,"")+`
|
|
|
`+k},"");return e.reduce((g,v)=>{const w=t!=null&&t.ShowDate?`- [[${C.moment(v.date,"YYYY-MM-DD").format(n)}]]
|
|
|
`:"",D=m(v.have),T=t!=null&&t.ShowDate&&(t!=null&&t.AddBlankLineWhenDate)&&!(t!=null&&t.CommentOnMemos)?`
|
|
|
`:"";return g+w+D+T},"").replace(/<br>/g,`
|
|
|
`)},lO=[{label:E("Today"),value:C.moment().format("YYYY-MM-DD")},{label:E("Yesterday"),value:C.moment().subtract(1,"days").format("YYYY-MM-DD")},{label:E("Last 7 days"),value:C.moment().subtract(7,"days").format("YYYY-MM-DD")},{label:E("Last 30 days"),value:C.moment().subtract(30,"days").format("YYYY-MM-DD")},{label:E("Last 90 days"),value:C.moment().subtract(90,"days").format("YYYY-MM-DD")},{label:E("Last 180 days"),value:C.moment().subtract(180,"days").format("YYYY-MM-DD")},{label:E("Last 365 days"),value:C.moment().subtract(365,"days").format("YYYY-MM-DD")}],pC=e=>{const{handleValueChange:t,setShownStatus:n}=e;return y.jsxs(y.Fragment,{children:[e.type==="icon"&&y.jsx("div",{className:"quick-date-btn-group",children:lO.map((r,o)=>y.jsx("div",{className:"btn action-btn quick-date-btn",onClick:()=>{t(r.value),n&&n(!1)},children:r.label},o))}),y.jsx(f0,{className:"calendar-date-picker",datestamp:(e==null?void 0:e.defaultValue)||C.moment().startOf("day").valueOf(),handleDateStampChange:(r,o)=>{t(e.type==="icon"?C.moment(r).format("YYYY-MM-DD"):r.toString()),n&&n(!1)}})]})},Cv=e=>{const{handleValueChange:t}=e,[n,r]=se.useState(!1),o=se.useRef(null),i=se.useRef(null),a=p0(i.current,o.current,{placement:"bottom-start"});return cg(o,()=>{r(!1)}),y.jsxs(y.Fragment,{children:[y.jsx("span",{ref:d=>{i.current=d,d&&e.type==="icon"&&C.setIcon(d,"calendar")},className:`btn calendar-btn ${e.type==="icon"?"icon-btn":"text-btn"}`,onClick:()=>{!C.Platform.isMobile&&r(!n),!C.Platform.isMobile&&(a!=null&&a.update)&&(a==null||a.update()),C.Platform.isMobile&&new mC(yt.getState().app,e.type,t).open()},children:e.type==="text"&&e.defaultValue?e.defaultText?e.defaultText:C.moment(e.defaultValue,"x").subtract(e.startOrEnd==="end"?1:0,"days").format("YYYY/MM/DD"):""}),y.jsx("div",{className:`menu-btns-popup ${n?"":"hidden"}`,ref:o,style:a.styles.popper,children:y.jsx(pC,{type:e.defaultText?"icon":e.type,handleValueChange:t,setShownStatus:r})})]})};class mC extends C.Modal{constructor(n,r,o){super(n);De(this,"root");De(this,"type");De(this,"handleValueChange");this.type=r,this.handleValueChange=o}onOpen(){const{contentEl:n}=this;this.root=sg(n),this.root.render(y.jsx(pC,{type:this.type,handleValueChange:this.handleValueChange.bind(this),setShownStatus:r=>{!r&&this.close()}}))}onClose(){var n;(n=this.root)==null||n.unmount()}}const uO=(e,t)=>(e%t+t)%t;class cO{constructor(t,n,r){De(this,"owner");De(this,"values");De(this,"suggestions");De(this,"selectedItem");De(this,"containerEl");this.owner=t,this.containerEl=n,n.on("click",".suggestion-item",this.onSuggestionClick.bind(this)),n.on("mousemove",".suggestion-item",this.onSuggestionMouseover.bind(this)),r.register([],"ArrowUp",o=>{if(!o.isComposing)return this.setSelectedItem(this.selectedItem-1,!0),!1}),r.register([],"ArrowDown",o=>{if(!o.isComposing)return this.setSelectedItem(this.selectedItem+1,!0),!1}),r.register([],"Enter",o=>{if(!o.isComposing)return this.useSelectedItem(o),!1})}onSuggestionClick(t,n){t.preventDefault();const r=this.suggestions.indexOf(n);this.setSelectedItem(r,!1),this.useSelectedItem(t)}onSuggestionMouseover(t,n){const r=this.suggestions.indexOf(n);this.setSelectedItem(r,!1)}setSuggestions(t){this.containerEl.empty();const n=[];t.forEach(r=>{const o=this.containerEl.createDiv("suggestion-item");this.owner.renderSuggestion(r,o),n.push(o)}),this.values=t,this.suggestions=n,this.setSelectedItem(0,!1)}useSelectedItem(t){const n=this.values[this.selectedItem];n&&this.owner.selectSuggestion(n,t)}setSelectedItem(t,n){const r=uO(t,this.suggestions.length),o=this.suggestions[this.selectedItem],i=this.suggestions[r];o==null||o.removeClass("is-selected"),i==null||i.addClass("is-selected"),this.selectedItem=r,n&&i.scrollIntoView(!1)}}class gC{constructor(t,n){De(this,"inputEl");De(this,"popper");De(this,"scope");De(this,"suggestEl");De(this,"suggest");De(this,"cb");this.inputEl=t,this.scope=new C.Scope,this.cb=n,this.suggestEl=createDiv("suggestion-container");const r=this.suggestEl.createDiv("suggestion");this.suggest=new cO(this,r,this.scope),this.scope.register([],"Escape",this.close.bind(this)),this.inputEl.addEventListener("input",this.onInputChanged.bind(this)),this.inputEl.addEventListener("focus",this.onInputChanged.bind(this)),this.inputEl.addEventListener("click",this.onInputChanged.bind(this)),this.inputEl.addEventListener("blur",this.close.bind(this)),this.suggestEl.on("mousedown",".suggestion-container",o=>{o.preventDefault()})}clearInput(){this.inputEl.value="",this.inputEl.trigger("blur"),this.inputEl.trigger("focus"),this.inputEl.trigger("input"),this.onInputChanged()}onInputChanged(){const t=this.inputEl.value,n=this.getSuggestions(t);if(!n){this.close();return}n.length>0?(this.suggest.setSuggestions(n),this.open(app.dom.appContainerEl,this.inputEl)):this.close()}open(t,n){app.keymap.pushScope(this.scope),t.appendChild(this.suggestEl),this.popper=hC(n,this.suggestEl,{placement:"bottom-start",modifiers:[{name:"sameWidth",enabled:!0,fn:({state:r,instance:o})=>{const i=`${r.rects.reference.width}px`;r.styles.popper.width!==i&&(r.styles.popper.width=i,o.update())},phase:"beforeWrite",requires:["computeStyles"]}]})}close(){app.keymap.popScope(this.scope),this.suggest.setSuggestions([]),this.popper&&this.popper.destroy(),this.suggestEl.detach()}destroy(){this.inputEl.removeEventListener("input",this.onInputChanged.bind(this)),this.inputEl.removeEventListener("focus",this.onInputChanged.bind(this)),this.inputEl.removeEventListener("blur",this.close.bind(this)),this.close()}updateCb(t){this.cb=t}}const dO=e=>{const t=e.metadataCache.getTags();return[...Object.keys(t)].map(n=>n.split("#").pop())};let Pm=class extends gC{fuzzySearchItemsOptimized(t,n){const r=C.prepareFuzzySearch(t);return n.map(o=>{const i=r(o);return i?{item:o,match:i,score:i.score}:null}).sort((o,i)=>(i==null?void 0:i.score)-(o==null?void 0:o.score)).filter(Boolean)}getSuggestions(t){const{settings:n,app:r}=yt.getState(),o=t.toLocaleLowerCase(),i=n.UseVaultTags?dO(r):je.getState().tags;return this.fuzzySearchItemsOptimized(o,i).map(a=>a.item)}renderSuggestion(t,n){n.toggleClass("thino-image-suggest-item",!0),n.createSpan({cls:"suggestion-name",text:t})}selectSuggestion(t){this.inputEl.value=t,this.cb&&this.cb(t),this.inputEl.dispatchEvent(new Event("change")),this.inputEl.trigger("change"),this.close()}};const fO=e=>{const t=new Set;return e.forEach(n=>{const r=new RegExp(gr).exec(n.content),o=new RegExp(jr).exec(n.content);if(r)for(let i=1;i<r.length;i++)t.add(r[i]);if(o)for(let i=1;i<o.length;i++)t.add(o[i])}),Array.from(t)};class hO extends C.Modal{constructor(n,r){super(n);De(this,"root");De(this,"cb");De(this,"tags",[]);this.cb=r}onOpen(){super.onOpen(),this.containerEl.toggleClass(["thino-bulk-action-dialog","tag-actions"],!0),this.root=Pa.createRoot(this.contentEl),this.root.render(y.jsx(Ra,{store:_e,context:Ot,children:y.jsx(pO,{closeDialog:this.closeDialog.bind(this)})}))}closeDialog(n){this.tags=n,this.close()}onClose(){var n;this.cb(this.tags),super.onClose(),(n=this.root)==null||n.unmount()}}const pO=({closeDialog:e})=>{const[t,n]=se.useState([]),r=se.useRef(null),o=se.useRef(null);F.useEffect(()=>{if(o.current){if(r.current){r.current.updateCb(i);return}r.current=new Pm(o.current,i)}},[o.current,t]);const i=u=>{if(!u)return;const d=new Set(t);d.add(u),n(Array.from(d)),r.current.clearInput()},a=()=>{e(t)};return y.jsxs("div",{className:"thino-tag-operation",children:[y.jsx("div",{className:"tag-operation-title",children:E("Tag Bulk Select")}),y.jsxs("div",{className:"tag-operation-content",children:[y.jsxs("div",{className:"tag-operation-content-title selected-tags",children:[y.jsx("div",{className:"name",children:E("Selected Tags")}),y.jsx("div",{className:"desc",children:E("Click to remove selected tag")})]}),y.jsx("div",{className:"tag-operation-content-tags selected-tags",children:t.map(u=>y.jsx("div",{className:"tag-operation-content-tag",onClick:()=>{n(t.filter(d=>d!==u))},children:u},u))}),y.jsx("div",{className:"tag-operation-content-inputer",children:y.jsx("input",{placeholder:E("Input to select exist tag"),ref:o,onKeyDown:u=>{u.key==="Enter"&&i(o.current.value)}})}),y.jsxs("div",{className:"tag-operation-content-btn-group",children:[y.jsx("button",{className:"cancel-btn",onClick:()=>{e([])},children:E("Cancel")}),y.jsx("button",{className:"save-btn",onClick:a,children:E("Save")})]})]})]})},mO=({app:e,thinos:t,closeDialog:n})=>{const[r,o]=se.useState([]),[i,a]=se.useState([]),[u,d]=se.useState([]),f=se.useRef(null),m=se.useRef(null),g=se.useRef(null),v=se.useRef("End"),w=se.useRef(!1),D=se.useRef(null);F.useEffect(()=>{t&&t.length&&o(fO(t))},[t]),F.useEffect(()=>{!g.current||!m.current||(new C.Setting(m.current).setName(E("Add tag position")).addDropdown(A=>{A.addOption("End",E("End")),A.addOption("Beginning",E("Beginning")),A.setValue("End").onChange(async R=>{v.current=R})}),new C.Setting(g.current).setName(E("Add tag with new line")).addToggle(A=>{A.setValue(!1).onChange(async R=>{w.current=R})}))},[]);const T=A=>{if(!A)return;const R=new Set(i);R.add(A),a(Array.from(R)),f.current.clearInput()};F.useEffect(()=>{if(D.current){if(f.current){f.current.updateCb(T);return}f.current=new Pm(D.current,T)}},[D.current,i]);const I=()=>{n(),k({remove:u,add:i,targetThinos:t})},k=async({remove:A,add:R,targetThinos:j})=>{const B=w.current||!1,L=[];for(const Z of j){let U=Z.content;for(const z of A)U=U.replace(new RegExp(`#${z}`,"g"),"");if(U=U.trim(),R.length>0&&(U=v.current==="Beginning"?`${R.map(z=>`#${z}`).join(" ")} ${B?`
|
|
|
`:""}${U}`:`${U} ${B?`
|
|
|
`:""}${R.map(z=>`#${z}`).join(" ")}`),Z&&Z.content!==U){const z=await je.updateMemo(Z.id,U==null?void 0:U.trim());L.push(z)}}L.length>0&&je.editMemoBulk(L),L.length>0&&st.clearQuery()};return y.jsxs("div",{className:"thino-tag-operation",children:[y.jsx("div",{className:"tag-operation-title",children:E("Tag Bulk Edit")}),y.jsxs("div",{className:"tag-operation-content",children:[r.length>0&&y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"tag-operation-content-title exist-tags",children:[y.jsx("div",{className:"name",children:E("Exist Tags")}),y.jsx("div",{className:"desc",children:E("Click to remove exist tag")})]}),y.jsx("div",{className:"tag-operation-content-tags exist-tags",children:r.map(A=>y.jsx("div",{className:Kn("tag-operation-content-tag",u.includes(A)&&"tag-operation-content-tag-removed"),onClick:()=>{u.includes(A)||d([...u,A]),u.includes(A)&&d(u.filter(R=>R!==A)),i.includes(A)&&a(i.filter(R=>R!==A))},children:A},A))})]}),y.jsxs("div",{className:"tag-operation-content-title selected-tags",children:[y.jsx("div",{className:"name",children:E("Selected Tags")}),y.jsx("div",{className:"desc",children:E("Click to remove selected tag")})]}),y.jsx("div",{className:"tag-operation-content-tags selected-tags",children:i.map(A=>y.jsx("div",{className:"tag-operation-content-tag",onClick:()=>{a(i.filter(R=>R!==A))},children:A},A))}),y.jsx("div",{className:"tag-operation-content-inputer",children:y.jsx("input",{placeholder:E("Input to select exist tag"),ref:D,onKeyDown:A=>{A.key==="Enter"&&T(D.current.value)}})}),y.jsxs("div",{className:"tag-operation-settings",children:[y.jsx("div",{ref:m}),y.jsx("div",{ref:g})]}),y.jsxs("div",{className:"tag-operation-content-btn-group",children:[y.jsx("button",{className:"cancel-btn",onClick:n,children:E("Cancel")}),y.jsx("button",{className:"save-btn",onClick:I,children:E("Save")})]})]})]})},qb=new Map,Id=async(e,t=!0)=>{const{vault:n,metadataCache:r}=yt.getState().app;if(t&&qb.has(e))return Promise.resolve(qb.get(e));if(e.contains("data:image"))return e;let o;const i=await n.adapter.exists(C.normalizePath(e));let a="";try{if(!i&&!/(http|https)/g.test(e)&&!e.includes("data:image")){let u;if(e.startsWith("app://")){const d=C.normalizePath(decodeURIComponent(e).replace(C.Platform.resourcePathPrefix,"").replace(/\?(.*)$/,"").replace(C.normalizePath(app==null?void 0:app.vault.adapter.basePath),""));a=C.normalizePath(decodeURIComponent(d))}else{if(u=r.getFirstLinkpathDest(e,""),!u){new C.Notice(E("File not exist"));return}a=u.path}}else a=e}catch(u){console.error(u)}if(a){if(/(http|https)/g.test(a))if(a.startsWith("http://localhost")){let u=a;u=u.replace("http://localhost/_capacitor_file_",""),u=decodeURIComponent(u).replace(/\?(.*)$/,"").replace(app==null?void 0:app.vault.adapter.basePath,""),u=C.normalizePath(decodeURIComponent(u));const d=await n.adapter.readBinary(u),f=new Uint8Array(d);o=new Blob([f],{type:"image/png"})}else try{const u=await C.requestUrl(e),d=new Uint8Array(u.arrayBuffer);o=new Blob([d],{type:"image/png"})}catch{}else if(a){const u=await n.adapter.readBinary(a),d=new Uint8Array(u);o=new Blob([d],{type:"image/png"})}return o?await gO(o,e):""}},gO=(e,t)=>new Promise(n=>{const r=new FileReader;r.onloadend=()=>{const o=r.result;qb.set(t,o),n(o)},r.readAsDataURL(e)}),gm=async e=>{if(!e.style.backgroundImage.includes("url(")&&!e.style.backgroundImage.includes("http"))return;let t=e.style.backgroundImage.includes("url(")?e.style.backgroundImage.slice(5,-2):e.style.backgroundImage;return t?(t.startsWith("http://localhost")&&(t=t.replace("http://localhost/_capacitor_file_",""),t=decodeURIComponent(t).replace(/\?(.*)$/,"").replace(app==null?void 0:app.vault.adapter.basePath,""),t=C.normalizePath(decodeURIComponent(t))),await Id(t)):void 0},yO=async e=>{var n;return e.getAttribute("src")?(n=e==null?void 0:e.src)!=null&&n.startsWith("http://localhost")?await Id(e.getAttribute("path")||C.normalizePath(e==null?void 0:e.parentElement.getAttribute("src"))):await Id(e.getAttribute("src")):void 0},Ut=CO(),Mv=MO(),yC=kO(),vC=NO(),ld={copyDefaultStyles:!0,imagePlaceholder:void 0,cacheBust:!1,useCredentials:!1,httpTimeout:3e4,styleCaching:"strict",corsImg:void 0},dn={toSvg:wC,toPng:bO,toJpeg:SO,toBlob:DO,toPixelData:wO,toCanvas:TO,impl:{fontFaces:yC,images:vC,util:Ut,inliner:Mv,urlCache:[],options:{}}},nS=(typeof Node<"u"?Node.ELEMENT_NODE:void 0)||1,lv=(typeof global<"u"?global.getComputedStyle:void 0)||(typeof window<"u"?window.getComputedStyle:void 0)||globalThis.getComputedStyle,vO=(typeof global<"u"?global.atob:void 0)||(typeof window<"u"?window.atob:void 0)||globalThis.atob;function wC(e,t){dn.impl.util.getWindow(e),t=t||{},IO(t);let n=[];return Promise.resolve(e).then(r).then(function(d){return bC(d,t,null)}).then(xO).then(EO).then(a).then(u).then(o).then(i);function r(d){if(d.nodeType===nS)return d;const f=d,m=d.parentNode,g=document.createElement("span");return m.replaceChild(g,f),g.append(d),n.push({parent:m,child:f,wrapper:g}),g}function o(d){for(;n.length>0;){const f=n.pop();f.parent.replaceChild(f.child,f.wrapper)}return d}function i(d){return dn.impl.urlCache=[],LO(),d}function a(d){t.bgcolor&&(d.style.backgroundColor=t.bgcolor),t.width&&(d.style.width=`${t.width}px`),t.height&&(d.style.height=`${t.height}px`),t.style&&Object.keys(t.style).forEach(function(m){d.style[m]=t.style[m]});let f=null;return typeof t.onclone=="function"&&(f=t.onclone(d)),Promise.resolve(f).then(function(){return d})}function u(d){let f=t.width||Ut.width(d),m=t.height||Ut.height(d);return Promise.resolve(d).then(function(g){return g.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(g)}).then(Ut.escapeXhtml).then(function(g){const v=(Ut.isDimensionMissing(f)?' width="100%"':` width="${f}"`)+(Ut.isDimensionMissing(m)?' height="100%"':` height="${m}"`);return`<svg xmlns="http://www.w3.org/2000/svg"${(Ut.isDimensionMissing(f)?"":` width="${f}"`)+(Ut.isDimensionMissing(m)?"":` height="${m}"`)}><foreignObject${v}>${g}</foreignObject></svg>`}).then(function(g){return`data:image/svg+xml;charset=utf-8,${g}`})}}function wO(e,t){return hg(e,t).then(function(n){return n.getContext("2d").getImageData(0,0,Ut.width(e),Ut.height(e)).data})}function bO(e,t){return hg(e,t).then(function(n){return n.toDataURL()})}function SO(e,t){return hg(e,t).then(function(n){return n.toDataURL("image/jpeg",(t?t.quality:void 0)||1)})}function DO(e,t){return hg(e,t).then(Ut.canvasToBlob)}function TO(e,t){return hg(e,t)}function IO(e){typeof e.copyDefaultStyles>"u"?dn.impl.options.copyDefaultStyles=ld.copyDefaultStyles:dn.impl.options.copyDefaultStyles=e.copyDefaultStyles,typeof e.imagePlaceholder>"u"?dn.impl.options.imagePlaceholder=ld.imagePlaceholder:dn.impl.options.imagePlaceholder=e.imagePlaceholder,typeof e.cacheBust>"u"?dn.impl.options.cacheBust=ld.cacheBust:dn.impl.options.cacheBust=e.cacheBust,typeof e.corsImg>"u"?dn.impl.options.corsImg=ld.corsImg:dn.impl.options.corsImg=e.corsImg,typeof e.useCredentials>"u"?dn.impl.options.useCredentials=ld.useCredentials:dn.impl.options.useCredentials=e.useCredentials,typeof e.httpTimeout>"u"?dn.impl.options.httpTimeout=ld.httpTimeout:dn.impl.options.httpTimeout=e.httpTimeout,typeof e.styleCaching>"u"?dn.impl.options.styleCaching=ld.styleCaching:dn.impl.options.styleCaching=e.styleCaching,dn.impl.options.requestUrl=e.requestUrl,dn.impl.options.type=e.type||"image/png"}function hg(e,t){return t=t||{},wC(e,t).then(Ut.makeImage).then(function(r){const o=typeof t.scale!="number"?1:t.scale,i=n(e,o),a=i.getContext("2d");return a.msImageSmoothingEnabled=!1,a.imageSmoothingEnabled=!1,r&&(a.scale(o,o),a.drawImage(r,0,0)),i});function n(r,o){let i=t.width||Ut.width(r),a=t.height||Ut.height(r);Ut.isDimensionMissing(i)&&(i=Ut.isDimensionMissing(a)?300:a*2),Ut.isDimensionMissing(a)&&(a=i/2);const u=document.createElement("canvas");if(u.width=i*o,u.height=a*o,t.bgcolor){const d=u.getContext("2d");d.fillStyle=t.bgcolor,d.fillRect(0,0,u.width,u.height)}return u}}let ra=null;function bC(e,t,n,r){const o=t.filter;if(e===ra||Ut.isHTMLScriptElement(e)||Ut.isHTMLStyleElement(e)||Ut.isHTMLLinkElement(e)||n!==null&&o&&!o(e))return Promise.resolve();return Promise.resolve(e).then(i).then(function(f){return u(f,a(e))}).then(function(f){return d(f,e)});function i(f){return Ut.isHTMLCanvasElement(f)?Ut.makeImage(f.toDataURL()):f.cloneNode(!1)}function a(f){return Ut.isElementHostForOpenShadowRoot(f)?f.shadowRoot:f}function u(f,m){const g=D(m);let v=Promise.resolve();if(g.length!==0){const T=lv(w(m));Ut.asArray(g).forEach(function(I){v=v.then(function(){return bC(I,t,T).then(function(k){k&&f.appendChild(k)})})})}return v.then(function(){return f});function w(T){return Ut.isShadowRoot(T)?T.host:T}function D(T){return Ut.isShadowSlotElement(T)?T.assignedNodes():T.childNodes}}function d(f,m){if(!Ut.isElement(f)||Ut.isShadowSlotElement(m))return Promise.resolve(f);return Promise.resolve().then(g).then(v).then(w).then(D).then(function(){return f});function g(){I(m,f);function T(k,A){A.font=k.font,A.fontFamily=k.fontFamily,A.fontFeatureSettings=k.fontFeatureSettings,A.fontKerning=k.fontKerning,A.fontSize=k.fontSize,A.fontStretch=k.fontStretch,A.fontStyle=k.fontStyle,A.fontVariant=k.fontVariant,A.fontVariantCaps=k.fontVariantCaps,A.fontVariantEastAsian=k.fontVariantEastAsian,A.fontVariantLigatures=k.fontVariantLigatures,A.fontVariantNumeric=k.fontVariantNumeric,A.fontVariationSettings=k.fontVariationSettings,A.fontWeight=k.fontWeight}function I(k,A){const R=lv(k);R.cssText?(A.style.cssText=R.cssText,T(R,A.style)):(FO(t,k,R,n,A),n===null&&(["inset-block","inset-block-start","inset-block-end"].forEach(j=>A.style.removeProperty(j)),["left","right","top","bottom"].forEach(j=>{A.style.getPropertyValue(j)&&A.style.setProperty(j,"0px")})))}}function v(){const T=Ut.uid();[":before",":after"].forEach(function(k){I(k)});function I(k){const A=lv(m,k),R=A.getPropertyValue("content");if(R===""||R==="none")return;const j=f.getAttribute("class")||"";f.setAttribute("class",`${j} ${T}`);const B=document.createElement("style");B.appendChild(L()),f.appendChild(B);function L(){const Z=`.${T}:${k}`,U=A.cssText?z():$();return document.createTextNode(`${Z}{${U}}`);function z(){return`${A.cssText} content: ${R};`}function $(){return`${Ut.asArray(A).map(Q).join("; ")};`;function Q(ue){const ee=A.getPropertyValue(ue),le=A.getPropertyPriority(ue)?" !important":"";return`${ue}: ${ee}${le}`}}}}}function w(){Ut.isHTMLTextAreaElement(m)&&(f.innerHTML=m.value),Ut.isHTMLInputElement(m)&&f.setAttribute("value",m.value)}function D(){Ut.isSVGElement(f)&&(f.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ut.isSVGRectElement(f)&&["width","height"].forEach(function(T){const I=f.getAttribute(T);I&&f.style.setProperty(T,I)}))}}}function xO(e){return yC.resolveAll().then(function(t){if(t!==""){const n=document.createElement("style");e.appendChild(n),n.appendChild(document.createTextNode(t))}return e})}function EO(e){return vC.inlineAll(e).then(function(){return e})}function CO(){let e=0;return{escape:z,isDataUrl:k,canvasToBlob:j,resolveUrl:B,getAndEncode:U,uid:L,delay:$,asArray:te,escapeXhtml:Q,makeImage:Z,width:ue,height:ee,getWindow:t,isElement:i,isElementHostForOpenShadowRoot:n,isShadowRoot:r,isInShadowRoot:o,isHTMLElement:u,isHTMLCanvasElement:a,isHTMLInputElement:f,isHTMLImageElement:d,isHTMLLinkElement:m,isHTMLScriptElement:g,isHTMLStyleElement:v,isHTMLTextAreaElement:w,isShadowSlotElement:D,isSVGElement:T,isSVGRectElement:I,isDimensionMissing:A};function t(W){const de=W?W.ownerDocument:void 0;return(de?de.defaultView:void 0)||global||window}function n(W){return i(W)&&W.shadowRoot!==null}function r(W){return W instanceof t(W).ShadowRoot}function o(W){return W!==null&&Object.prototype.hasOwnProperty.call(W,"getRootNode")&&r(W.getRootNode())}function i(W){return W instanceof t(W).Element}function a(W){return W instanceof t(W).HTMLCanvasElement}function u(W){return W instanceof t(W).HTMLElement}function d(W){return W instanceof t(W).HTMLImageElement}function f(W){return W instanceof t(W).HTMLInputElement}function m(W){return W instanceof t(W).HTMLLinkElement}function g(W){return W instanceof t(W).HTMLScriptElement}function v(W){return W instanceof t(W).HTMLStyleElement}function w(W){return W instanceof t(W).HTMLTextAreaElement}function D(W){return o(W)&&W instanceof t(W).HTMLSlotElement}function T(W){return W instanceof t(W).SVGElement}function I(W){return W instanceof t(W).SVGRectElement}function k(W){return W.search(/^(data:)/)!==-1}function A(W){return isNaN(W)||W<=0}function R(W){return new Promise(function(de){const oe=vO(W.toDataURL().split(",")[1]),he=oe.length,K=new Uint8Array(he);for(let re=0;re<he;re++)K[re]=oe.charCodeAt(re);de(new Blob([K],{type:dn.impl.options.type}))})}function j(W){return W.toBlob?new Promise(function(de){W.toBlob(de)}):R(W)}function B(W,de){const oe=document.implementation.createHTMLDocument(),he=oe.createElement("base");oe.head.appendChild(he);const K=oe.createElement("a");return oe.body.appendChild(K),he.href=de,K.href=W,K.href}function L(){return`u${W()}${e++}`;function W(){return`0000${(Math.random()*Math.pow(36,4)<<0).toString(36)}`.slice(-4)}}function Z(W){return W==="data:,"?Promise.resolve():new Promise(function(de,oe){const he=new Image;dn.impl.options.useCredentials&&(he.crossOrigin="use-credentials"),he.onload=function(){window&&window.requestAnimationFrame?window.requestAnimationFrame(function(){de(he)}):de(he)},he.onerror=oe,he.src=W})}function U(W){let de=dn.impl.urlCache.find(function(oe){return oe.url===W});return de||(de={url:W,promise:null},dn.impl.urlCache.push(de)),de.promise===null&&(dn.impl.options.cacheBust&&(W+=(/\?/.test(W)?"&":"?")+new Date().getTime()),dn.impl.options.requestUrl&&/^http/.test(W)?de.promise=dn.impl.options.requestUrl({url:W,method:"GET"}).then(oe=>new Promise(he=>{const K=new FileReader;K.onload=function(re){he(re.target.result)},K.readAsDataURL(new Blob([oe.arrayBuffer],{type:oe.headers["content-type"]}))})).catch(oe=>(console.error("cannot fetch resource: "+W+", error: "+oe),"")):de.promise=new Promise(function(oe){const he=dn.impl.options.httpTimeout,K=new XMLHttpRequest;if(K.onreadystatechange=pe,K.ontimeout=Ie,K.responseType="blob",K.timeout=he,dn.impl.options.useCredentials&&(K.withCredentials=!0),dn.impl.options.corsImg&&W.indexOf("http")===0&&W.indexOf(window.location.origin)===-1){const Be=(dn.impl.options.corsImg.method||"GET").toUpperCase()==="POST"?"POST":"GET";K.open(Be,(dn.impl.options.corsImg.url||"").replace("#{cors}",W),!0);let Je=!1;const ze=dn.impl.options.corsImg.headers||{};Object.keys(ze).forEach(function(It){ze[It].indexOf("application/json")!==-1&&(Je=!0),K.setRequestHeader(It,ze[It])});const Qe=Oe(dn.impl.options.corsImg.data||"");Object.keys(Qe).forEach(function(It){typeof Qe[It]=="string"&&(Qe[It]=Qe[It].replace("#{cors}",W))}),K.send(Je?JSON.stringify(Qe):Qe)}else K.open("GET",W,!0),K.send();let re;if(dn.impl.options.imagePlaceholder){const Be=dn.impl.options.imagePlaceholder.split(/,/);Be&&Be[1]&&(re=Be[1])}function pe(){if(K.readyState!==4)return;if(K.status>=300){re?oe(re):Ne(`cannot fetch resource: ${W}, status: ${K.status}`);return}const Be=new FileReader;Be.onloadend=function(){oe(Be.result)},Be.readAsDataURL(K.response)}function Ie(){re?oe(re):Ne(`timeout of ${he}ms occured while fetching resource: ${W}`)}function Oe(Be){try{return JSON.parse(JSON.stringify(Be))}catch{Ne("corsImg.data is missing or invalid");return}}function Ne(Be){console.error(Be),oe("")}})),de.promise}function z(W){return W.replace(/([.*+?^${}()|[]\/\\])/g,"\\$1")}function $(W){return function(de){return new Promise(function(oe){setTimeout(function(){oe(de)},W)})}}function te(W){const de=[],oe=W.length;for(let he=0;he<oe;he++)de.push(W[he]);return de}function Q(W){return W.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A")}function ue(W){const de=le(W,"width");if(!isNaN(de))return de;const oe=le(W,"border-left-width"),he=le(W,"border-right-width");return W.scrollWidth+oe+he}function ee(W){const de=le(W,"height");if(!isNaN(de))return de;const oe=le(W,"border-top-width"),he=le(W,"border-bottom-width");return W.scrollHeight+oe+he}function le(W,de){if(W.nodeType===nS){let oe=lv(W).getPropertyValue(de);if(oe.slice(-2)==="px")return oe=oe.slice(0,-2),parseFloat(oe)}return NaN}}function MO(){const e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:o,shouldProcess:t,impl:{readUrls:n,inline:r}};function t(i){return i.search(e)!==-1}function n(i){const a=[];let u;for(;(u=e.exec(i))!==null;)a.push(u[1]);return a.filter(function(d){return!Ut.isDataUrl(d)})}function r(i,a,u,d){return Promise.resolve(a).then(function(m){return u?Ut.resolveUrl(m,u):m}).then(d||Ut.getAndEncode).then(function(m){return i.replace(f(a),`$1${m}$3`)});function f(m){return new RegExp(`(url\\(['"]?)(${Ut.escape(m)})(['"]?\\))`,"g")}}function o(i,a,u){if(d())return Promise.resolve(i);return Promise.resolve(i).then(n).then(function(f){let m=Promise.resolve(i);return f.forEach(function(g){m=m.then(function(v){return r(v,g,a,u)})}),m});function d(){return!t(i)}}}function kO(){return{resolveAll:e,impl:{readAll:t}};function e(){return t().then(function(n){return Promise.all(n.map(function(r){return r.resolve()}))}).then(function(n){return n.join(`
|
|
|
`)})}function t(){return Promise.resolve(Ut.asArray(document.styleSheets)).then(r).then(n).then(function(i){return i.map(o)});function n(i){return i.filter(function(a){return a.type===CSSRule.FONT_FACE_RULE}).filter(function(a){return Mv.shouldProcess(a.style.getPropertyValue("src"))})}function r(i){const a=[];return i.forEach(function(u){if(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(u),"cssRules"))try{Ut.asArray(u.cssRules||[]).forEach(a.push.bind(a))}catch(d){console.error(`domtoimage: Error while reading CSS rules from ${u.href}`,d.toString())}}),a}function o(i){return{resolve:function(){const u=(i.parentStyleSheet||{}).href;return Mv.inlineAll(i.cssText,u)},src:function(){return i.style.getPropertyValue("src")}}}}}function NO(){return{inlineAll:t,impl:{newImage:e}};function e(n){return{inline:r};function r(o){return Ut.isDataUrl(n.src)?Promise.resolve():Promise.resolve(n.src).then(o||Ut.getAndEncode).then(function(i){return new Promise(function(a){n.onload=a,n.onerror=a,n.src=i})})}}function t(n){if(!Ut.isElement(n))return Promise.resolve(n);return r(n).then(function(){return Ut.isHTMLImageElement(n)?e(n).inline():Promise.all(Ut.asArray(n.childNodes).map(function(o){return t(o)}))});function r(o){const a=["background","background-image"].map(function(u){const d=o.style.getPropertyValue(u),f=o.style.getPropertyPriority(u);return d?Mv.inlineAll(d).then(function(m){o.style.setProperty(u,m,f)}):Promise.resolve()});return Promise.all(a).then(function(){return o})}}}function AO(e,t,n,r){const o=["background-clip"].indexOf(t)>=0;r?(e.setProperty(t,n,r),o&&e.setProperty(`-webkit-${t}`,n,r)):(e.setProperty(t,n),o&&e.setProperty(`-webkit-${t}`,n))}function FO(e,t,n,r,o){const i=dn.impl.options.copyDefaultStyles?OO(e,t):{},a=o.style;Ut.asArray(n).forEach(function(u){const d=n.getPropertyValue(u),f=i[u],m=r?r.getPropertyValue(u):void 0;if(d!==f||r&&d!==m){const g=n.getPropertyPriority(u);AO(a,u,d,g)}})}let Ry=null,uv={};const PO=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","SVG","TABLE","UL","math","svg","BODY","HEAD","HTML"];function OO(e,t){const n=u(t),r=d(n);if(uv[r])return uv[r];const o=jO(),i=f(o.document,n),a=m(o,i);return g(i),uv[r]=a,a;function u(v){const w=[];do{if(v.nodeType===nS){const D=v.tagName;if(w.push(D),PO.includes(D))break}v=v.parentNode}while(v);return w}function d(v){return e.styleCaching==="relaxed"?v.filter((w,D,T)=>D===0||D===T.length-1).join(">"):v.join(">")}function f(v,w){let D=v.body;do{const T=w.pop(),I=v.createElement(T);D.appendChild(I),D=I}while(w.length>0);return D.textContent="",D}function m(v,w){const D={},T=v.getComputedStyle(w);return Ut.asArray(T).forEach(function(I){D[I]=I==="width"||I==="height"?"auto":T.getPropertyValue(I)}),D}function g(v){do{const w=v.parentElement;w!==null&&w.removeChild(v),v=w}while(v&&v.tagName!=="BODY")}}function jO(){if(ra)return ra.contentWindow;const e=document.characterSet||"UTF-8",t=document.doctype,n=t?`<!DOCTYPE ${r(t.name)} ${r(t.publicId)} ${r(t.systemId)}`.trim()+">":"";return ra=document.createElement("iframe"),ra.id="domtoimage-sandbox-"+Ut.uid(),ra.className="domtoimage-thino",ra.style.visibility="hidden",ra.style.position="fixed",document.body.appendChild(ra),o(ra,n,e,"domtoimage-sandbox");function r(i){if(i){const a=document.createElement("div");return a.innerText=i,a.innerHTML}else return""}function o(i,a,u,d){try{return i.contentWindow.document.write(`${a}<html><head><meta charset='${u}'><title>${d}</title></head><body></body></html>`),i.contentWindow}catch{}const f=document.createElement("meta");f.setAttribute("charset",u);try{const m=document.implementation.createHTMLDocument(d);m.head.appendChild(f);const g=a+m.documentElement.outerHTML;return i.setAttribute("srcdoc",g),i.contentWindow}catch{}return i.contentDocument.head.appendChild(f),i.contentDocument.title=d,i.contentWindow}}function LO(){ra&&(document.body.removeChild(ra),ra=null),Ry&&clearTimeout(Ry),Ry=setTimeout(()=>{Ry=null,uv={}},20*1e3)}async function RO(e,t,n){return await dn.toCanvas(e,{width:e.clientWidth,height:e.clientHeight,quality:1,scale:t?2:1,requestUrl:C.requestUrl,type:n})}const m0=async(e,t)=>(await RO(e,!0,"image/jpeg")).toDataURL(),xT=async e=>{e.startsWith("http")&&(e=await Id(e));const t=e.split("base64,")[1],n=n0(t,"image/png");await SC(n),new C.Notice(E("Send to clipboard successfully"))},_O=async(e,t)=>{const n=await e.vault.adapter.exists(t);let r="";if(n)r=t;else{const u=e.metadataCache.getFirstLinkpathDest(t,"");if(!u){new C.Notice(E("File not exist"));return}r=u.path}const o=await e.vault.adapter.readBinary(r),i=new Uint8Array(o),a=new Blob([i],{type:"image/png"});await SC(a)},SC=async e=>{const t=new ClipboardItem({"image/png":e});await window.navigator.clipboard.write([t])},ET=1.1,CT=300,MT=20,BO=({destroy:e,imgUrl:t,filepath:n,otherIMGEls:r,currentIndex:o})=>{const i=F.useRef(null),[a,u]=F.useState(-1),d=_e.getState().dailyNotesState.app,[f,m]=F.useState(o),[g,v]=F.useState(t),w={close:F.useRef(null),previous:F.useRef(null),next:F.useRef(null),decrease:F.useRef(null),increase:F.useRef(null),zoom:F.useRef(null),copy:F.useRef(null)};F.useEffect(()=>{!n&&!t||(C.setIcon(w.close.current,"x"),w.previous.current&&C.setIcon(w.previous.current,"arrow-left"),w.next.current&&C.setIcon(w.next.current,"arrow-right"),C.setIcon(w.decrease.current,"zoom-out"),C.setIcon(w.increase.current,"zoom-in"),C.setIcon(w.zoom.current,"circle"),C.setIcon(w.copy.current,"clipboard"))},[w]),F.useEffect(()=>{ut.getImageSize(g).then(({width:L})=>{u(L!==0?40:0)})},[g]);const D=()=>{let L=f-1;L<0&&(L=r.length-1),m(L),v(r[L].src)},T=()=>{let L=f+1;L>=r.length&&(L=0),m(L),v(r[L].src)},I=()=>{e()},k=()=>{a>30&&u(a-10)},A=()=>{u(a+10)},R=L=>{L.target!==i.current&&L.target===i.current.parentElement&&I()},j=L=>{if(L.ctrlKey){L.preventDefault();const Z=i.current,U=L.nativeEvent.offsetX,z=L.nativeEvent.offsetY,$=U/Z.clientWidth,te=z/Z.clientHeight;let Q;L.deltaY>0?Q=a/ET:Q=a*ET,Q>CT?Q=CT:Q<MT&&(Q=MT);const ue=a;u(Q);const ee=L.currentTarget;ee.scrollLeft+=(Q-ue)*$,ee.scrollTop+=(Q-ue)*te}else L.deltaX!==0&&(L.currentTarget.scrollLeft+=L.deltaX)},B=async()=>{if(g&&!n)await xT(t);else if(n){const Z=r[f].parentElement.getAttribute("src");if(!Z){await xT(g);return}await _O(d,Z)}};return y.jsxs(y.Fragment,{children:[y.jsx("button",{ref:w.close,className:"btn close-btn",onClick:I}),y.jsxs("div",{className:"img-container internal-embed image-embed is-loaded",onClick:R,onWheel:j,children:[y.jsx("img",{className:a<=0?"hidden":"",ref:i,height:a+"%",src:g}),y.jsx("span",{className:"loading-text "+(a===-1?"":"hidden"),children:E("Image is loading...")}),y.jsx("span",{className:"loading-text "+(a===0?"":"hidden"),children:E("😟 Cannot load image, image link maybe broken")})]}),y.jsxs("div",{className:"action-btns-container",children:[r&&(r==null?void 0:r.length)>1&&y.jsxs(y.Fragment,{children:[y.jsx("button",{ref:w.previous,className:"btn",onClick:D}),y.jsx("button",{ref:w.next,className:"btn",onClick:T})]}),y.jsx("button",{ref:w.decrease,className:"btn",onClick:k}),y.jsx("button",{ref:w.increase,className:"btn",onClick:A}),y.jsx("button",{ref:w.zoom,className:"btn",onClick:()=>u(80)}),y.jsx("button",{ref:w.copy,className:"btn",onClick:B})]})]})};function g0({imgUrl:e,filepath:t,otherIMGEls:n,currentIndex:r}){l0({className:"preview-image-dialog"},BO,{...{imgUrl:e,otherIMGEls:n,currentIndex:r},filepath:t})}const HO=e=>{const{dailyNotesState:{app:t,view:n}}=F.useContext(Ot),{memo:r,handleMemoContentClick:o,handleMemoDoubleClick:i}=e,a=se.useRef(null),[u,d]=se.useState("");return F.useEffect(()=>{if(!a.current||a.current.hasChildNodes()&&r.content===u||!n||!t)return;d(r.content),a.current.hasChildNodes()&&a.current.empty(),(async()=>{var g,v;await C.MarkdownRenderer.render(t,r.content+`
|
|
|
`,a.current,r.path,n),(g=a.current)==null||g.toggleClass(["markdown-rendered"],!0);const m=(v=a.current)==null?void 0:v.querySelectorAll(".internal-link");m==null||m.forEach(w=>{const D=w,T=D.getAttribute("data-href");if(!T)return;t.metadataCache.getFirstLinkpathDest(T,r.path)||w.classList.add("is-unresolved"),D.addEventListener("mouseover",k=>{k.stopPropagation(),t.workspace.trigger("hover-link",{event:k,source:"thino",hoverParent:n.containerEl,targetEl:D,linktext:T,sourcePath:D.href})})})})()},[r.content,n,t]),y.jsx("div",{ref:a,className:"memo-content-text",onClick:f=>o(f,r),onDoubleClick:i,onContextMenu:f=>{f.preventDefault()}})},DC=F.memo(HO),YO=e=>{const[t,n]=F.useState({...e.memo,createdAtStr:ut.getDateTimeString(e.memo.createdAt)}),[r,o]=F.useState([]),[i,a]=F.useState([]);F.useEffect(()=>{(async()=>{try{const g=[],v=[...t.content.matchAll(hc)];for(const D of v)if(D&&D.length===3){const T=D[2],I=je.getMemoById(T);I&&g.push({...I,createdAtStr:ut.getDateTimeString(I.createdAt),dateStr:ut.getDateString(I.createdAt)})}o([...g]);const w=await je.getLinkedMemos(t.id);a(w.sort((D,T)=>ut.getTimeStampByDate(T.createdAt)-ut.getTimeStampByDate(D.createdAt)).map(D=>({...D,createdAtStr:ut.getDateTimeString(D.createdAt),dateStr:ut.getDateString(D.createdAt)})))}catch(g){console.error(g)}})()},[t.id]);const u=F.useCallback(async m=>{var v;const g=m.target;if(g.className==="memo-link-text"){const w=(v=g.dataset)==null?void 0:v.value,D=je.getMemoById(w??"");if(D){const T={...D,createdAtStr:ut.getDateTimeString(D.createdAt)};o([]),a([]),n(T)}else new C.Notice(E("Thino not found")),g.classList.remove("memo-link-text")}},[]),d=F.useCallback(m=>{o([]),a([]),n({...m,createdAtStr:ut.getDateTimeString(m.createdAt)})},[t.id]),f=F.useCallback(()=>{e.destroy(),dt.setEditMemoId(t.id)},[t.id]);return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"memo-card-container",children:[y.jsxs("div",{className:"header-container",children:[y.jsx("span",{className:"time-text",children:t.createdAtStr}),y.jsxs("div",{className:"btns-container",children:[y.jsx("button",{ref:m=>{m&&C.setIcon(m,"edit")},className:"btn edit-btn",onClick:f}),y.jsx("button",{ref:m=>{m&&C.setIcon(m,"x")},className:"btn close-btn",onClick:e.destroy})]})]}),y.jsx("div",{className:"memo-container",children:y.jsx("div",{className:"memo-content-text",children:y.jsx(DC,{memo:t,handleMemoContentClick:u,handleMemoDoubleClick:()=>{}})})}),y.jsx("div",{className:"layer-container"})]}),r.length>0?y.jsxs("div",{className:"linked-memos-wrapper",children:[y.jsxs("span",{className:"normal-text",children:[E("LINKED")," ",r.length," THINO"," "]}),r.map(m=>{const g=SD(Fb(m.content)).replaceAll(`
|
|
|
`," ");return y.jsxs("div",{className:"linked-memo-container",onClick:()=>d(m),children:[y.jsxs("span",{className:"time-text",children:[m.dateStr," "]}),g]},m.id)})]}):null,i.length>0?y.jsxs("div",{className:"linked-memos-wrapper",children:[y.jsxs("span",{className:"normal-text",children:[i.length," THINO ",E("LINK TO THE")," THINO"]}),i.map(m=>{const g=SD(Fb(m.content)).replaceAll(`
|
|
|
`," ");return y.jsxs("div",{className:"linked-memo-container",onClick:()=>d(m),children:[y.jsxs("span",{className:"time-text",children:[m.dateStr," "]}),g]},m.id)})]}):null]})};function Lh(e){l0({className:"memo-card-dialog"},YO,{memo:e})}function sc(e){return TC(e)?(e.nodeName||"").toLowerCase():"#document"}function aa(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mc(e){var t;return(t=(TC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function TC(e){return e instanceof Node||e instanceof aa(e).Node}function Yo(e){return e instanceof Element||e instanceof aa(e).Element}function yl(e){return e instanceof HTMLElement||e instanceof aa(e).HTMLElement}function Gb(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof aa(e).ShadowRoot}function pg(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=La(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function UO(e){return["table","td","th"].includes(sc(e))}function rS(e){const t=oS(),n=La(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function zO(e){let t=bh(e);for(;yl(t)&&!y0(t);){if(rS(t))return t;t=bh(t)}return null}function oS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function y0(e){return["html","body","#document"].includes(sc(e))}function La(e){return aa(e).getComputedStyle(e)}function v0(e){return Yo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function bh(e){if(sc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gb(e)&&e.host||mc(e);return Gb(t)?t.host:t}function IC(e){const t=bh(e);return y0(t)?e.ownerDocument?e.ownerDocument.body:e.body:yl(t)&&pg(t)?t:IC(t)}function Jb(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=IC(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=aa(o);return i?t.concat(a,a.visualViewport||[],pg(o)?o:[],a.frameElement&&n?Jb(a.frameElement):[]):t.concat(o,Jb(o,[],n))}function cv(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Gb(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Kb(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function _y(e){return(e==null?void 0:e.ownerDocument)||document}function VO(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Qb=Math.min,fh=Math.max,kv=Math.round,lc=e=>({x:e,y:e}),WO={left:"right",right:"left",bottom:"top",top:"bottom"},ZO={start:"end",end:"start"};function kT(e,t,n){return fh(e,Qb(t,n))}function w0(e,t){return typeof e=="function"?e(t):e}function xd(e){return e.split("-")[0]}function b0(e){return e.split("-")[1]}function xC(e){return e==="x"?"y":"x"}function EC(e){return e==="y"?"height":"width"}function S0(e){return["top","bottom"].includes(xd(e))?"y":"x"}function CC(e){return xC(S0(e))}function $O(e,t,n){n===void 0&&(n=!1);const r=b0(e),o=CC(e),i=EC(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Nv(a)),[a,Nv(a)]}function qO(e){const t=Nv(e);return[Xb(e),t,Xb(t)]}function Xb(e){return e.replace(/start|end/g,t=>ZO[t])}function GO(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function JO(e,t,n,r){const o=b0(e);let i=GO(xd(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Xb)))),i}function Nv(e){return e.replace(/left|right|bottom|top/g,t=>WO[t])}function KO(e){return{top:0,right:0,bottom:0,left:0,...e}}function QO(e){return typeof e!="number"?KO(e):{top:e,right:e,bottom:e,left:e}}function Av(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function NT(e,t,n){let{reference:r,floating:o}=e;const i=S0(t),a=CC(t),u=EC(a),d=xd(t),f=i==="y",m=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,v=r[u]/2-o[u]/2;let w;switch(d){case"top":w={x:m,y:r.y-o.height};break;case"bottom":w={x:m,y:r.y+r.height};break;case"right":w={x:r.x+r.width,y:g};break;case"left":w={x:r.x-o.width,y:g};break;default:w={x:r.x,y:r.y}}switch(b0(t)){case"start":w[a]-=v*(n&&f?-1:1);break;case"end":w[a]+=v*(n&&f?-1:1);break}return w}const XO=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,u=i.filter(Boolean),d=await(a.isRTL==null?void 0:a.isRTL(t));let f=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:g}=NT(f,r,d),v=r,w={},D=0;for(let T=0;T<u.length;T++){const{name:I,fn:k}=u[T],{x:A,y:R,data:j,reset:B}=await k({x:m,y:g,initialPlacement:r,placement:v,strategy:o,middlewareData:w,rects:f,platform:a,elements:{reference:e,floating:t}});m=A??m,g=R??g,w={...w,[I]:{...w[I],...j}},B&&D<=50&&(D++,typeof B=="object"&&(B.placement&&(v=B.placement),B.rects&&(f=B.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):B.rects),{x:m,y:g}=NT(f,v,d)),T=-1)}return{x:m,y:g,placement:v,strategy:o,middlewareData:w}};async function MC(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:g="floating",altBoundary:v=!1,padding:w=0}=w0(t,e),D=QO(w),I=u[v?g==="floating"?"reference":"floating":g],k=Av(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(I)))==null||n?I:I.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:f,rootBoundary:m,strategy:d})),A=g==="floating"?{...a.floating,x:r,y:o}:a.reference,R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),j=await(i.isElement==null?void 0:i.isElement(R))?await(i.getScale==null?void 0:i.getScale(R))||{x:1,y:1}:{x:1,y:1},B=Av(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:A,offsetParent:R,strategy:d}):A);return{top:(k.top-B.top+D.top)/j.y,bottom:(B.bottom-k.bottom+D.bottom)/j.y,left:(k.left-B.left+D.left)/j.x,right:(B.right-k.right+D.right)/j.x}}const ej=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:D="none",flipAlignment:T=!0,...I}=w0(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const k=xd(o),A=xd(u)===u,R=await(d.isRTL==null?void 0:d.isRTL(f.floating)),j=v||(A||!T?[Nv(u)]:qO(u));!v&&D!=="none"&&j.push(...JO(u,T,D,R));const B=[u,...j],L=await MC(t,I),Z=[];let U=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&Z.push(L[k]),g){const Q=$O(o,a,R);Z.push(L[Q[0]],L[Q[1]])}if(U=[...U,{placement:o,overflows:Z}],!Z.every(Q=>Q<=0)){var z,$;const Q=(((z=i.flip)==null?void 0:z.index)||0)+1,ue=B[Q];if(ue)return{data:{index:Q,overflows:U},reset:{placement:ue}};let ee=($=U.filter(le=>le.overflows[0]<=0).sort((le,W)=>le.overflows[1]-W.overflows[1])[0])==null?void 0:$.placement;if(!ee)switch(w){case"bestFit":{var te;const le=(te=U.map(W=>[W.placement,W.overflows.filter(de=>de>0).reduce((de,oe)=>de+oe,0)]).sort((W,de)=>W[1]-de[1])[0])==null?void 0:te[0];le&&(ee=le);break}case"initialPlacement":ee=u;break}if(o!==ee)return{reset:{placement:ee}}}return{}}}};async function tj(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=xd(n),u=b0(n),d=S0(n)==="y",f=["left","top"].includes(a)?-1:1,m=i&&d?-1:1,g=w0(t,e);let{mainAxis:v,crossAxis:w,alignmentAxis:D}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return u&&typeof D=="number"&&(w=u==="end"?D*-1:D),d?{x:w*m,y:v*f}:{x:v*f,y:w*m}}const nj=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:u}=t,d=await tj(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:o+d.x,y:i+d.y,data:{...d,placement:a}}}}},rj=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:u={fn:I=>{let{x:k,y:A}=I;return{x:k,y:A}}},...d}=w0(e,t),f={x:n,y:r},m=await MC(t,d),g=S0(xd(o)),v=xC(g);let w=f[v],D=f[g];if(i){const I=v==="y"?"top":"left",k=v==="y"?"bottom":"right",A=w+m[I],R=w-m[k];w=kT(A,w,R)}if(a){const I=g==="y"?"top":"left",k=g==="y"?"bottom":"right",A=D+m[I],R=D-m[k];D=kT(A,D,R)}const T=u.fn({...t,[v]:w,[g]:D});return{...T,data:{x:T.x-n,y:T.y-r}}}}};function kC(e){const t=La(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=yl(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,u=kv(n)!==i||kv(r)!==a;return u&&(n=i,r=a),{width:n,height:r,$:u}}function NC(e){return Yo(e)?e:e.contextElement}function hh(e){const t=NC(e);if(!yl(t))return lc(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=kC(t);let a=(i?kv(n.width):n.width)/r,u=(i?kv(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const oj=lc(0);function AC(e){const t=aa(e);return!oS()||!t.visualViewport?oj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ij(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==aa(e)?!1:t}function Om(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=NC(e);let a=lc(1);t&&(r?Yo(r)&&(a=hh(r)):a=hh(e));const u=ij(i,n,r)?AC(i):lc(0);let d=(o.left+u.x)/a.x,f=(o.top+u.y)/a.y,m=o.width/a.x,g=o.height/a.y;if(i){const v=aa(i),w=r&&Yo(r)?aa(r):r;let D=v,T=D.frameElement;for(;T&&r&&w!==D;){const I=hh(T),k=T.getBoundingClientRect(),A=La(T),R=k.left+(T.clientLeft+parseFloat(A.paddingLeft))*I.x,j=k.top+(T.clientTop+parseFloat(A.paddingTop))*I.y;d*=I.x,f*=I.y,m*=I.x,g*=I.y,d+=R,f+=j,D=aa(T),T=D.frameElement}}return Av({width:m,height:g,x:d,y:f})}const aj=[":popover-open",":modal"];function FC(e){return aj.some(t=>{try{return e.matches(t)}catch{return!1}})}function sj(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=mc(r),u=t?FC(t.floating):!1;if(r===a||u&&i)return n;let d={scrollLeft:0,scrollTop:0},f=lc(1);const m=lc(0),g=yl(r);if((g||!g&&!i)&&((sc(r)!=="body"||pg(a))&&(d=v0(r)),yl(r))){const v=Om(r);f=hh(r),m.x=v.x+r.clientLeft,m.y=v.y+r.clientTop}return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x,y:n.y*f.y-d.scrollTop*f.y+m.y}}function lj(e){return Array.from(e.getClientRects())}function PC(e){return Om(mc(e)).left+v0(e).scrollLeft}function uj(e){const t=mc(e),n=v0(e),r=e.ownerDocument.body,o=fh(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=fh(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+PC(e);const u=-n.scrollTop;return La(r).direction==="rtl"&&(a+=fh(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:u}}function cj(e,t){const n=aa(e),r=mc(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,u=0,d=0;if(o){i=o.width,a=o.height;const f=oS();(!f||f&&t==="fixed")&&(u=o.offsetLeft,d=o.offsetTop)}return{width:i,height:a,x:u,y:d}}function dj(e,t){const n=Om(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=yl(e)?hh(e):lc(1),a=e.clientWidth*i.x,u=e.clientHeight*i.y,d=o*i.x,f=r*i.y;return{width:a,height:u,x:d,y:f}}function AT(e,t,n){let r;if(t==="viewport")r=cj(e,n);else if(t==="document")r=uj(mc(e));else if(Yo(t))r=dj(t,n);else{const o=AC(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Av(r)}function OC(e,t){const n=bh(e);return n===t||!Yo(n)||y0(n)?!1:La(n).position==="fixed"||OC(n,t)}function fj(e,t){const n=t.get(e);if(n)return n;let r=Jb(e,[],!1).filter(u=>Yo(u)&&sc(u)!=="body"),o=null;const i=La(e).position==="fixed";let a=i?bh(e):e;for(;Yo(a)&&!y0(a);){const u=La(a),d=rS(a);!d&&u.position==="fixed"&&(o=null),(i?!d&&!o:!d&&u.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||pg(a)&&!d&&OC(e,a))?r=r.filter(m=>m!==a):o=u,a=bh(a)}return t.set(e,r),r}function hj(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?fj(t,this._c):[].concat(n),r],u=a[0],d=a.reduce((f,m)=>{const g=AT(t,m,o);return f.top=fh(g.top,f.top),f.right=Qb(g.right,f.right),f.bottom=Qb(g.bottom,f.bottom),f.left=fh(g.left,f.left),f},AT(t,u,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function pj(e){const{width:t,height:n}=kC(e);return{width:t,height:n}}function mj(e,t,n){const r=yl(t),o=mc(t),i=n==="fixed",a=Om(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const d=lc(0);if(r||!r&&!i)if((sc(t)!=="body"||pg(o))&&(u=v0(t)),r){const g=Om(t,!0,i,t);d.x=g.x+t.clientLeft,d.y=g.y+t.clientTop}else o&&(d.x=PC(o));const f=a.left+u.scrollLeft-d.x,m=a.top+u.scrollTop-d.y;return{x:f,y:m,width:a.width,height:a.height}}function FT(e,t){return!yl(e)||La(e).position==="fixed"?null:t?t(e):e.offsetParent}function jC(e,t){const n=aa(e);if(!yl(e)||FC(e))return n;let r=FT(e,t);for(;r&&UO(r)&&La(r).position==="static";)r=FT(r,t);return r&&(sc(r)==="html"||sc(r)==="body"&&La(r).position==="static"&&!rS(r))?n:r||zO(e)||n}const gj=async function(e){const t=this.getOffsetParent||jC,n=this.getDimensions;return{reference:mj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function yj(e){return La(e).direction==="rtl"}const vj={convertOffsetParentRelativeRectToViewportRelativeRect:sj,getDocumentElement:mc,getClippingRect:hj,getOffsetParent:jC,getElementRects:gj,getClientRects:lj,getDimensions:pj,getScale:hh,isElement:Yo,isRTL:yj},wj=rj,bj=(e,t,n)=>{const r=new Map,o={platform:vj,...n},i={...o.platform,_c:r};return XO(e,t,{...o,platform:i})};var dv=typeof document<"u"?F.useLayoutEffect:F.useEffect;function Fv(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Fv(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Fv(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function LC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function PT(e,t){const n=LC(e);return Math.round(t*n)/n}function OT(e){const t=F.useRef(e);return dv(()=>{t.current=e}),t}function Sj(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[m,g]=F.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,w]=F.useState(r);Fv(v,r)||w(r);const[D,T]=F.useState(null),[I,k]=F.useState(null),A=F.useCallback(de=>{de!==L.current&&(L.current=de,T(de))},[]),R=F.useCallback(de=>{de!==Z.current&&(Z.current=de,k(de))},[]),j=i||D,B=a||I,L=F.useRef(null),Z=F.useRef(null),U=F.useRef(m),z=d!=null,$=OT(d),te=OT(o),Q=F.useCallback(()=>{if(!L.current||!Z.current)return;const de={placement:t,strategy:n,middleware:v};te.current&&(de.platform=te.current),bj(L.current,Z.current,de).then(oe=>{const he={...oe,isPositioned:!0};ue.current&&!Fv(U.current,he)&&(U.current=he,s0.flushSync(()=>{g(he)}))})},[v,t,n,te]);dv(()=>{f===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,g(de=>({...de,isPositioned:!1})))},[f]);const ue=F.useRef(!1);dv(()=>(ue.current=!0,()=>{ue.current=!1}),[]),dv(()=>{if(j&&(L.current=j),B&&(Z.current=B),j&&B){if($.current)return $.current(j,B,Q);Q()}},[j,B,Q,$,z]);const ee=F.useMemo(()=>({reference:L,floating:Z,setReference:A,setFloating:R}),[A,R]),le=F.useMemo(()=>({reference:j,floating:B}),[j,B]),W=F.useMemo(()=>{const de={position:n,left:0,top:0};if(!le.floating)return de;const oe=PT(le.floating,m.x),he=PT(le.floating,m.y);return u?{...de,transform:"translate("+oe+"px, "+he+"px)",...LC(le.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:oe,top:he}},[n,u,le.floating,m.x,m.y]);return F.useMemo(()=>({...m,update:Q,refs:ee,elements:le,floatingStyles:W}),[m,Q,ee,le,W])}const RC={...WN},Dj=RC.useInsertionEffect,Tj=Dj||(e=>e());function Ij(e){const t=F.useRef(()=>{});return Tj(()=>{t.current=e}),F.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var Sh=typeof document<"u"?F.useLayoutEffect:F.useEffect;let jT=!1,xj=0;const LT=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+xj++;function Ej(){const[e,t]=F.useState(()=>jT?LT():void 0);return Sh(()=>{e==null&&t(LT())},[]),F.useEffect(()=>{jT=!0},[]),e}const Cj=RC.useId,Mj=Cj||Ej;function kj(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Nj=F.createContext(null),Aj=F.createContext(null),_C=()=>{var e;return((e=F.useContext(Nj))==null?void 0:e.id)||null},BC=()=>F.useContext(Aj);function Fj(e){return"data-floating-ui-"+e}function RT(e){const t=F.useRef(e);return Sh(()=>{t.current=e}),t}const _T=Fj("safe-polygon");function Kw(e,t,n){return n&&!Kb(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Pj(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:{domReference:a,floating:u},refs:d}=e,{enabled:f=!0,delay:m=0,handleClose:g=null,mouseOnly:v=!1,restMs:w=0,move:D=!0}=t,T=BC(),I=_C(),k=RT(g),A=RT(m),R=F.useRef(),j=F.useRef(),B=F.useRef(),L=F.useRef(),Z=F.useRef(!0),U=F.useRef(!1),z=F.useRef(()=>{}),$=F.useCallback(()=>{var ee;const le=(ee=o.current.openEvent)==null?void 0:ee.type;return(le==null?void 0:le.includes("mouse"))&&le!=="mousedown"},[o]);F.useEffect(()=>{if(!f)return;function ee(le){let{open:W}=le;W||(clearTimeout(j.current),clearTimeout(L.current),Z.current=!0)}return i.on("openchange",ee),()=>{i.off("openchange",ee)}},[f,i]),F.useEffect(()=>{if(!f||!k.current||!n)return;function ee(W){$()&&r(!1,W,"hover")}const le=_y(u).documentElement;return le.addEventListener("mouseleave",ee),()=>{le.removeEventListener("mouseleave",ee)}},[u,n,r,f,k,$]);const te=F.useCallback(function(ee,le,W){le===void 0&&(le=!0),W===void 0&&(W="hover");const de=Kw(A.current,"close",R.current);de&&!B.current?(clearTimeout(j.current),j.current=setTimeout(()=>r(!1,ee,W),de)):le&&(clearTimeout(j.current),r(!1,ee,W))},[A,r]),Q=F.useCallback(()=>{z.current(),B.current=void 0},[]),ue=F.useCallback(()=>{if(U.current){const ee=_y(d.floating.current).body;ee.style.pointerEvents="",ee.removeAttribute(_T),U.current=!1}},[d]);return F.useEffect(()=>{if(!f)return;function ee(){return o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1}function le(oe){if(clearTimeout(j.current),Z.current=!1,v&&!Kb(R.current)||w>0&&Kw(A.current,"open")===0)return;const he=Kw(A.current,"open",R.current);he?j.current=setTimeout(()=>{r(!0,oe,"hover")},he):r(!0,oe,"hover")}function W(oe){if(ee())return;z.current();const he=_y(u);if(clearTimeout(L.current),k.current){n||clearTimeout(j.current),B.current=k.current({...e,tree:T,x:oe.clientX,y:oe.clientY,onClose(){ue(),Q(),te(oe,!0,"safe-polygon")}});const re=B.current;he.addEventListener("mousemove",re),z.current=()=>{he.removeEventListener("mousemove",re)};return}(R.current==="touch"?!cv(u,oe.relatedTarget):!0)&&te(oe)}function de(oe){ee()||k.current==null||k.current({...e,tree:T,x:oe.clientX,y:oe.clientY,onClose(){ue(),Q(),te(oe)}})(oe)}if(Yo(a)){const oe=a;return n&&oe.addEventListener("mouseleave",de),u==null||u.addEventListener("mouseleave",de),D&&oe.addEventListener("mousemove",le,{once:!0}),oe.addEventListener("mouseenter",le),oe.addEventListener("mouseleave",W),()=>{n&&oe.removeEventListener("mouseleave",de),u==null||u.removeEventListener("mouseleave",de),D&&oe.removeEventListener("mousemove",le),oe.removeEventListener("mouseenter",le),oe.removeEventListener("mouseleave",W)}}},[a,u,f,e,v,w,D,te,Q,ue,r,n,T,A,k,o]),Sh(()=>{var ee;if(f&&n&&(ee=k.current)!=null&&ee.__options.blockPointerEvents&&$()){const W=_y(u).body;if(W.setAttribute(_T,""),W.style.pointerEvents="none",U.current=!0,Yo(a)&&u){var le;const de=a,oe=T==null||(le=T.nodesRef.current.find(he=>he.id===I))==null||(le=le.context)==null?void 0:le.elements.floating;return oe&&(oe.style.pointerEvents=""),de.style.pointerEvents="auto",u.style.pointerEvents="auto",()=>{de.style.pointerEvents="",u.style.pointerEvents=""}}}},[f,n,I,u,a,T,k,$]),Sh(()=>{n||(R.current=void 0,Q(),ue())},[n,Q,ue]),F.useEffect(()=>()=>{Q(),clearTimeout(j.current),clearTimeout(L.current),ue()},[f,a,Q,ue]),F.useMemo(()=>{if(!f)return{};function ee(le){R.current=le.pointerType}return{reference:{onPointerDown:ee,onPointerEnter:ee,onMouseMove(le){function W(){Z.current||r(!0,le.nativeEvent,"hover")}v&&!Kb(R.current)||n||w===0||(clearTimeout(L.current),R.current==="touch"?W():L.current=setTimeout(W,w))}},floating:{onMouseEnter(){clearTimeout(j.current)},onMouseLeave(le){te(le.nativeEvent,!1)}}}},[f,v,n,w,r,te])}function Oj(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var u;return o.parentId===a.id&&((u=o.context)==null?void 0:u.open)})}),n=n.concat(r);return n}function jj(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:o}=e,[i,a]=F.useState(null),[u,d]=F.useState(null),m=((t=e.elements)==null?void 0:t.reference)||i;Sh(()=>{m&&(T.current=m)},[m]);const g=Sj({...e,elements:{...e.elements,...u&&{reference:u}}}),v=BC(),w=_C()!=null,D=Ij((U,z,$)=>{I.current.openEvent=U?z:void 0,k.emit("openchange",{open:U,event:z,reason:$,nested:w}),r==null||r(U,z,$)}),T=F.useRef(null),I=F.useRef({}),k=F.useState(()=>kj())[0],A=Mj(),R=F.useCallback(U=>{const z=Yo(U)?{getBoundingClientRect:()=>U.getBoundingClientRect(),contextElement:U}:U;d(z),g.refs.setReference(z)},[g.refs]),j=F.useCallback(U=>{(Yo(U)||U===null)&&(T.current=U,a(U)),(Yo(g.refs.reference.current)||g.refs.reference.current===null||U!==null&&!Yo(U))&&g.refs.setReference(U)},[g.refs]),B=F.useMemo(()=>({...g.refs,setReference:j,setPositionReference:R,domReference:T}),[g.refs,j,R]),L=F.useMemo(()=>({...g.elements,domReference:m}),[g.elements,m]),Z=F.useMemo(()=>({...g,refs:B,elements:L,dataRef:I,nodeId:o,floatingId:A,events:k,open:n,onOpenChange:D}),[g,o,A,k,n,D,B,L]);return Sh(()=>{const U=v==null?void 0:v.nodesRef.current.find(z=>z.id===o);U&&(U.context=Z)}),F.useMemo(()=>({...g,context:Z,refs:B,elements:L}),[g,B,L,Z])}const BT="active",HT="selected";function Qw(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[BT]:a,[HT]:u,...d}=e;i=d}return{...n==="floating"&&{tabIndex:-1},...i,...t.map(a=>{const u=a?a[n]:null;return typeof u=="function"?e?u(e):null:u}).concat(e).reduce((a,u)=>(u&&Object.entries(u).forEach(d=>{let[f,m]=d;if(!(o&&[BT,HT].includes(f)))if(f.indexOf("on")===0){if(r.has(f)||r.set(f,[]),typeof m=="function"){var g;(g=r.get(f))==null||g.push(m),a[f]=function(){for(var v,w=arguments.length,D=new Array(w),T=0;T<w;T++)D[T]=arguments[T];return(v=r.get(f))==null?void 0:v.map(I=>I(...D)).find(I=>I!==void 0)}}}else a[f]=m}),a),{})}}function Lj(e){e===void 0&&(e=[]);const t=e,n=F.useCallback(i=>Qw(i,e,"reference"),t),r=F.useCallback(i=>Qw(i,e,"floating"),t),o=F.useCallback(i=>Qw(i,e,"item"),e.map(i=>i==null?void 0:i.item));return F.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])}function YT(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,u=i-1;a<i;u=a++){const[d,f]=t[a]||[0,0],[m,g]=t[u]||[0,0];f>=r!=g>=r&&n<=(m-d)*(r-f)/(g-f)+d&&(o=!o)}return o}function Rj(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function _j(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,u=null,d=performance.now();function f(g,v){const w=performance.now(),D=w-d;if(a===null||u===null||D===0)return a=g,u=v,d=w,null;const T=g-a,I=v-u,A=Math.sqrt(T*T+I*I)/D;return a=g,u=v,d=w,A}const m=g=>{let{x:v,y:w,placement:D,elements:T,onClose:I,nodeId:k,tree:A}=g;return function(j){function B(){clearTimeout(o),I()}if(clearTimeout(o),!T.domReference||!T.floating||D==null||v==null||w==null)return;const{clientX:L,clientY:Z}=j,U=[L,Z],z=VO(j),$=j.type==="mouseleave",te=cv(T.floating,z),Q=cv(T.domReference,z),ue=T.domReference.getBoundingClientRect(),ee=T.floating.getBoundingClientRect(),le=D.split("-")[0],W=v>ee.right-ee.width/2,de=w>ee.bottom-ee.height/2,oe=Rj(U,ue),he=ee.width>ue.width,K=ee.height>ue.height,re=(he?ue:ee).left,pe=(he?ue:ee).right,Ie=(K?ue:ee).top,Oe=(K?ue:ee).bottom;if(te&&(i=!0,!$))return;if(Q&&(i=!1),Q&&!$){i=!0;return}if($&&Yo(j.relatedTarget)&&cv(T.floating,j.relatedTarget)||A&&Oj(A.nodesRef.current,k).some(Je=>{let{context:ze}=Je;return ze==null?void 0:ze.open}))return;if(le==="top"&&w>=ue.bottom-1||le==="bottom"&&w<=ue.top+1||le==="left"&&v>=ue.right-1||le==="right"&&v<=ue.left+1)return B();let Ne=[];switch(le){case"top":Ne=[[re,ue.top+1],[re,ee.bottom-1],[pe,ee.bottom-1],[pe,ue.top+1]];break;case"bottom":Ne=[[re,ee.top+1],[re,ue.bottom-1],[pe,ue.bottom-1],[pe,ee.top+1]];break;case"left":Ne=[[ee.right-1,Oe],[ee.right-1,Ie],[ue.left+1,Ie],[ue.left+1,Oe]];break;case"right":Ne=[[ue.right-1,Oe],[ue.right-1,Ie],[ee.left+1,Ie],[ee.left+1,Oe]];break}function Be(Je){let[ze,Qe]=Je;switch(le){case"top":{const It=[he?ze+t/2:W?ze+t*4:ze-t*4,Qe+t+1],Zt=[he?ze-t/2:W?ze+t*4:ze-t*4,Qe+t+1],Re=[[ee.left,W||he?ee.bottom-t:ee.top],[ee.right,W?he?ee.bottom-t:ee.top:ee.bottom-t]];return[It,Zt,...Re]}case"bottom":{const It=[he?ze+t/2:W?ze+t*4:ze-t*4,Qe-t],Zt=[he?ze-t/2:W?ze+t*4:ze-t*4,Qe-t],Re=[[ee.left,W||he?ee.top+t:ee.bottom],[ee.right,W?he?ee.top+t:ee.bottom:ee.top+t]];return[It,Zt,...Re]}case"left":{const It=[ze+t+1,K?Qe+t/2:de?Qe+t*4:Qe-t*4],Zt=[ze+t+1,K?Qe-t/2:de?Qe+t*4:Qe-t*4];return[...[[de||K?ee.right-t:ee.left,ee.top],[de?K?ee.right-t:ee.left:ee.right-t,ee.bottom]],It,Zt]}case"right":{const It=[ze-t,K?Qe+t/2:de?Qe+t*4:Qe-t*4],Zt=[ze-t,K?Qe-t/2:de?Qe+t*4:Qe-t*4],Re=[[de||K?ee.left+t:ee.right,ee.top],[de?K?ee.left+t:ee.right:ee.left+t,ee.bottom]];return[It,Zt,...Re]}}}if(!YT([L,Z],Ne)){if(i&&!oe)return B();if(!$&&r){const Je=f(j.clientX,j.clientY);if(Je!==null&&Je<.1)return B()}YT([L,Z],Be([v,w]))?!i&&r&&(o=window.setTimeout(B,40)):B()}}};return m.__options={blockPointerEvents:n},m}const Bj=F.forwardRef((e,t)=>{var ue;const{memo:n,handlePinMemoClick:r,handleFixMemoClick:o,handleSourceMemoClick:i,handleShowMemoStoryDialog:a,handleCopyMemoClick:u,handleEditMemoClick:d,handleGenMemoImageBtnClick:f,handleMarkMemoClick:m,handleArchiveMemo:g,handleDeleteMemoClick:v,handleSplitMemoClick:w}=e,D=_e.getState().dailyNotesState.settings,T=D.EnabledLocationList.find(ee=>ee.value==="MULTI"),[I,k]=ml(!1),A=F.useRef(null),R={pinRef:F.useRef(null),fixRef:F.useRef(null),typeRef:F.useRef(null),moreRef:F.useRef(null)},[j,B]=F.useState(!1),{refs:L,floatingStyles:Z,context:U}=jj({open:j,onOpenChange:B,placement:"bottom-end",middleware:[ej(),wj(),nj({crossAxis:5,mainAxis:-5})]}),z=Pj(U,{handleClose:_j({requireIntent:!1})}),{getReferenceProps:$,getFloatingProps:te}=Lj([z]),Q={copy:F.useRef(null),read:F.useRef(null),mark:F.useRef(null),share:F.useRef(null),edit:F.useRef(null),source:F.useRef(null),archive:F.useRef(null),delete:F.useRef(null),split:F.useRef(null)};return F.useEffect(()=>{!A.current||!j||(C.setIcon(Q.copy.current,"copy"),C.setIcon(Q.read.current,"book-open"),C.setIcon(Q.mark.current,"bookmark"),C.setIcon(Q.share.current,"share-2"),C.setIcon(Q.edit.current,"pencil"),C.setIcon(Q.source.current,"home"),C.setIcon(Q.archive.current,"archive"),C.setIcon(Q.delete.current,"trash"),Q.split.current&&C.setIcon(Q.split.current,"separator-horizontal"))},[A,j]),F.useEffect(()=>{if(!R.typeRef)return;const ee=km.find(le=>le.title===n.sourceType);C.setIcon(R.typeRef.current,ee.icon),C.requireApiVersion("1.4.4")&&C.setTooltip(R.typeRef.current,n.path),R.fixRef&&(C.setIcon(R.fixRef.current,"shield-alert"),C.requireApiVersion("1.4.4")&&C.setTooltip(R.fixRef.current,"Update Thino property"))},[R.typeRef]),F.useEffect(()=>{R.pinRef&&(n.pinned?(C.setIcon(R.pinRef.current,"pin-off"),C.requireApiVersion("1.4.4")&&C.setTooltip(R.pinRef.current,E("UNPIN"))):(C.setIcon(R.pinRef.current,"pin"),C.requireApiVersion("1.4.4")&&C.setTooltip(R.pinRef.current,E("PIN"))))},[R.pinRef,n.pinned]),F.useImperativeHandle(t,()=>({toggleConfirm:ee=>k(ee),confirmStatus:I})),y.jsx("div",{ref:A,className:"memo-top-right-wrapper",children:y.jsxs("div",{className:"btns-container",children:[y.jsx("span",{ref:R.fixRef,className:`btn ${n.sourceType!=="MULTI"||n.id!==""?"hidden":""} fix-memo-btn`,onClick:()=>o(n)}),y.jsx("span",{ref:R.typeRef,className:`btn ${n.sourceType==="DAILY"?"hidden":""} source-type-btn`,onClick:()=>i(n)}),y.jsx("span",{ref:R.pinRef,className:`btn ${e.memo.pinned?"pinned-btn":"unpinned-btn"} pro`,onClick:r}),y.jsx("div",{ref:L.setReference,...$(),children:y.jsx("span",{ref:ee=>{R.moreRef.current=ee,ee&&C.setIcon(ee,"more-horizontal")},className:"btn more-action-btn"})}),j&&y.jsx("div",{ref:L.setFloating,className:"more-action-btns-wrapper",style:Z,...te(),children:y.jsxs("div",{className:"more-action-btns-container",children:[y.jsxs("div",{className:"more-action-btn-group more-action-menu-item",children:[y.jsx("span",{ref:Q.copy,className:"more-action-item-icon",onClick:u}),y.jsx("span",{ref:Q.edit,className:"more-action-item-icon",onClick:d}),y.jsx("span",{ref:Q.share,className:"more-action-item-icon",onClick:f})]}),y.jsx("hr",{className:"menu-hr"}),y.jsxs("div",{className:"more-action-menu-item",onClick:a,children:[y.jsx("span",{ref:Q.read,className:"more-action-item-icon"}),y.jsx("span",{className:"btn",children:E("READ")})]}),y.jsxs("div",{className:"more-action-menu-item",children:[y.jsx("span",{ref:Q.mark,className:"more-action-item-icon"}),y.jsx("span",{className:"btn",onClick:m,children:E("MARK")})]}),((ue=/(^|\n)#{1,6}\s/g.exec(n.content))==null?void 0:ue.length)>1&&T&&y.jsxs("div",{className:"more-action-menu-item",children:[y.jsx("span",{ref:Q.split,className:"more-action-item-icon"}),y.jsx("span",{className:"btn",onClick:w,children:E("SPLIT")})]}),y.jsxs("div",{className:"more-action-menu-item",children:[y.jsx("span",{ref:Q.source,className:"more-action-item-icon"}),y.jsx("span",{className:"btn",onClick:()=>i(n),children:E("SOURCE")})]}),y.jsx("hr",{className:"menu-hr"}),y.jsxs("div",{className:"more-action-menu-item archive-menu-item",children:[y.jsx("span",{ref:Q.archive,className:"more-action-item-icon"}),y.jsx("span",{className:"btn delete-btn",onClick:()=>g(n),children:E("ARCHIVE").toUpperCase()})]}),y.jsxs("div",{className:"more-action-menu-item delete-menu-item",children:[y.jsx("span",{ref:Q.delete,className:"more-action-item-icon"}),y.jsx("span",{className:`btn delete-btn ${I?"final-confirm":""}`,onClick:async ee=>{ee.stopPropagation(),ee.preventDefault(),await v(ee)},children:I?E("CONFIRM!"):D.DeleteThinoDirectly?E("DELETE"):E("Recycle bin").toUpperCase()})]}),y.jsx("hr",{className:"menu-hr"}),y.jsx("div",{className:"text-count-item more-action-menu-item",children:y.jsx("span",{className:"btn text-count-btn",children:ut.getWordCount(n.content.replace(/```[^\S\r\n]*[a-z]*\n.*?\n```/g,""))+` ${E("words")}`})})]})})]})})}),Hj=e=>{const{memo:t,handleMemoTypeToggle:n,handleShowMemoStoryDialog:r,settings:o}=e;return y.jsxs("div",{className:"memo-top-left-wrapper",children:[e.children,y.jsx("span",{title:t.createdAt,className:"time-text",onClick:r,children:t.createdAt}),y.jsx("div",{className:`btn memo-type-img ${o!=null&&o.ShowTaskLabel?"":"hidden"}`,onClick:n,children:t.thinoType!=="JOURNAL"&&y.jsx("input",{className:"task-list-item-checkbox",type:"checkbox",checked:t.thinoType!=="TASK-TODO","data-task":t.thinoType==="TASK-TODO"?"":t.thinoType==="TASK-DONE"?"x":t.thinoType.slice(5)})})]})};class Yj extends C.SuggestModal{constructor(t,n){super(t),this.thino=n}sanitisedFileName(t){const n=s6;return t.replace(n,"").trim().slice(0,255)}ensureUniqueFileNames(t){const n=[];return t.map(o=>{const i=this.sanitisedFileName(o[0]),a=n.filter(u=>u==i);return n.push(i),a.length>=1?`${i}${a.length+1}`:i})}contentSplitByHeading(t,n){const r=t.split(`
|
|
|
`),o=new Array(n).join("#")+" ",i=new Array(n+1).join("#")+" ",a=[];let u=[];return r.forEach((d,f)=>{d.startsWith(i)?(u.length>0&&(a.push(u),u=[]),u.push(d)):u.length>0&&!d.startsWith(o)?u.push(d):u.length>0&&(a.push(u),u=[]),f===r.length-1&&u.length>0&&a.push(u)}),a}onChooseSuggestion(t,n){this.selectSuggestion(t,n)}renderSuggestion(t,n){n.setText(t.title)}getSuggestions(){return[{id:"splitByHeading1",title:E("Split by Heading 1")},{id:"splitByHeading2",title:E("Split by Heading 2")},{id:"splitByHeading3",title:E("Split by Heading 3")}]}async selectSuggestion(t,n){let r=[];if(t.id==="splitByHeading1"?r=this.contentSplitByHeading(this.thino.content,1):t.id==="splitByHeading2"?r=this.contentSplitByHeading(this.thino.content,2):t.id==="splitByHeading3"&&(r=this.contentSplitByHeading(this.thino.content,3)),r.length===0){new C.Notice("No headings found"),this.close();return}const o=this.ensureUniqueFileNames(r);for(const u of r){const d=r.indexOf(u),f=await je.createThino({content:u.join(`
|
|
|
`),name:o[d],type:"MULTI",isList:!0});je.pushMemo(f)}let i=this.thino.content;r.forEach((u,d)=>{i=i.replace(u.join(`
|
|
|
`),`[[${o[d]}]]`)});const a=await je.updateMemo(this.thino.id,i);a&&je.editMemo(a),this.close()}}const Uj=async(e,t,n)=>{const r=n.getAttribute("href"),o=n.className;if(o.contains("tag"))zj(n.innerText.slice(1));else if(o.contains("internal-link")){const i=n.getAttribute("data-href"),a=je.getMemoById(i??"");a?Lh(a):await e.workspace.openLinkText(i,i,!C.Platform.isMobile&&t.navigation!==!0)}else r&&window.open(r,"_blank")},zj=e=>{const t=st.getState().query.tag;st.setTagQuery(t.contains(",")?t.split(",").includes(e)?t.split(",").filter(n=>n!==e).join(","):t+","+e:t===e?"":e)},Vj=(e,t)=>{const n=t==null?void 0:t.getAttribute("src"),r=t==null?void 0:t.parentElement.getAttribute("src"),o=[...(e==null?void 0:e.querySelectorAll("img"))||[]],i=o.indexOf(t);g0({imgUrl:n,filepath:n.startsWith("app")?r:void 0,otherIMGEls:o,currentIndex:i})},Wj=e=>{var r;const t=(r=e.dataset)==null?void 0:r.value,n=je.getMemoById(t??"");n?Lh(n):(new C.Notice("Thino Not Found"),e.classList.remove("memo-link-text"))},Zj=async(e,t,n,r)=>{var u;const o=e!=null&&e.AppendDateWhenTaskDone?" ✅ "+C.moment().format("YYYY-MM-DD"):"",i=((u=r.parentElement.dataset)==null?void 0:u.task)==="x"?"DONE":"TODO",a=[...(n==null?void 0:n.querySelectorAll("li.task-list-item"))||[]];for(const d of a)if(d===r||d===r.closest("li.task-list-item")){const f=a.indexOf(d),m=t.content.split(/\n/),g=[];for(let I=0;I<m.length;I++)(m[I].trim().startsWith("- [ ]")||m[I].trim().startsWith("- [x]"))&&g.push(I);const v=g[f];let D=m[v].replace(/- \[ \] |- \[x\] /g,i==="TODO"?"- [x] ":"- [ ] ")+(i==="TODO"?o:"");e.AppendDateWhenTaskDone&&i!=="TODO"&&(D=D.replace(/ ✅ \d{4}-\d{2}-\d{2}/g,"")),m[v]=D;const T=m.join(`
|
|
|
`).trim();if(t&&t.content!==T){const I=await je.updateMemo(t.id,T);je.editMemo(I)}}},$j=e=>{const{globalState:{editMemoId:t},dailyNotesState:{app:n,view:r,settings:o,verifyState:i},locationState:{pathname:a}}=F.useContext(Ot),{memo:u,type:d="inline"}=e,f=F.useRef(null),m=F.useRef(null),[g,v]=F.useState(!1);F.useEffect(()=>{g&&setTimeout(()=>{dt.setEditMemoId(u.id)},100)},[g]),F.useEffect(()=>{(a==="/review"||a==="/daily")&&t!==u.id&&g&&v(!1)},[t]);const w=()=>{Lh(u)},D=()=>{if(o!=null&&o.UseButtonToShowEditor&&(o==null?void 0:o.DefaultEditorLocation)==="Bottom"){const W=document.querySelector("div[data-type='thino_view'] .view-content .memo-show-editor-button:not(.hidden)");W&&W.trigger("click")}dt.setMarkMemoId(u.id)},T=async()=>{var oe;const W=!C.Platform.isDesktop&&await((oe=window.Capacitor)==null?void 0:oe.Plugins.Device.getId()),de=C.Platform.isDesktop?await Jn():W.identifier||W.uuid;if(!i||(i==null?void 0:i.appId)!==de){Fn();return}u.pinned?await je.unpinMemoById(u.id):await je.pinMemoById(u.id)},I=()=>{if(o!=null&&o.UseButtonToShowEditor&&(o==null?void 0:o.DefaultEditorLocation)==="Bottom"&&C.Platform.isMobile){const W=document.querySelector("div[data-type='thino_view'] .view-content .memo-show-editor-button:not(.hidden)");W&&W.trigger("click")}(a==="/review"||a==="/daily")&&v(!0),a!=="/review"&&a!=="/daily"&&dt.setEditMemoId(u.id)},k=async W=>{W.sourceType==="MULTI"&&W.id.trim()===""&&await je.updateMemoProperty(W)},A=async W=>{await je.openThinoByID(W.id)},R=async W=>{try{const de=await je.archiveMemo(W);de&&je.editMemo(de)}catch(de){console.error(de),new C.Notice(de.message)}},j=async(W,de)=>{if(!de&&m.current&&!m.current.confirmStatus){m.current&&m.current.toggleConfirm();return}try{if(o.DeleteThinoDirectly)await je.deleteMemoById(u.id);else{const oe=await je.hideMemoById(u.id);oe&&je.editMemo(oe)}}catch(oe){new C.Notice(oe.message)}dt.getState().editMemoId===u.id&&dt.setEditMemoId("")},B=()=>{if(m.current&&!m.current.confirmStatus){m.current&&m.current.toggleConfirm(!1);return}},L=()=>{md(u)},Z=async()=>{const W=await je.updateMemo(u.id,u.content,u.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");W&&je.editMemo(W)},U=async W=>{W.stopPropagation(),navigator.clipboard.writeText(u.content).then(()=>{new C.Notice(E("COPY SUCCEED"))}).catch(()=>{new C.Notice(E("COPY FAILED"))})},z=async()=>{new Yj(n,u).open()},$=W=>{W&&W.target.tagName!=="INPUT"&&I()},te=async(W,de)=>{W.preventDefault(),W.stopPropagation();const oe=W.target;if(W.ctrlKey||W.metaKey){await A(de);return}if(oe.tagName==="A"){await Uj(n,r,oe);return}if(oe.tagName==="IMG"){Vj(f.current,oe);return}if(oe.tagName==="A"&&oe.getAttribute("href")){const he=oe.getAttribute("href");window.open(he,"_blank");return}if(oe.className==="memo-link-text"){Wj(oe);return}if(oe.tagName==="INPUT"&&oe.hasClass("task-list-item-checkbox")){await Zj(o,de,f.current,oe);return}},Q=W=>{const de=new C.Menu;de.dom.toggleClass("memo-context-menu",!0);const oe=window.getSelection();(oe==null?void 0:oe.toString().length)>0&&de.addItem(he=>{he.setIcon("copy").setTitle(E("Copy selected text")).onClick(()=>{navigator.clipboard.writeText(oe.toString()).then(()=>{new C.Notice(E("COPY SUCCEED"))}).catch(()=>{new C.Notice(E("COPY FAILED"))})})}).addSeparator(),de.addItem(he=>{he.setIcon("copy").setTitle(E("Copy thino").toLocaleUpperCase()).onClick(async K=>{await U(K),de.close()})}).addItem(he=>{he.setIcon("book-open").setTitle(E("READ")).onClick(w)}).addItem(he=>{he.setIcon(u.pinned?"pin-off":"pin").setTitle(u.pinned?E("UNPIN"):E("PIN")).onClick(T)}).addItem(he=>{he.setIcon("bookmark").setTitle(E("MARK")).onClick(D)}).addItem(he=>{he.setIcon("share-2").setTitle(E("SHARE")).onClick(L)}).addItem(he=>{he.setIcon("pencil").setTitle(E("EDIT")).onClick(I)}).addItem(he=>{he.setIcon("home").setTitle(E("SOURCE")).onClick(()=>A(u))}).addSeparator().addItem(he=>{he.setIcon("archive").setTitle(E("ARCHIVE").toLocaleUpperCase()).onClick(()=>R(u))}).addItem(he=>{he.setIcon("trash").setTitle(E("DELETE")).onClick(async K=>{await j(K,!0)})}),de.showAtMouseEvent(W.nativeEvent)},ue=F.useMemo(()=>({memo:u,handlePinMemoClick:T,handleFixMemoClick:k,handleSourceMemoClick:A,handleArchiveMemo:R,handleDeleteMemoClick:j,handleGenMemoImageBtnClick:L,handleMarkMemoClick:D,handleEditMemoClick:I,handleCopyMemoClick:U,handleShowMemoStoryDialog:w,handleSplitMemoClick:z}),[u]),ee=F.useMemo(()=>({memo:u,handleMemoTypeToggle:Z,handleShowMemoStoryDialog:w,settings:o}),[u,o]),le=F.useMemo(()=>y.jsxs("div",{ref:f,className:`memo-wrapper ${u.pinned?"pinned":""}`,"data-source-type":u.sourceType,"data-thino-type":u.thinoType,"data-thino-id":u.id,onMouseLeave:B,onMouseOver:W=>{W.shiftKey&&(W.stopPropagation(),n.workspace.trigger("hover-link",{event:W,source:"thino",hoverParent:r.containerEl,targetEl:f.current,linktext:u.path,sourcePath:u.path,state:{scroll:u.sourceType==="DAILY"?parseInt(u.id.slice(14)):0}}))},onContextMenu:Q,children:[g&&y.jsx(Sd,{editorType:"inline"}),!g&&y.jsxs(y.Fragment,{children:[d==="inline"&&y.jsxs("div",{className:"memo-top-wrapper",draggable:!0,onDragStart:W=>{W.target.classList.add("dragging"),W.dataTransfer.setDragImage(f.current,0,0),W.dataTransfer.setData("text/plain",u.content)},onDragEnd:W=>{W.target.classList.remove("dragging")},children:[y.jsx(Hj,{...ee}),y.jsx(Bj,{ref:m,...ue})]}),y.jsx(DC,{memo:u,handleMemoContentClick:te,handleMemoDoubleClick:$})]})]}),[u,g]);return y.jsx(y.Fragment,{children:le})},Oi=F.memo($j);class lt extends C.Setting{constructor(n,r){super(n);De(this,"settingTab");De(this,"name","");De(this,"desc","");this.settingTab=r}setName(n){return super.setName(n),this.name=n,this}setDesc(n){return super.setDesc(n),this.desc=n,this}setTab(n){const r=typeof this.name=="string"?this.name:this.name.textContent||"",o=typeof this.desc=="string"?this.desc:this.desc.textContent||"";return this.settingTab.addSettingToMasterSettingsList(n,this.settingEl,r,o),this}}class qj extends C.Modal{constructor(n,r,o,i,a){super(n);De(this,"plugin");De(this,"settingTab");De(this,"target",5);De(this,"cb");this.app=n,this.settingTab=r,this.plugin=o,this.target=i,this.cb=a}onOpen(){var u;const{contentEl:n}=this;(u=n.parentElement)==null||u.classList.add("memo-save-location-modal"),n.createEl("h3",{text:E("Thino Daily Target")});const r=n.createDiv("modal-setting");new lt(r,this.settingTab).setName(E("Target Thino Count")).addSlider(d=>{d.setDynamicTooltip().setValue(this.target).setLimits(1,30,1).onChange(async f=>{this.target=f})});const o=n.createDiv("button-group"),i=o.createEl("button",{text:E("Cancel")}),a=o.createEl("button",{text:E("Save")});a.onclick=async()=>{this.plugin.settings.MemoDailyTarget=this.target,this.settingTab.applySettingsUpdate(),this.cb(this.target),this.close()},i.onclick=async()=>{this.close()}}onClose(){const{contentEl:n}=this;n.empty()}}const Gj=({allStat:e,todayTimeStamp:t,calendarType:n,handleCalendarTypeChange:r})=>{const{dailyNotesState:{app:o,settings:i},globalState:{manifest:a}}=F.useContext(Ot),[u,d]=F.useState(),[f,m]=F.useState(5),[g,v]=F.useState(0),[w,D]=F.useState(0),[T,I]=F.useState(i.HeatmapColorScheme||"default"),k=F.useRef(null),A=F.useRef(null);F.useEffect(()=>{i.HeatmapColorScheme&&I(i.HeatmapColorScheme)},[i.HeatmapColorScheme]),F.useEffect(()=>{let j,B=5;a&&o&&(j=o==null?void 0:o.plugins.getPlugin(a.id),B=j==null?void 0:j.settings.MemoDailyTarget,d(j)),m(B)},[a,o]),F.useEffect(()=>{const j=e.find(Z=>Z.timestamp===t),B=j?j.count:0;D(B);const L=Math.min(100,B/f*100);v(L)},[e,f]),F.useEffect(()=>{C.requireApiVersion("1.4.4")&&(C.setTooltip(A.current,g.toFixed(2)+"%"),C.setTooltip(k.current,E("Set daily target")+` (${w}/${f})`))},[g,w]),F.useEffect(()=>{k.current&&(k.current.hasChildNodes()||C.setIcon(k.current,"crosshair"),C.requireApiVersion("1.4.4")&&C.setTooltip(A.current,g+"%"))},[k,f]);const R=F.useCallback(()=>{if(!u)return;new qj(o,u==null?void 0:u.settingTab,u,f,B=>{m(B)}).open()},[u,f]);return y.jsx(y.Fragment,{children:y.jsxs("div",{className:`usage-daily-progress-wrapper heatmap-${T}`,children:[y.jsx("div",{ref:A,className:"daily-progress-bar",children:y.jsx("div",{className:"daily-progress-bar-inner",style:{width:`${g}%`}})}),y.jsx("div",{ref:k,className:"daily-progress-target",onClick:R}),y.jsx("div",{ref:j=>{j&&C.setIcon(j,n==="basic"?"layout-grid":"calendar"),j&&C.setTooltip&&C.setTooltip(j,E("Switch calendar type"))},className:"switch-calendar-type-btn",onClick:()=>r&&r(n==="basic"?"heatmap":"basic")})]})})},Jj=e=>{const{className:t,view:n,datestamp:r,handleDateStampChange:o,handleDateItemClick:i,handleMonthChange:a,dailyStat:u}=e,d=C.moment().startOf("day").valueOf(),[f,m]=F.useState(lm(r)),[g,v]=F.useState(null);F.useEffect(()=>{m(lm(r))},[r]);const w=new Date(f),D=w.getDay(),T=[];for(let A=0;A<D;A++)T.push({date:0,datestamp:w.getTime()-fl*(7-A)});const I=Kj(f);for(let A=1;A<=I;A++)T.push({date:A,datestamp:w.getTime()+fl*(A-1)});const k=A=>{const R=w.getFullYear(),j=w.getMonth()+1;let B=0;j===1&&A===-1?B=new Date(`${R-1}/12/1`).getTime():j===12&&A===1?B=new Date(`${R+1}/1/1`).getTime():B=new Date(`${R}/${j+A}/1`).getTime(),m(lm(B)),a&&a(B)};return y.jsxs("div",{className:`heatmap-date-picker-wrapper ${t}`,children:[y.jsxs("div",{className:"date-picker-header",children:[y.jsx("span",{ref:A=>{A&&C.setIcon(A,"chevron-left")},className:"btn btn-text",onClick:()=>k(-1)}),y.jsxs("span",{className:"normal-text",children:[y.jsx(qE,{year:w.getFullYear().toString(),handleYearChange:A=>{m(lm(new Date(`${A}/${w.getMonth()+1}/1`).getTime()))}}),y.jsx(GE,{month:w.getMonth().toString(),handleMonthChange:A=>{m(lm(new Date(`${w.getFullYear()}/${parseInt(A)}/1`).getTime()))}})]}),y.jsx("span",{ref:A=>{A&&C.setIcon(A,"chevron-right")},className:"btn btn-text",onClick:()=>k(1)})]}),y.jsxs("div",{className:"date-picker-day-container",children:[y.jsx("div",{className:"date-picker-day-header",children:E("weekDaysShort").map(A=>y.jsx("span",{className:"day-item",children:A},A))}),y.jsx("div",{className:"date-picker-day-content",children:T.map(A=>{if(A.date===0)return y.jsx("span",{className:"day-item null",children:""},A.datestamp);const R=u.find(L=>L.timestamp===A.datestamp)||{count:0,timestamp:A.datestamp,list:0},j=R.count-R.list,B=R.list;return y.jsxs("span",{className:`day-item ${A.datestamp===d?"current":""} ${A.datestamp===g?"selected":""} ${Xw(R.count)}`,onClick:L=>{o(r,L.nativeEvent),v(A.datestamp===g?null:A.datestamp),i&&i(L,R)},onMouseOver:L=>{if(!R||!R.count)return;const Z=new C.HoverPopover(n,L.currentTarget,100);HC(Z,{d:A,list:B,task:j})},children:[y.jsx("span",{className:"day-item-text",children:A.date}),y.jsx(y.Fragment,{children:R&&R.count!==0&&y.jsxs("span",{className:"day-item-dots",children:[j>0&&y.jsx("div",{className:`day-item-dot thino-task-dot ${Xw(j)}`}),B>0&&y.jsx("div",{className:`day-item-dot thino-list-dot ${Xw(B)}`})]})})]},A.datestamp)})})]})]})};function HC(e,{d:t,list:n,task:r}){e.hoverEl.toggleClass("thino-hover-popover",!0);const o=e.hoverEl.createDiv({cls:"thino-hover-popover-content"});o.createDiv({cls:"thino-date-item",text:`${C.moment(t.datestamp).format("YYYY-MM-DD")}`});const i=o.createDiv({cls:"thino-task-item"});i.createSpan({cls:"thino-task-item-title-text",text:`${E("Task")}: `}),i.createSpan({cls:"thino-task-item-title-count",text:`${r}`});const a=o.createDiv({cls:"thino-list-item"});a.createSpan({cls:"thino-list-item-title-text",text:`${E("List")}: `}),a.createSpan({cls:"thino-list-item-title-count",text:`${n}`})}function Kj(e){const t=new Date(e),n=new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`);return((n.getMonth()===11?new Date(`${n.getFullYear()+1}/1/1`):new Date(`${n.getFullYear()}/${n.getMonth()+2}/1`)).getTime()-n.getTime())/fl}function lm(e){const t=new Date(e);return new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`).getTime()}function Xw(e){return e<=0?"":e<=1?"stat-day-L1-bg":e<=2?"stat-day-L2-bg":e<=4?"stat-day-L3-bg":"stat-day-L4-bg"}const UT=(e,t)=>{const n=[];for(let r=0;r<=e;r++)n.push({timestamp:parseInt(C.moment(t).add(r,"days").format("x")),count:0,list:0});return n},jm=({initThinos:e,basicType:t})=>{const n=parseInt(C.moment().endOf("day").format("x"));new Date(n).getDay();const r=parseInt(C.moment().startOf("day").format("x")),o=new Array(6-new Date(n).getDay()).fill(0),i=99999,a=parseInt(C.moment().startOf("day").subtract(i,"days").format("x")),u=C.moment().startOf("day").subtract(i,"days"),{memoState:{memos:d},dailyNotesState:{view:f,app:m,settings:g,verifyState:v}}=F.useContext(Ot),[w,D]=oi(t||Xj(m||window.app)||"heatmap"),[T,I]=oi(C.moment().startOf("day").valueOf()),[k,A]=oi(g.HeatmapColorScheme||"default"),[R,j]=oi(UT(i,a)),[B,L]=oi(null),[Z,U,z]=oi(""),$=F.useRef(null);F.useEffect(()=>{const le=UT(i,a),W=(e||d).filter(de=>!de.deletedAt&&de.rowStatus!=="ARCHIVED");for(const de of W){const he=C.moment(de.createdAt.replaceAll("/","-"),"YYYY-MM-DD HH:mm:ss").startOf("day").diff(u,"days");he>=0&&he<le.length&&(le[he].count+=1,de.thinoType==="JOURNAL"&&(le[he].list+=1))}j([...le])},[d,e]),F.useEffect(()=>{g.HeatmapColorScheme&&A(g.HeatmapColorScheme)},[g.HeatmapColorScheme]);const te=F.useCallback((le,W)=>{if(!W||!W.count)return;const de=W.count-W.list,oe=W.list,he={date:W.timestamp,datestamp:W.timestamp},K=new C.HoverPopover(f,le.currentTarget,100);HC(K,{d:he,list:oe,task:de})},[]),Q=()=>{D(w==="heatmap"?"basic":"heatmap"),Qj(m,w==="heatmap"?"basic":"heatmap"),I(C.moment().startOf("day").valueOf())},ue=F.useCallback(async(le,W)=>{if(W.count===0)return;const de=st.getState().query.duration,oe=de==null?void 0:de.from,he=de==null?void 0:de.to,K=C.moment(oe).diff(he,"day")==0;if(oe===W.timestamp&&K)st.setFromAndToQuery(0,0),L(null),U(null);else if(oe!==W.timestamp&&oe>0&&le.shiftKey){const re=C.moment(W.timestamp).endOf("day").diff(he,"day");oe===0&&le.shiftKey?U("from"):re<0&&K&&U("to"),C.moment(oe).isBefore(W.timestamp)?z.current==="to"?re<0?st.setFromAndToQuery(W.timestamp,he):(st.setFromAndToQuery(parseInt(C.moment(he).startOf("day").format("x")),parseInt(C.moment(W.timestamp).endOf("day").format("x"))),U("from")):z.current==="from"&&(re<0,st.setFromAndToQuery(oe,parseInt(C.moment(W.timestamp).endOf("day").format("x")))):z.current==="to"?st.setFromAndToQuery(W.timestamp,he):z.current==="from"&&(st.setFromAndToQuery(W.timestamp,parseInt(C.moment(oe).endOf("day").format("x"))),U("to"))}else if(oe===0&&le.shiftKey)st.setFromAndToQuery(W.timestamp,parseInt(C.moment().endOf("day").format("x")));else if(W.count>0&&(le.ctrlKey||le.metaKey)){const{app:re,dailyNotes:pe}=yt.getState(),Ie=e0(C.moment(W.timestamp),pe);if(!C.Platform.isMobile)await re.workspace.getLeaf(!0).openFile(Ie);else{let Oe=re.workspace.activeLeaf;Oe===null&&(Oe=re.workspace.getLeaf(!0)),Oe.openFile(Ie)}}else W.count>0&&!le.shiftKey&&!le.ctrlKey&&!le.metaKey&&(["/","/recycle"].includes(st.getState().pathname)||st.setPathname("/"),st.setFromAndToQuery(W.timestamp,ut.getTimeStampByDate(C.moment(W.timestamp+fl).subtract(1,"days").endOf("day").format("YYYY-MM-DD HH:mm:ss"))),L(W))},[]),ee=F.useMemo(()=>y.jsx(Jj,{className:`heatmap-${k}`,view:f,datestamp:T,dailyStat:R,handleMonthChange:le=>{I(le)},handleDateStampChange:le=>{},handleDateItemClick:(le,W)=>ue(le,W)}),[JSON.stringify(R),f,T,k]);return y.jsxs(y.Fragment,{children:[w==="basic"&&ee,w==="heatmap"&&y.jsxs("div",{className:`usage-heat-map-wrapper heatmap-${k}`,ref:$,children:[y.jsxs("div",{className:"day-tip-text-container",children:[y.jsx("span",{className:"tip-text",children:E("weekDaysShort")[0]}),y.jsx("span",{className:"tip-text"}),y.jsx("span",{className:"tip-text",children:E("weekDaysShort")[2]}),y.jsx("span",{className:"tip-text"}),y.jsx("span",{className:"tip-text",children:E("weekDaysShort")[4]}),y.jsx("span",{className:"tip-text"}),y.jsx("span",{className:"tip-text",children:E("weekDaysShort")[6]})]}),y.jsxs("div",{className:"usage-heat-map",children:[R.slice(R.length-84+o.length,R.length).map((le,W)=>{const de=le.count,oe=de<=0?"":de<=1?"stat-day-L1-bg":de<=2?"stat-day-L2-bg":de<=4?"stat-day-L3-bg":"stat-day-L4-bg";return y.jsx("span",{"data-timestamp":le.timestamp,"data-count":le.count,"data-list-count":le.list,"data-task-count":le.count-le.list,className:`stat-container ${oe} ${B===le?"current":""} ${r===le.timestamp?"today":""}`,onMouseOver:he=>te(he,le),onClick:he=>ue(he,le)},W)}),o.map((le,W)=>y.jsx("span",{className:"stat-container null"},W))]})]}),!t&&v&&y.jsx(Gj,{allStat:R,todayTimeStamp:r,calendarType:w,handleCalendarTypeChange:Q})]})};function Qj(e,t){try{e==null||e.saveLocalStorage("calendarType",t)}catch(n){console.error(n)}}function Xj(e){try{return(e==null?void 0:e.loadLocalStorage("calendarType"))||"heatmap"}catch(t){return console.error(t),"heatmap"}}const YC=({type:e,timestamp:t})=>{const{memoState:{memos:n}}=F.useContext(Ot),[r,o]=F.useState([]),i=se.useRef(null);return F.useEffect(()=>{if(e==="daily"){if(t){const u=n.filter(d=>C.moment(d.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(C.moment(t,"YYYY/MM/DD HH:mm:ss"),"day"));o(u);return}const a=n.filter(u=>C.moment(u.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(C.moment(),"day"));o(a)}else if(e==="latest"){const a=n.filter(f=>!f.deletedAt&&f.rowStatus!=="ARCHIVED"),u=a.filter(f=>f.pinned),d=a.filter(f=>!f.pinned).slice(0,5);o([...u,...d])}},[n]),F.useEffect(()=>{i.current&&(i.current.scrollTop=0)},[n]),r.length>0?y.jsx("div",{ref:i,className:"thino-list-container",children:r.map(a=>y.jsx(Oi,{memo:a}))}):y.jsx("div",{className:"tip-text-container",children:y.jsx("span",{className:"tip-text",children:E("Here is No Memos.")})})},e7=(e,t)=>{Pa.createRoot(e).render(y.jsx(se.StrictMode,{children:y.jsx(Ra,{store:_e,context:Ot,children:y.jsx(t7,{plugin:t})})}))},t7=({plugin:e})=>y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"thino-error-code-block",children:E("Please open thino first")}),y.jsx("button",{className:"thino-open-view",onClick:()=>e.openMemos("center"),children:E("Open thino in center window")})]}),n7=(e,t)=>{Pa.createRoot(e).render(y.jsx(se.StrictMode,{children:y.jsx(Ra,{store:_e,context:Ot,children:y.jsx(r7,{yaml:t})})}))},r7=({yaml:e})=>{const t=Object.keys(e).filter(o=>e[o]),n=e.daily?e.daily:"",r=o=>{switch(o){case"editor":return zT;case"heatmap":return i7;case"calendar":return a7;case"daily":return l7;case"list":return u7;case"status":return s7;default:return zT}};return y.jsx(y.Fragment,{children:t.map(o=>y.jsx("div",{"data-embed-type":o,className:Kn("thino-embed-container",o==="editor"?"thino-editor-modal":""),children:o==="daily"?r(o)(n):r(o)()}))})};function zT(){return y.jsx(Sd,{editorType:"inline",modal:!0})}function o7(e,t,n){try{const r=Pa.createRoot(e);return r.render(y.jsx(se.StrictMode,{children:y.jsx(Ra,{store:_e,context:Ot,children:y.jsx(Sd,{editorType:"inline",destroy:t,modal:n})})})),r}catch(r){console.error(r)}}function i7(){return y.jsx(jm,{basicType:"heatmap"})}function a7(){return y.jsx(jm,{basicType:"basic"})}function s7(){return y.jsx($1,{statusType:"banner"})}function l7(e){return y.jsx(YC,{type:"daily",timestamp:e})}function u7(){return y.jsx(YC,{type:"latest"})}class UC extends C.Modal{constructor(n){super(n);De(this,"root")}getViewType(){return"thino_view"}onOpen(){const{contentEl:n,modalEl:r}=this;try{this.root=o7(n,this.close.bind(this),this),r.toggleClass("thino-editor-modal",!0),setTimeout(()=>{var o;(o=n.querySelector("textarea"))==null||o.focus(),this.app.workspace.trigger("focus-on-textarea")},10)}catch(o){console.error(o)}}onClose(){this.root.unmount(),this.containerEl&&this.containerEl.empty()}}function c7(e,t){if(e==null)return{};var n=d7(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function d7(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Pv(){return Pv=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pv.apply(this,arguments)}function VT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function um(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VT(Object(n),!0).forEach(function(r){f7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function f7(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const h7={breakpointCols:void 0,className:void 0,columnClassName:void 0,children:void 0,columnAttrs:void 0,column:void 0},eb=2;class Ov extends se.Component{constructor(t){super(t),this.reCalculateColumnCount=this.reCalculateColumnCount.bind(this),this.reCalculateColumnCountDebounce=this.reCalculateColumnCountDebounce.bind(this);let n;this.props.breakpointCols&&this.props.breakpointCols.default?n=this.props.breakpointCols.default:n=parseInt(this.props.breakpointCols)||eb,this.state={columnCount:n}}componentDidMount(){this.reCalculateColumnCount(),window&&window.addEventListener("resize",this.reCalculateColumnCountDebounce)}componentDidUpdate(){this.reCalculateColumnCount()}componentWillUnmount(){window&&window.removeEventListener("resize",this.reCalculateColumnCountDebounce)}reCalculateColumnCountDebounce(){if(!window||!window.requestAnimationFrame){this.reCalculateColumnCount();return}window.cancelAnimationFrame&&window.cancelAnimationFrame(this._lastRecalculateAnimationFrame),this._lastRecalculateAnimationFrame=window.requestAnimationFrame(()=>{this.reCalculateColumnCount()})}reCalculateColumnCount(){const t=window&&window.innerWidth||1/0;let n=this.props.breakpointCols;typeof n!="object"&&(n={default:parseInt(n)||eb});let r=1/0,o=n.default||eb;for(let i in n){const a=parseInt(i);a>0&&t<=a&&a<r&&(r=a,o=n[i])}o=Math.max(1,parseInt(o)||1),this.state.columnCount!==o&&this.setState({columnCount:o})}itemsInColumns(){const t=this.state.columnCount,n=new Array(t),r=se.Children.toArray(this.props.children);for(let o=0;o<r.length;o++){const i=o%t;n[i]||(n[i]=[]),n[i].push(r[o])}return n}renderColumns(){const{column:t,columnAttrs:n={},columnClassName:r}=this.props,o=this.itemsInColumns(),i=`${100/o.length}%`;let a=r;a&&typeof a!="string"&&(this.logDeprecated('The property "columnClassName" requires a string'),typeof a>"u"&&(a="my-masonry-grid_column"));const u=um(um(um({},t),n),{},{style:um(um({},n.style),{},{width:i}),className:a});return o.map((d,f)=>se.createElement("div",Pv({},u,{key:f}),d))}logDeprecated(t){console.error("[Masonry]",t)}render(){const t=this.props,{children:n,breakpointCols:r,columnClassName:o,columnAttrs:i,column:a,className:u}=t,d=c7(t,["children","breakpointCols","columnClassName","columnAttrs","column","className"]);let f=u;return typeof u!="string"&&(this.logDeprecated('The property "className" requires a string'),typeof u>"u"&&(f="my-masonry-grid")),se.createElement("div",Pv({},d,{className:f}),this.renderColumns())}}Ov.defaultProps=h7;const e1=e=>{F.useContext(Ot);const t=_e.getState().dailyNotesState.settings,{thinos:n,dayMark:r,dayMarkRange:o="day",thinoWrapper:i}=e,[a,u]=se.useState(!(t!=null&&t.hidePinnedGroup&&r==="PINNED")),d=se.useRef(null);F.useEffect(()=>{d&&C.setTooltip&&C.setTooltip(d.current,E("Click to expand or fold, Cmd+Click to show all thinos of the day"))},[d]);const f=m=>{if(C.Keymap.isModifier(m.nativeEvent,"Mod")){const g={day:"YYYY-MM-DD",week:"YYYY-[W]WW",month:"YYYY-MM",quarter:"YYYY-[Q]Q",year:"YYYY"},v=C.moment(r,g[o]);st.setFromAndToQuery(v.startOf(o).valueOf(),v.endOf(o).valueOf());return}u(!a)};return y.jsx(y.Fragment,{children:e.type==="list"?y.jsxs(y.Fragment,{children:[y.jsx("div",{ref:d,className:`day-mark ${a?"":"folded"} PINNED`,onClick:f,children:y.jsxs("span",{className:"day-mark-text",children:[a?"▼ ":"▶ ",r==="PINNED"?r+" 📌":r]})},r),a&&n.map((m,g)=>i?y.jsx("div",{children:i({thino:m})},`${m.id}-${C.moment(m.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${g}`):y.jsx(Oi,{memo:m},`${m.id}-${C.moment(m.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${g}`))]}):y.jsxs(y.Fragment,{children:[y.jsx("div",{ref:d,className:`day-mark ${a?"":"folded"}`,onClick:f,children:y.jsxs("span",{className:"day-mark-text",children:[a?"▼ ":"▶ ",r==="PINNED"?r+" 📌":r]})},r),y.jsx(Ov,{breakpointCols:e.type==="waterfall"?3:1,className:`${e.type}-view masonry-memolist`,columnClassName:"masonry-memolist-grid_column",children:a&&n.map((m,g)=>i?y.jsx("div",{children:i({thino:m})},`${m.id}-${C.moment(m.updatedAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${g}`):y.jsx(Oi,{memo:m},`${m.id}-${C.moment(m.updatedAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${g}`))})]})})};function ru(e){"@babel/helpers - typeof";return ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ru(e)}function p7(e,t){if(ru(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ru(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zC(e){var t=p7(e,"string");return ru(t)=="symbol"?t:String(t)}function pd(e,t,n){return t=zC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function zn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WT(Object(n),!0).forEach(function(r){pd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function D0(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function vl(e,t){if(e==null)return{};var n=D0(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zC(r.key),r)}}function uo(e,t,n){return t&&ZT(e.prototype,t),n&&ZT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jv(e){return jv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jv(e)}function VC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(VC=function(){return!!e})()}function WC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m7(e,t){if(t&&(ru(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return WC(e)}function si(e,t,n){return t=jv(t),m7(e,VC()?Reflect.construct(t,n||[],jv(e).constructor):t.apply(e,n))}function Lv(e,t){return Lv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Lv(e,t)}function li(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lv(e,t)}function ZC(e){if(Array.isArray(e))return e}function g7(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,u=[],d=!0,f=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;d=!1}else for(;!(d=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);d=!0);}catch(m){f=!0,o=m}finally{try{if(!d&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw o}}return u}}function t1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iS(e,t){if(e){if(typeof e=="string")return t1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t1(e,t)}}function $C(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ql(e,t){return ZC(e)||g7(e,t)||iS(e,t)||$C()}function mr(){return mr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mr.apply(this,arguments)}var y7=function(e,t,n,r,o,i,a,u){if(!e){var d;if(t===void 0)d=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[n,r,o,i,a,u],m=0;d=new Error(t.replace(/%s/g,function(){return f[m++]})),d.name="Invariant Violation"}throw d.framesToPop=1,d}},v7=y7;const Lm=$r(v7);var w7=function(){};function b7(e,t){var n={};return Object.keys(e).forEach(function(r){n[fv(r)]=w7}),n}function $T(e,t){return e[t]!==void 0}function fv(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function S7(e){return!!e&&(typeof e!="function"||e.prototype&&e.prototype.isReactComponent)}function D7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Lv(e,t)}function qC(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function GC(e){function t(n){var r=this.constructor.getDerivedStateFromProps(e,n);return r??null}this.setState(t.bind(this))}function JC(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}qC.__suppressDeprecationWarning=!0;GC.__suppressDeprecationWarning=!0;JC.__suppressDeprecationWarning=!0;function T7(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if(typeof e.getDerivedStateFromProps!="function"&&typeof t.getSnapshotBeforeUpdate!="function")return e;var n=null,r=null,o=null;if(typeof t.componentWillMount=="function"?n="componentWillMount":typeof t.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof t.componentWillReceiveProps=="function"?r="componentWillReceiveProps":typeof t.UNSAFE_componentWillReceiveProps=="function"&&(r="UNSAFE_componentWillReceiveProps"),typeof t.componentWillUpdate=="function"?o="componentWillUpdate":typeof t.UNSAFE_componentWillUpdate=="function"&&(o="UNSAFE_componentWillUpdate"),n!==null||r!==null||o!==null){var i=e.displayName||e.name,a=typeof e.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
|
|
|
|
`+i+" uses "+a+" but also contains the following legacy lifecycles:"+(n!==null?`
|
|
|
`+n:"")+(r!==null?`
|
|
|
`+r:"")+(o!==null?`
|
|
|
`+o:"")+`
|
|
|
|
|
|
The above lifecycles should be removed. Learn more about this warning here:
|
|
|
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps=="function"&&(t.componentWillMount=qC,t.componentWillReceiveProps=GC),typeof t.getSnapshotBeforeUpdate=="function"){if(typeof t.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=JC;var u=t.componentDidUpdate;t.componentDidUpdate=function(f,m,g){var v=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:g;u.call(this,f,m,v)}}return e}var I7="/Users/jquense/src/uncontrollable/src/uncontrollable.js";function KC(e,t,n){n===void 0&&(n=[]);var r=e.displayName||e.name||"Component",o=S7(e),i=Object.keys(t),a=i.map(fv);o||!n.length||Lm(!1);var u=function(f){D7(m,f);function m(){for(var v,w=arguments.length,D=new Array(w),T=0;T<w;T++)D[T]=arguments[T];v=f.call.apply(f,[this].concat(D))||this,v.handlers=Object.create(null),i.forEach(function(k){var A=t[k],R=function(B){if(v.props[A]){var L;v._notifying=!0;for(var Z=arguments.length,U=new Array(Z>1?Z-1:0),z=1;z<Z;z++)U[z-1]=arguments[z];(L=v.props)[A].apply(L,[B].concat(U)),v._notifying=!1}v.unmounted||v.setState(function($){var te,Q=$.values;return{values:mr(Object.create(null),Q,(te={},te[k]=B,te))}})};v.handlers[A]=R}),n.length&&(v.attachRef=function(k){v.inner=k});var I=Object.create(null);return i.forEach(function(k){I[k]=v.props[fv(k)]}),v.state={values:I,prevProps:{}},v}var g=m.prototype;return g.shouldComponentUpdate=function(){return!this._notifying},m.getDerivedStateFromProps=function(w,D){var T=D.values,I=D.prevProps,k={values:mr(Object.create(null),T),prevProps:{}};return i.forEach(function(A){k.prevProps[A]=w[A],!$T(w,A)&&$T(I,A)&&(k.values[A]=w[fv(A)])}),k},g.componentWillUnmount=function(){this.unmounted=!0},g.render=function(){var w=this,D=this.props,T=D.innerRef,I=D0(D,["innerRef"]);a.forEach(function(A){delete I[A]});var k={};return i.forEach(function(A){var R=w.props[A];k[A]=R!==void 0?R:w.state.values[A]}),se.createElement(e,mr({},I,k,this.handlers,{ref:T||this.attachRef}))},m}(se.Component);T7(u),u.displayName="Uncontrolled("+r+")",u.propTypes=mr({innerRef:function(){}},b7(t)),n.forEach(function(f){u.prototype[f]=function(){var g;return(g=this.inner)[f].apply(g,arguments)}});var d=u;return se.forwardRef&&(d=se.forwardRef(function(f,m){return se.createElement(u,mr({},f,{innerRef:m,__source:{fileName:I7,lineNumber:128},__self:this}))}),d.propTypes=u.propTypes),d.ControlledComponent=e,d.deferControlTo=function(f,m,g){return m===void 0&&(m={}),KC(f,mr({},t,m),g)},d}function QC(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=QC(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Zr(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=QC(e))&&(r&&(r+=" "),r+=t);return r}var XC={exports:{}},tb,qT;function x7(){if(qT)return tb;qT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return tb=e,tb}var nb,GT;function E7(){if(GT)return nb;GT=1;var e=x7();function t(){}function n(){}return n.resetWarningCache=t,nb=function(){function r(a,u,d,f,m,g){if(g!==e){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},nb}XC.exports=E7()();var C7=XC.exports;const Me=$r(C7);var Rv="milliseconds",Rm="seconds",_m="minutes",Bm="hours",Ed="day",Dh="week",Hm="month",Cd="year",Md="decade",kd="century",eM={milliseconds:1,seconds:1e3,minutes:60*1e3,hours:60*60*1e3,day:24*60*60*1e3,week:7*24*60*60*1e3},M7={month:1,year:12,decade:10*12,century:100*12};function k7(e){return[31,N7(e),31,30,31,30,31,31,30,31,30,31]}function N7(e){return e%4===0&&e%100!==0||e%400===0?29:28}function gs(e,t,n){switch(e=new Date(e),n){case Rv:case Rm:case _m:case Bm:case Ed:case Dh:return A7(e,t*eM[n]);case Hm:case Cd:case Md:case kd:return F7(e,t*M7[n])}throw new TypeError('Invalid units: "'+n+'"')}function A7(e,t){var n=new Date(+e+t);return P7(e,n)}function F7(e,t){var n=e.getFullYear(),r=e.getMonth(),o=e.getDate(),i=n*12+r+t,a=Math.trunc(i/12),u=i%12,d=Math.min(o,k7(a)[u]),f=new Date(e);return f.setFullYear(a),f.setDate(1),f.setMonth(u),f.setDate(d),f}function P7(e,t){var n=e.getTimezoneOffset(),r=t.getTimezoneOffset(),o=r-n;return new Date(+t+o*eM.minutes)}function Ym(e,t,n){return gs(e,-t,n)}function Io(e,t,n){switch(e=new Date(e),t){case kd:case Md:case Cd:e=Bv(e,0);case Hm:e=iM(e,1);case Dh:case Ed:e=Vm(e,0);case Bm:e=Th(e,0);case _m:e=zm(e,0);case Rm:e=Um(e,0)}return t===Md&&(e=Ym(e,Nd(e)%10,"year")),t===kd&&(e=Ym(e,Nd(e)%100,"year")),t===Dh&&(e=aM(e,0,n)),e}function _v(e,t,n){switch(e=new Date(e),e=Io(e,t,n),t){case kd:case Md:case Cd:case Hm:case Dh:e=gs(e,1,t),e=Ym(e,1,Ed),e.setHours(23,59,59,999);break;case Ed:e.setHours(23,59,59,999);break;case Bm:case _m:case Rm:e=gs(e,1,t),e=Ym(e,1,Rv)}return e}var mg=_h(function(e,t){return e===t}),aS=_h(function(e,t){return e!==t}),T0=_h(function(e,t){return e>t}),gg=_h(function(e,t){return e>=t}),sS=_h(function(e,t){return e<t}),Rh=_h(function(e,t){return e<=t});function tM(){return new Date(Math.min.apply(Math,arguments))}function nM(){return new Date(Math.max.apply(Math,arguments))}function rM(e,t,n,r){return r=r||"day",(!t||gg(e,t,r))&&(!n||Rh(e,n,r))}var Um=gc("Milliseconds"),zm=gc("Seconds"),Th=gc("Minutes"),Vm=gc("Hours"),oM=gc("Day"),iM=gc("Date"),Bv=gc("Month"),Nd=gc("FullYear");function O7(e,t){return t===void 0?Nd(Io(e,Md)):gs(e,t+10,Cd)}function j7(e,t){return t===void 0?Nd(Io(e,kd)):gs(e,t+100,Cd)}function aM(e,t,n){var r=(oM(e)+7-(n||0))%7;return t===void 0?r:gs(e,t-r,Ed)}function L7(e,t,n,r){var o,i,a;switch(n){case Rv:case Rm:case _m:case Bm:case Ed:case Dh:o=t.getTime()-e.getTime();break;case Hm:case Cd:case Md:case kd:o=(Nd(t)-Nd(e))*12+Bv(t)-Bv(e);break;default:throw new TypeError('Invalid units: "'+n+'"')}switch(n){case Rv:i=1;break;case Rm:i=1e3;break;case _m:i=1e3*60;break;case Bm:i=1e3*60*60;break;case Ed:i=1e3*60*60*24;break;case Dh:i=1e3*60*60*24*7;break;case Hm:i=1;break;case Cd:i=12;break;case Md:i=120;break;case kd:i=1200;break;default:throw new TypeError('Invalid units: "'+n+'"')}return a=o/i,r?a:Math.round(a)}function gc(e){var t=function(n){switch(n){case"Milliseconds":return 36e5;case"Seconds":return 3600;case"Minutes":return 60;case"Hours":return 1;default:return null}}(e);return function(n,r){if(r===void 0)return n["get"+e]();var o=new Date(n);return o["set"+e](r),t&&o["get"+e]()!=r&&(e==="Hours"||r>=t&&o.getHours()-n.getHours()<Math.floor(r/t))&&o["set"+e](r+t),o}}function _h(e){return function(t,n,r){return e(+Io(t,r),+Io(n,r))}}const JT=Object.freeze(Object.defineProperty({__proto__:null,add:gs,century:j7,date:iM,day:oM,decade:O7,diff:L7,endOf:_v,eq:mg,gt:T0,gte:gg,hours:Vm,inRange:rM,lt:sS,lte:Rh,max:nM,milliseconds:Um,min:tM,minutes:Th,month:Bv,neq:aS,seconds:zm,startOf:Io,subtract:Ym,weekday:aM,year:Nd},Symbol.toStringTag,{value:"Module"}));function R7(e){if(Array.isArray(e))return t1(e)}function sM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hv(e){return R7(e)||sM(e)||iS(e)||_7()}function B7(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}var lM=B7;function H7(e,t){return e===t||e!==e&&t!==t}var yg=H7,Y7=typeof Vr=="object"&&Vr&&Vr.Object===Object&&Vr,uM=Y7,U7=uM,z7=typeof self=="object"&&self&&self.Object===Object&&self,V7=U7||z7||Function("return this")(),wl=V7,W7=wl,Z7=W7.Symbol,Bh=Z7,KT=Bh,cM=Object.prototype,$7=cM.hasOwnProperty,q7=cM.toString,cm=KT?KT.toStringTag:void 0;function G7(e){var t=$7.call(e,cm),n=e[cm];try{e[cm]=void 0;var r=!0}catch{}var o=q7.call(e);return r&&(t?e[cm]=n:delete e[cm]),o}var J7=G7,K7=Object.prototype,Q7=K7.toString;function X7(e){return Q7.call(e)}var eL=X7,QT=Bh,tL=J7,nL=eL,rL="[object Null]",oL="[object Undefined]",XT=QT?QT.toStringTag:void 0;function iL(e){return e==null?e===void 0?oL:rL:XT&&XT in Object(e)?tL(e):nL(e)}var Hh=iL;function aL(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var uu=aL,sL=Hh,lL=uu,uL="[object AsyncFunction]",cL="[object Function]",dL="[object GeneratorFunction]",fL="[object Proxy]";function hL(e){if(!lL(e))return!1;var t=sL(e);return t==cL||t==dL||t==uL||t==fL}var lS=hL,pL=9007199254740991;function mL(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=pL}var uS=mL,gL=lS,yL=uS;function vL(e){return e!=null&&yL(e.length)&&!gL(e)}var vg=vL,wL=9007199254740991,bL=/^(?:0|[1-9]\d*)$/;function SL(e,t){var n=typeof e;return t=t??wL,!!t&&(n=="number"||n!="symbol"&&bL.test(e))&&e>-1&&e%1==0&&e<t}var cS=SL,DL=yg,TL=vg,IL=cS,xL=uu;function EL(e,t,n){if(!xL(n))return!1;var r=typeof t;return(r=="number"?TL(n)&&IL(t,n.length):r=="string"&&t in n)?DL(n[t],e):!1}var I0=EL,CL=/\s/;function ML(e){for(var t=e.length;t--&&CL.test(e.charAt(t)););return t}var kL=ML,NL=kL,AL=/^\s+/;function FL(e){return e&&e.slice(0,NL(e)+1).replace(AL,"")}var PL=FL;function OL(e){return e!=null&&typeof e=="object"}var yc=OL,jL=Hh,LL=yc,RL="[object Symbol]";function _L(e){return typeof e=="symbol"||LL(e)&&jL(e)==RL}var wg=_L,BL=PL,e2=uu,HL=wg,t2=NaN,YL=/^[-+]0x[0-9a-f]+$/i,UL=/^0b[01]+$/i,zL=/^0o[0-7]+$/i,VL=parseInt;function WL(e){if(typeof e=="number")return e;if(HL(e))return t2;if(e2(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=e2(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=BL(e);var n=UL.test(e);return n||zL.test(e)?VL(e.slice(2),n?2:8):YL.test(e)?t2:+e}var ZL=WL,$L=ZL,n2=1/0,qL=17976931348623157e292;function GL(e){if(!e)return e===0?e:0;if(e=$L(e),e===n2||e===-n2){var t=e<0?-1:1;return t*qL}return e===e?e:0}var dM=GL,JL=dM;function KL(e){var t=JL(e),n=t%1;return t===t?n?t-n:t:0}var fM=KL,QL=lM,XL=I0,eR=fM,tR=Math.ceil,nR=Math.max;function rR(e,t,n){(n?XL(e,t,n):t===void 0)?t=1:t=nR(eR(t),0);var r=e==null?0:e.length;if(!r||t<1)return[];for(var o=0,i=0,a=Array(tR(r/t));o<r;)a[i++]=QL(e,o,o+=t);return a}var oR=rR;const iR=$r(oR);function bg(e){return e&&e.ownerDocument||document}function aR(e){var t=bg(e);return t&&t.defaultView||window}function sR(e,t){return aR(e).getComputedStyle(e,t)}var lR=/([A-Z])/g;function uR(e){return e.replace(lR,"-$1").toLowerCase()}var cR=/^ms-/;function By(e){return uR(e).replace(cR,"-ms-")}var dR=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function fR(e){return!!(e&&dR.test(e))}function ah(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(By(t))||sR(e).getPropertyValue(By(t));Object.keys(t).forEach(function(o){var i=t[o];!i&&i!==0?e.style.removeProperty(By(o)):fR(o)?r+=o+"("+i+") ":n+=By(o)+": "+i+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}function Wm(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}function hR(e){return"nodeType"in e&&e.nodeType===document.DOCUMENT_NODE}function dS(e){return"window"in e&&e.window===e?e:hR(e)&&e.defaultView||!1}function hM(e){var t=e==="pageXOffset"?"scrollLeft":"scrollTop";function n(r,o){var i=dS(r);if(o===void 0)return i?i[e]:r[t];i?i.scrollTo(i[e],o):r[t]=o}return n}const pM=hM("pageXOffset"),mM=hM("pageYOffset");function Dd(e){var t=bg(e),n={top:0,left:0,height:0,width:0},r=t&&t.documentElement;return!r||!Wm(r,e)||(e.getBoundingClientRect!==void 0&&(n=e.getBoundingClientRect()),n={top:n.top+mM(r)-(r.clientTop||0),left:n.left+pM(r)-(r.clientLeft||0),width:n.width,height:n.height}),n}var pR=function(t){return!!t&&"offsetParent"in t};function mR(e){for(var t=bg(e),n=e&&e.offsetParent;pR(n)&&n.nodeName!=="HTML"&&ah(n,"position")==="static";)n=n.offsetParent;return n||t.documentElement}var gR=function(t){return t.nodeName&&t.nodeName.toLowerCase()};function gM(e,t){var n={top:0,left:0},r;if(ah(e,"position")==="fixed")r=e.getBoundingClientRect();else{var o=t||mR(e);r=Dd(e),gR(o)!=="html"&&(n=Dd(o));var i=String(ah(o,"borderTopWidth")||0);n.top+=parseInt(i,10)-mM(o)||0;var a=String(ah(o,"borderLeftWidth")||0);n.left+=parseInt(a,10)-pM(o)||0}var u=String(ah(e,"marginTop")||0),d=String(ah(e,"marginLeft")||0);return mr({},r,{top:r.top-n.top-(parseInt(u,10)||0),left:r.left-n.left-(parseInt(d,10)||0)})}const fS=!!(typeof window<"u"&&window.document&&window.document.createElement);var r2=new Date().getTime();function yR(e){var t=new Date().getTime(),n=Math.max(0,16-(t-r2)),r=setTimeout(e,n);return r2=t,r}var vR=["","webkit","moz","o","ms"],n1="clearTimeout",r1=yR,o2=function(t,n){return t+(t?n[0].toUpperCase()+n.substr(1):n)+"AnimationFrame"};fS&&vR.some(function(e){var t=o2(e,"request");return t in window&&(n1=o2(e,"cancel"),r1=function(r){return window[t](r)}),!!r1});var i2=function(t){typeof window[n1]=="function"&&window[n1](t)},yM=r1,rb;function wR(e,t){if(!rb){var n=document.body,r=n.matches||n.matchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;rb=function(i,a){return r.call(i,a)}}return rb(e,t)}var bR=Function.prototype.bind.call(Function.prototype.call,[].slice);function SR(e,t){return bR(e.querySelectorAll(t))}var o1=!1,i1=!1;try{var ob={get passive(){return o1=!0},get once(){return i1=o1=!0}};fS&&(window.addEventListener("test",ob,ob),window.removeEventListener("test",ob,!0))}catch{}function DR(e,t,n,r){if(r&&typeof r!="boolean"&&!i1){var o=r.once,i=r.capture,a=n;!i1&&o&&(a=n.__once||function u(d){this.removeEventListener(t,u,i),n.call(this,d)},n.__once=a),e.addEventListener(t,a,o1?r:i)}e.addEventListener(t,n,r)}function TR(e){const t=F.useRef(e);return F.useEffect(()=>{t.current=e},[e]),t}function a2(e){const t=TR(e);return F.useCallback(function(...n){return t.current&&t.current(...n)},[t])}function s2(){return F.useState(null)}function IR(){const e=F.useRef(!0),t=F.useRef(()=>e.current);return F.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function xR(e){const t=IR();return[e[0],F.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var ER=fC({defaultModifiers:[lC,cC,rC,oC,uC,sC,dC,nC]}),l2=function(t){return{position:t,top:"0",left:"0",opacity:"0",pointerEvents:"none"}},CR={name:"applyStyles",enabled:!1},MR={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:function(t){var n=t.state;return function(){var r=n.elements,o=r.reference,i=r.popper;if("removeAttribute"in o){var a=(o.getAttribute("aria-describedby")||"").split(",").filter(function(u){return u.trim()!==i.id});a.length?o.setAttribute("aria-describedby",a.join(",")):o.removeAttribute("aria-describedby")}}},fn:function(t){var n,r=t.state,o=r.elements,i=o.popper,a=o.reference,u=(n=i.getAttribute("role"))==null?void 0:n.toLowerCase();if(i.id&&u==="tooltip"&&"setAttribute"in a){var d=a.getAttribute("aria-describedby");if(d&&d.split(",").indexOf(i.id)!==-1)return;a.setAttribute("aria-describedby",d?d+","+i.id:i.id)}}},kR=[];function NR(e,t,n){var r=n===void 0?{}:n,o=r.enabled,i=o===void 0?!0:o,a=r.placement,u=a===void 0?"bottom":a,d=r.strategy,f=d===void 0?"absolute":d,m=r.modifiers,g=m===void 0?kR:m,v=D0(r,["enabled","placement","strategy","modifiers"]),w=F.useRef(),D=F.useCallback(function(){var j;(j=w.current)==null||j.update()},[]),T=F.useCallback(function(){var j;(j=w.current)==null||j.forceUpdate()},[]),I=xR(F.useState({placement:u,update:D,forceUpdate:T,attributes:{},styles:{popper:l2(f),arrow:{}}})),k=I[0],A=I[1],R=F.useMemo(function(){return{name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(B){var L=B.state,Z={},U={};Object.keys(L.elements).forEach(function(z){Z[z]=L.styles[z],U[z]=L.attributes[z]}),A({state:L,styles:Z,attributes:U,update:D,forceUpdate:T,placement:L.placement})}}},[D,T,A]);return F.useEffect(function(){!w.current||!i||w.current.setOptions({placement:u,strategy:f,modifiers:[].concat(g,[R,CR])})},[f,u,R,i]),F.useEffect(function(){if(!(!i||e==null||t==null))return w.current=ER(e,t,mr({},v,{placement:u,strategy:f,modifiers:[].concat(g,[MR,R])})),function(){w.current!=null&&(w.current.destroy(),w.current=void 0,A(function(j){return mr({},j,{attributes:{},styles:{popper:l2(f)}})}))}},[i,e,t]),k}function AR(e,t,n,r){var o=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,o),n.__once&&e.removeEventListener(t,n.__once,o)}function ym(e,t,n,r){return DR(e,t,n,r),function(){AR(e,t,n,r)}}function FR(e){return e&&"setState"in e?Z1.findDOMNode(e):e??null}const PR=function(e){return bg(FR(e))};var OR=27,u2=function(){};function jR(e){return e.button===0}function LR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var c2=function(t){return t&&("current"in t?t.current:t)};function RR(e,t,n){var r=n===void 0?{}:n,o=r.disabled,i=r.clickTrigger,a=i===void 0?"click":i,u=F.useRef(!1),d=t||u2,f=F.useCallback(function(v){var w,D=c2(e);XP(!!D,"RootClose captured a close event but does not have a ref to compare it to. useRootClose(), should be passed a ref that resolves to a DOM node"),u.current=!D||LR(v)||!jR(v)||!!Wm(D,(w=v.composedPath==null?void 0:v.composedPath()[0])!=null?w:v.target)},[e]),m=a2(function(v){u.current||d(v)}),g=a2(function(v){v.keyCode===OR&&d(v)});F.useEffect(function(){if(!(o||e==null)){var v=window.event,w=PR(c2(e)),D=ym(w,a,f,!0),T=ym(w,a,function(A){if(A===v){v=void 0;return}m(A)}),I=ym(w,"keyup",function(A){if(A===v){v=void 0;return}g(A)}),k=[];return"ontouchstart"in w.documentElement&&(k=[].slice.call(w.body.children).map(function(A){return ym(A,"mousemove",u2)})),function(){D(),T(),I(),k.forEach(function(A){return A()})}}},[e,o,a,f,m,g])}function _R(e){var t={};return Array.isArray(e)?(e==null||e.forEach(function(n){t[n.name]=n}),t):e||t}function BR(e){return e===void 0&&(e={}),Array.isArray(e)?e:Object.keys(e).map(function(t){return e[t].name=t,e[t]})}function HR(e){var t,n,r,o,i=e.enabled,a=e.enableEvents,u=e.placement,d=e.flip,f=e.offset,m=e.fixed,g=e.containerPadding,v=e.arrowElement,w=e.popperConfig,D=w===void 0?{}:w,T=_R(D.modifiers);return mr({},D,{placement:u,enabled:i,strategy:m?"fixed":D.strategy,modifiers:BR(mr({},T,{eventListeners:{enabled:a},preventOverflow:mr({},T.preventOverflow,{options:g?mr({padding:g},(t=T.preventOverflow)==null?void 0:t.options):(n=T.preventOverflow)==null?void 0:n.options}),offset:{options:mr({offset:f},(r=T.offset)==null?void 0:r.options)},arrow:mr({},T.arrow,{enabled:!!v,options:mr({},(o=T.arrow)==null?void 0:o.options,{element:v})}),flip:mr({enabled:!!d},T.flip)}))})}function YR(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function UR(e,t){e.classList?e.classList.add(t):YR(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function d2(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function zR(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=d2(e.className,t):e.setAttribute("class",d2(e.className&&e.className.baseVal||"",t))}var Hy;function vM(e){if((!Hy&&Hy!==0||e)&&fS){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),Hy=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Hy}var ib=function(t){var n;return typeof document>"u"?null:t==null?bg().body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),(n=t)!=null&&n.nodeType&&t||null)};function f2(e,t){var n=F.useState(function(){return ib(e)}),r=n[0],o=n[1];if(!r){var i=ib(e);i&&o(i)}return F.useEffect(function(){t&&r&&t(r)},[t,r]),F.useEffect(function(){var a=ib(e);a!==r&&o(a)},[e,r]),r}const h2=e=>!e||typeof e=="function"?e:t=>{e.current=t};function VR(e,t){const n=h2(e),r=h2(t);return o=>{n&&n(o),r&&r(o)}}function WR(e,t){return F.useMemo(()=>VR(e,t),[e,t])}var hS=se.forwardRef(function(e,t){var n=e.flip,r=e.offset,o=e.placement,i=e.containerPadding,a=i===void 0?5:i,u=e.popperConfig,d=u===void 0?{}:u,f=e.transition,m=s2(),g=m[0],v=m[1],w=s2(),D=w[0],T=w[1],I=WR(v,t),k=f2(e.container),A=f2(e.target),R=F.useState(!e.show),j=R[0],B=R[1],L=NR(A,g,HR({placement:o,enableEvents:!!e.show,containerPadding:a||5,flip:n,offset:r,arrowElement:D,popperConfig:d})),Z=L.styles,U=L.attributes,z=D0(L,["styles","attributes"]);e.show?j&&B(!1):!e.transition&&!j&&B(!0);var $=function(){B(!0),e.onExited&&e.onExited.apply(e,arguments)},te=e.show||f&&!j;if(RR(g,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!te)return null;var Q=e.children(mr({},z,{show:!!e.show,props:mr({},U.popper,{style:Z.popper,ref:I}),arrowProps:mr({},U.arrow,{style:Z.arrow,ref:T})}));if(f){var ue=e.onExit,ee=e.onExiting,le=e.onEnter,W=e.onEntering,de=e.onEntered;Q=se.createElement(f,{in:e.show,appear:!0,onExit:ue,onExiting:ee,onExited:$,onEnter:le,onEntering:W,onEntered:de},Q)}return k?Z1.createPortal(Q,k):null});hS.displayName="Overlay";hS.propTypes={show:Me.bool,placement:Me.oneOf(G1),target:Me.any,container:Me.any,flip:Me.bool,children:Me.func.isRequired,containerPadding:Me.number,popperConfig:Me.object,rootClose:Me.bool,rootCloseEvent:Me.oneOf(["click","mousedown"]),rootCloseDisabled:Me.bool,onHide:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];if(t.rootClose){var i;return(i=Me.func).isRequired.apply(i,[t].concat(r))}return Me.func.apply(Me,[t].concat(r))},transition:Me.elementType,onEnter:Me.func,onEntering:Me.func,onEntered:Me.func,onExit:Me.func,onExiting:Me.func,onExited:Me.func};const ZR=hS;function $R(){this.__data__=[],this.size=0}var qR=$R,GR=yg;function JR(e,t){for(var n=e.length;n--;)if(GR(e[n][0],t))return n;return-1}var x0=JR,KR=x0,QR=Array.prototype,XR=QR.splice;function e_(e){var t=this.__data__,n=KR(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():XR.call(t,n,1),--this.size,!0}var t_=e_,n_=x0;function r_(e){var t=this.__data__,n=n_(t,e);return n<0?void 0:t[n][1]}var o_=r_,i_=x0;function a_(e){return i_(this.__data__,e)>-1}var s_=a_,l_=x0;function u_(e,t){var n=this.__data__,r=l_(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var c_=u_,d_=qR,f_=t_,h_=o_,p_=s_,m_=c_;function Yh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Yh.prototype.clear=d_;Yh.prototype.delete=f_;Yh.prototype.get=h_;Yh.prototype.has=p_;Yh.prototype.set=m_;var E0=Yh,g_=E0;function y_(){this.__data__=new g_,this.size=0}var v_=y_;function w_(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var b_=w_;function S_(e){return this.__data__.get(e)}var D_=S_;function T_(e){return this.__data__.has(e)}var I_=T_,x_=wl,E_=x_["__core-js_shared__"],C_=E_,ab=C_,p2=function(){var e=/[^.]+$/.exec(ab&&ab.keys&&ab.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function M_(e){return!!p2&&p2 in e}var k_=M_,N_=Function.prototype,A_=N_.toString;function F_(e){if(e!=null){try{return A_.call(e)}catch{}try{return e+""}catch{}}return""}var wM=F_,P_=lS,O_=k_,j_=uu,L_=wM,R_=/[\\^$.*+?()[\]{}|]/g,__=/^\[object .+?Constructor\]$/,B_=Function.prototype,H_=Object.prototype,Y_=B_.toString,U_=H_.hasOwnProperty,z_=RegExp("^"+Y_.call(U_).replace(R_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function V_(e){if(!j_(e)||O_(e))return!1;var t=P_(e)?z_:__;return t.test(L_(e))}var W_=V_;function Z_(e,t){return e==null?void 0:e[t]}var $_=Z_,q_=W_,G_=$_;function J_(e,t){var n=G_(e,t);return q_(n)?n:void 0}var Rd=J_,K_=Rd,Q_=wl,X_=K_(Q_,"Map"),pS=X_,eB=Rd,tB=eB(Object,"create"),C0=tB,m2=C0;function nB(){this.__data__=m2?m2(null):{},this.size=0}var rB=nB;function oB(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var iB=oB,aB=C0,sB="__lodash_hash_undefined__",lB=Object.prototype,uB=lB.hasOwnProperty;function cB(e){var t=this.__data__;if(aB){var n=t[e];return n===sB?void 0:n}return uB.call(t,e)?t[e]:void 0}var dB=cB,fB=C0,hB=Object.prototype,pB=hB.hasOwnProperty;function mB(e){var t=this.__data__;return fB?t[e]!==void 0:pB.call(t,e)}var gB=mB,yB=C0,vB="__lodash_hash_undefined__";function wB(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=yB&&t===void 0?vB:t,this}var bB=wB,SB=rB,DB=iB,TB=dB,IB=gB,xB=bB;function Uh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Uh.prototype.clear=SB;Uh.prototype.delete=DB;Uh.prototype.get=TB;Uh.prototype.has=IB;Uh.prototype.set=xB;var EB=Uh,g2=EB,CB=E0,MB=pS;function kB(){this.size=0,this.__data__={hash:new g2,map:new(MB||CB),string:new g2}}var NB=kB;function AB(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var FB=AB,PB=FB;function OB(e,t){var n=e.__data__;return PB(t)?n[typeof t=="string"?"string":"hash"]:n.map}var M0=OB,jB=M0;function LB(e){var t=jB(this,e).delete(e);return this.size-=t?1:0,t}var RB=LB,_B=M0;function BB(e){return _B(this,e).get(e)}var HB=BB,YB=M0;function UB(e){return YB(this,e).has(e)}var zB=UB,VB=M0;function WB(e,t){var n=VB(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var ZB=WB,$B=NB,qB=RB,GB=HB,JB=zB,KB=ZB;function zh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}zh.prototype.clear=$B;zh.prototype.delete=qB;zh.prototype.get=GB;zh.prototype.has=JB;zh.prototype.set=KB;var mS=zh,QB=E0,XB=pS,eH=mS,tH=200;function nH(e,t){var n=this.__data__;if(n instanceof QB){var r=n.__data__;if(!XB||r.length<tH-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new eH(r)}return n.set(e,t),this.size=n.size,this}var rH=nH,oH=E0,iH=v_,aH=b_,sH=D_,lH=I_,uH=rH;function Vh(e){var t=this.__data__=new oH(e);this.size=t.size}Vh.prototype.clear=iH;Vh.prototype.delete=aH;Vh.prototype.get=sH;Vh.prototype.has=lH;Vh.prototype.set=uH;var gS=Vh,cH="__lodash_hash_undefined__";function dH(e){return this.__data__.set(e,cH),this}var fH=dH;function hH(e){return this.__data__.has(e)}var pH=hH,mH=mS,gH=fH,yH=pH;function Hv(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new mH;++t<n;)this.add(e[t])}Hv.prototype.add=Hv.prototype.push=gH;Hv.prototype.has=yH;var vH=Hv;function wH(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var bH=wH;function SH(e,t){return e.has(t)}var DH=SH,TH=vH,IH=bH,xH=DH,EH=1,CH=2;function MH(e,t,n,r,o,i){var a=n&EH,u=e.length,d=t.length;if(u!=d&&!(a&&d>u))return!1;var f=i.get(e),m=i.get(t);if(f&&m)return f==t&&m==e;var g=-1,v=!0,w=n&CH?new TH:void 0;for(i.set(e,t),i.set(t,e);++g<u;){var D=e[g],T=t[g];if(r)var I=a?r(T,D,g,t,e,i):r(D,T,g,e,t,i);if(I!==void 0){if(I)continue;v=!1;break}if(w){if(!IH(t,function(k,A){if(!xH(w,A)&&(D===k||o(D,k,n,r,i)))return w.push(A)})){v=!1;break}}else if(!(D===T||o(D,T,n,r,i))){v=!1;break}}return i.delete(e),i.delete(t),v}var bM=MH,kH=wl,NH=kH.Uint8Array,SM=NH;function AH(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}var FH=AH;function PH(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var OH=PH,y2=Bh,v2=SM,jH=yg,LH=bM,RH=FH,_H=OH,BH=1,HH=2,YH="[object Boolean]",UH="[object Date]",zH="[object Error]",VH="[object Map]",WH="[object Number]",ZH="[object RegExp]",$H="[object Set]",qH="[object String]",GH="[object Symbol]",JH="[object ArrayBuffer]",KH="[object DataView]",w2=y2?y2.prototype:void 0,sb=w2?w2.valueOf:void 0;function QH(e,t,n,r,o,i,a){switch(n){case KH:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case JH:return!(e.byteLength!=t.byteLength||!i(new v2(e),new v2(t)));case YH:case UH:case WH:return jH(+e,+t);case zH:return e.name==t.name&&e.message==t.message;case ZH:case qH:return e==t+"";case VH:var u=RH;case $H:var d=r&BH;if(u||(u=_H),e.size!=t.size&&!d)return!1;var f=a.get(e);if(f)return f==t;r|=HH,a.set(e,t);var m=LH(u(e),u(t),r,o,i,a);return a.delete(e),m;case GH:if(sb)return sb.call(e)==sb.call(t)}return!1}var XH=QH;function eY(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var yS=eY,tY=Array.isArray,_a=tY,nY=yS,rY=_a;function oY(e,t,n){var r=t(e);return rY(e)?r:nY(r,n(e))}var DM=oY;function iY(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}var aY=iY;function sY(){return[]}var TM=sY,lY=aY,uY=TM,cY=Object.prototype,dY=cY.propertyIsEnumerable,b2=Object.getOwnPropertySymbols,fY=b2?function(e){return e==null?[]:(e=Object(e),lY(b2(e),function(t){return dY.call(e,t)}))}:uY,vS=fY;function hY(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var pY=hY,mY=Hh,gY=yc,yY="[object Arguments]";function vY(e){return gY(e)&&mY(e)==yY}var wY=vY,S2=wY,bY=yc,IM=Object.prototype,SY=IM.hasOwnProperty,DY=IM.propertyIsEnumerable,TY=S2(function(){return arguments}())?S2:function(e){return bY(e)&&SY.call(e,"callee")&&!DY.call(e,"callee")},wS=TY,Yv={exports:{}};function IY(){return!1}var xY=IY;Yv.exports;(function(e,t){var n=wl,r=xY,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,u=a?n.Buffer:void 0,d=u?u.isBuffer:void 0,f=d||r;e.exports=f})(Yv,Yv.exports);var k0=Yv.exports,EY=Hh,CY=uS,MY=yc,kY="[object Arguments]",NY="[object Array]",AY="[object Boolean]",FY="[object Date]",PY="[object Error]",OY="[object Function]",jY="[object Map]",LY="[object Number]",RY="[object Object]",_Y="[object RegExp]",BY="[object Set]",HY="[object String]",YY="[object WeakMap]",UY="[object ArrayBuffer]",zY="[object DataView]",VY="[object Float32Array]",WY="[object Float64Array]",ZY="[object Int8Array]",$Y="[object Int16Array]",qY="[object Int32Array]",GY="[object Uint8Array]",JY="[object Uint8ClampedArray]",KY="[object Uint16Array]",QY="[object Uint32Array]",$n={};$n[VY]=$n[WY]=$n[ZY]=$n[$Y]=$n[qY]=$n[GY]=$n[JY]=$n[KY]=$n[QY]=!0;$n[kY]=$n[NY]=$n[UY]=$n[AY]=$n[zY]=$n[FY]=$n[PY]=$n[OY]=$n[jY]=$n[LY]=$n[RY]=$n[_Y]=$n[BY]=$n[HY]=$n[YY]=!1;function XY(e){return MY(e)&&CY(e.length)&&!!$n[EY(e)]}var eU=XY;function tU(e){return function(t){return e(t)}}var N0=tU,Uv={exports:{}};Uv.exports;(function(e,t){var n=uM,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,u=function(){try{var d=o&&o.require&&o.require("util").types;return d||a&&a.binding&&a.binding("util")}catch{}}();e.exports=u})(Uv,Uv.exports);var bS=Uv.exports,nU=eU,rU=N0,D2=bS,T2=D2&&D2.isTypedArray,oU=T2?rU(T2):nU,SS=oU,iU=pY,aU=wS,sU=_a,lU=k0,uU=cS,cU=SS,dU=Object.prototype,fU=dU.hasOwnProperty;function hU(e,t){var n=sU(e),r=!n&&aU(e),o=!n&&!r&&lU(e),i=!n&&!r&&!o&&cU(e),a=n||r||o||i,u=a?iU(e.length,String):[],d=u.length;for(var f in e)(t||fU.call(e,f))&&!(a&&(f=="length"||o&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||uU(f,d)))&&u.push(f);return u}var xM=hU,pU=Object.prototype;function mU(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||pU;return e===n}var DS=mU;function gU(e,t){return function(n){return e(t(n))}}var EM=gU,yU=EM,vU=yU(Object.keys,Object),wU=vU,bU=DS,SU=wU,DU=Object.prototype,TU=DU.hasOwnProperty;function IU(e){if(!bU(e))return SU(e);var t=[];for(var n in Object(e))TU.call(e,n)&&n!="constructor"&&t.push(n);return t}var xU=IU,EU=xM,CU=xU,MU=vg;function kU(e){return MU(e)?EU(e):CU(e)}var Sg=kU,NU=DM,AU=vS,FU=Sg;function PU(e){return NU(e,FU,AU)}var CM=PU,I2=CM,OU=1,jU=Object.prototype,LU=jU.hasOwnProperty;function RU(e,t,n,r,o,i){var a=n&OU,u=I2(e),d=u.length,f=I2(t),m=f.length;if(d!=m&&!a)return!1;for(var g=d;g--;){var v=u[g];if(!(a?v in t:LU.call(t,v)))return!1}var w=i.get(e),D=i.get(t);if(w&&D)return w==t&&D==e;var T=!0;i.set(e,t),i.set(t,e);for(var I=a;++g<d;){v=u[g];var k=e[v],A=t[v];if(r)var R=a?r(A,k,v,t,e,i):r(k,A,v,e,t,i);if(!(R===void 0?k===A||o(k,A,n,r,i):R)){T=!1;break}I||(I=v=="constructor")}if(T&&!I){var j=e.constructor,B=t.constructor;j!=B&&"constructor"in e&&"constructor"in t&&!(typeof j=="function"&&j instanceof j&&typeof B=="function"&&B instanceof B)&&(T=!1)}return i.delete(e),i.delete(t),T}var _U=RU,BU=Rd,HU=wl,YU=BU(HU,"DataView"),UU=YU,zU=Rd,VU=wl,WU=zU(VU,"Promise"),ZU=WU,$U=Rd,qU=wl,GU=$U(qU,"Set"),JU=GU,KU=Rd,QU=wl,XU=KU(QU,"WeakMap"),ez=XU,a1=UU,s1=pS,l1=ZU,u1=JU,c1=ez,MM=Hh,Wh=wM,x2="[object Map]",tz="[object Object]",E2="[object Promise]",C2="[object Set]",M2="[object WeakMap]",k2="[object DataView]",nz=Wh(a1),rz=Wh(s1),oz=Wh(l1),iz=Wh(u1),az=Wh(c1),dd=MM;(a1&&dd(new a1(new ArrayBuffer(1)))!=k2||s1&&dd(new s1)!=x2||l1&&dd(l1.resolve())!=E2||u1&&dd(new u1)!=C2||c1&&dd(new c1)!=M2)&&(dd=function(e){var t=MM(e),n=t==tz?e.constructor:void 0,r=n?Wh(n):"";if(r)switch(r){case nz:return k2;case rz:return x2;case oz:return E2;case iz:return C2;case az:return M2}return t});var A0=dd,lb=gS,sz=bM,lz=XH,uz=_U,N2=A0,A2=_a,F2=k0,cz=SS,dz=1,P2="[object Arguments]",O2="[object Array]",Yy="[object Object]",fz=Object.prototype,j2=fz.hasOwnProperty;function hz(e,t,n,r,o,i){var a=A2(e),u=A2(t),d=a?O2:N2(e),f=u?O2:N2(t);d=d==P2?Yy:d,f=f==P2?Yy:f;var m=d==Yy,g=f==Yy,v=d==f;if(v&&F2(e)){if(!F2(t))return!1;a=!0,m=!1}if(v&&!m)return i||(i=new lb),a||cz(e)?sz(e,t,n,r,o,i):lz(e,t,d,n,r,o,i);if(!(n&dz)){var w=m&&j2.call(e,"__wrapped__"),D=g&&j2.call(t,"__wrapped__");if(w||D){var T=w?e.value():e,I=D?t.value():t;return i||(i=new lb),o(T,I,n,r,i)}}return v?(i||(i=new lb),uz(e,t,n,r,o,i)):!1}var pz=hz,mz=pz,L2=yc;function kM(e,t,n,r,o){return e===t?!0:e==null||t==null||!L2(e)&&!L2(t)?e!==e&&t!==t:mz(e,t,n,r,kM,o)}var TS=kM,gz=TS;function yz(e,t){return gz(e,t)}var vz=yz;const wz=$r(vz);function ub(e,t){var n=dS(e);return n?n.innerHeight:t?e.clientHeight:Dd(e).height}function NM(e,t,n){e.closest&&!n&&e.closest(t);var r=e;do{if(wR(r,t))return r;r=r.parentElement}while(r&&r!==n&&r.nodeType===document.ELEMENT_NODE);return null}function bz(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}var Sz=bz,Dz=gS,Tz=TS,Iz=1,xz=2;function Ez(e,t,n,r){var o=n.length,i=o,a=!r;if(e==null)return!i;for(e=Object(e);o--;){var u=n[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<i;){u=n[o];var d=u[0],f=e[d],m=u[1];if(a&&u[2]){if(f===void 0&&!(d in e))return!1}else{var g=new Dz;if(r)var v=r(f,m,d,e,t,g);if(!(v===void 0?Tz(m,f,Iz|xz,r,g):v))return!1}}return!0}var Cz=Ez,Mz=uu;function kz(e){return e===e&&!Mz(e)}var AM=kz,Nz=AM,Az=Sg;function Fz(e){for(var t=Az(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Nz(o)]}return t}var Pz=Fz;function Oz(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var FM=Oz,jz=Cz,Lz=Pz,Rz=FM;function _z(e){var t=Lz(e);return t.length==1&&t[0][2]?Rz(t[0][0],t[0][1]):function(n){return n===e||jz(n,e,t)}}var Bz=_z,Hz=_a,Yz=wg,Uz=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zz=/^\w*$/;function Vz(e,t){if(Hz(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Yz(e)?!0:zz.test(e)||!Uz.test(e)||t!=null&&e in Object(t)}var IS=Vz,PM=mS,Wz="Expected a function";function xS(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Wz);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(xS.Cache||PM),n}xS.Cache=PM;var Zz=xS,$z=Zz,qz=500;function Gz(e){var t=$z(e,function(r){return n.size===qz&&n.clear(),r}),n=t.cache;return t}var Jz=Gz,Kz=Jz,Qz=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xz=/\\(\\)?/g,eV=Kz(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Qz,function(n,r,o,i){t.push(o?i.replace(Xz,"$1"):r||n)}),t}),tV=eV;function nV(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var ES=nV,R2=Bh,rV=ES,oV=_a,iV=wg,aV=1/0,_2=R2?R2.prototype:void 0,B2=_2?_2.toString:void 0;function OM(e){if(typeof e=="string")return e;if(oV(e))return rV(e,OM)+"";if(iV(e))return B2?B2.call(e):"";var t=e+"";return t=="0"&&1/e==-aV?"-0":t}var sV=OM,lV=sV;function uV(e){return e==null?"":lV(e)}var cV=uV,dV=_a,fV=IS,hV=tV,pV=cV;function mV(e,t){return dV(e)?e:fV(e,t)?[e]:hV(pV(e))}var F0=mV,gV=wg,yV=1/0;function vV(e){if(typeof e=="string"||gV(e))return e;var t=e+"";return t=="0"&&1/e==-yV?"-0":t}var Dg=vV,wV=F0,bV=Dg;function SV(e,t){t=wV(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[bV(t[n++])];return n&&n==r?e:void 0}var P0=SV,DV=P0;function TV(e,t,n){var r=e==null?void 0:DV(e,t);return r===void 0?n:r}var IV=TV;function xV(e,t){return e!=null&&t in Object(e)}var EV=xV,CV=F0,MV=wS,kV=_a,NV=cS,AV=uS,FV=Dg;function PV(e,t,n){t=CV(t,e);for(var r=-1,o=t.length,i=!1;++r<o;){var a=FV(t[r]);if(!(i=e!=null&&n(e,a)))break;e=e[a]}return i||++r!=o?i:(o=e==null?0:e.length,!!o&&AV(o)&&NV(a,o)&&(kV(e)||MV(e)))}var OV=PV,jV=EV,LV=OV;function RV(e,t){return e!=null&&LV(e,t,jV)}var _V=RV,BV=TS,HV=IV,YV=_V,UV=IS,zV=AM,VV=FM,WV=Dg,ZV=1,$V=2;function qV(e,t){return UV(e)&&zV(t)?VV(WV(e),t):function(n){var r=HV(n,e);return r===void 0&&r===t?YV(n,e):BV(t,r,ZV|$V)}}var GV=qV;function JV(e){return e}var O0=JV;function KV(e){return function(t){return t==null?void 0:t[e]}}var QV=KV,XV=P0;function eW(e){return function(t){return XV(t,e)}}var tW=eW,nW=QV,rW=tW,oW=IS,iW=Dg;function aW(e){return oW(e)?nW(iW(e)):rW(e)}var sW=aW,lW=Bz,uW=GV,cW=O0,dW=_a,fW=sW;function hW(e){return typeof e=="function"?e:e==null?cW:typeof e=="object"?dW(e)?uW(e[0],e[1]):lW(e):fW(e)}var j0=hW,pW=Sz,mW=j0,gW=fM,yW=Math.max;function vW(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var o=n==null?0:gW(n);return o<0&&(o=yW(r+o,0)),pW(e,mW(t),o)}var wW=vW;const bW=$r(wW);var SW=Math.ceil,DW=Math.max;function TW(e,t,n,r){for(var o=-1,i=DW(SW((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a}var IW=TW,xW=IW,EW=I0,cb=dM;function CW(e){return function(t,n,r){return r&&typeof r!="number"&&EW(t,n,r)&&(n=r=void 0),t=cb(t),n===void 0?(n=t,t=0):n=cb(n),r=r===void 0?t<n?1:-1:cb(r),xW(t,n,r,e)}}var MW=CW,kW=MW,NW=kW(),AW=NW;const FW=$r(AW);var H2=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function PW(e,t){return!!(e===t||H2(e)&&H2(t))}function OW(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!PW(e[n],t[n]))return!1;return!0}function jM(e,t){t===void 0&&(t=OW);var n=null;function r(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var a=e.apply(this,o);return n={lastResult:a,lastArgs:o,lastThis:this},a}return r.clear=function(){n=null},r}var Y2=Bh,jW=wS,LW=_a,U2=Y2?Y2.isConcatSpreadable:void 0;function RW(e){return LW(e)||jW(e)||!!(U2&&e&&e[U2])}var _W=RW,BW=yS,HW=_W;function LM(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=HW),o||(o=[]);++i<a;){var u=e[i];t>0&&n(u)?t>1?LM(u,t-1,n,r,o):BW(o,u):r||(o[o.length]=u)}return o}var RM=LM;function YW(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),u=a.length;u--;){var d=a[e?u:++o];if(n(i[d],d,i)===!1)break}return t}}var UW=YW,zW=UW,VW=zW(),WW=VW,ZW=WW,$W=Sg;function qW(e,t){return e&&ZW(e,t,$W)}var CS=qW,GW=vg;function JW(e,t){return function(n,r){if(n==null)return n;if(!GW(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&r(a[i],i,a)!==!1;);return n}}var KW=JW,QW=CS,XW=KW,eZ=XW(QW),tZ=eZ,nZ=tZ,rZ=vg;function oZ(e,t){var n=-1,r=rZ(e)?Array(e.length):[];return nZ(e,function(o,i,a){r[++n]=t(o,i,a)}),r}var iZ=oZ;function aZ(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var sZ=aZ,z2=wg;function lZ(e,t){if(e!==t){var n=e!==void 0,r=e===null,o=e===e,i=z2(e),a=t!==void 0,u=t===null,d=t===t,f=z2(t);if(!u&&!f&&!i&&e>t||i&&a&&d&&!u&&!f||r&&a&&d||!n&&d||!o)return 1;if(!r&&!i&&!f&&e<t||f&&n&&o&&!r&&!i||u&&n&&o||!a&&o||!d)return-1}return 0}var uZ=lZ,cZ=uZ;function dZ(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,u=n.length;++r<a;){var d=cZ(o[r],i[r]);if(d){if(r>=u)return d;var f=n[r];return d*(f=="desc"?-1:1)}}return e.index-t.index}var fZ=dZ,db=ES,hZ=P0,pZ=j0,mZ=iZ,gZ=sZ,yZ=N0,vZ=fZ,wZ=O0,bZ=_a;function SZ(e,t,n){t.length?t=db(t,function(i){return bZ(i)?function(a){return hZ(a,i.length===1?i[0]:i)}:i}):t=[wZ];var r=-1;t=db(t,yZ(pZ));var o=mZ(e,function(i,a,u){var d=db(t,function(f){return f(i)});return{criteria:d,index:++r,value:i}});return gZ(o,function(i,a){return vZ(i,a,n)})}var DZ=SZ;function TZ(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var IZ=TZ,xZ=IZ,V2=Math.max;function EZ(e,t,n){return t=V2(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=V2(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var u=Array(t+1);++o<t;)u[o]=r[o];return u[t]=n(a),xZ(e,this,u)}}var _M=EZ;function CZ(e){return function(){return e}}var MZ=CZ,kZ=Rd,NZ=function(){try{var e=kZ(Object,"defineProperty");return e({},"",{}),e}catch{}}(),BM=NZ,AZ=MZ,W2=BM,FZ=O0,PZ=W2?function(e,t){return W2(e,"toString",{configurable:!0,enumerable:!1,value:AZ(t),writable:!0})}:FZ,OZ=PZ,jZ=800,LZ=16,RZ=Date.now;function _Z(e){var t=0,n=0;return function(){var r=RZ(),o=LZ-(r-n);if(n=r,o>0){if(++t>=jZ)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var BZ=_Z,HZ=OZ,YZ=BZ,UZ=YZ(HZ),HM=UZ,zZ=O0,VZ=_M,WZ=HM;function ZZ(e,t){return WZ(VZ(e,t,zZ),e+"")}var YM=ZZ,$Z=RM,qZ=DZ,GZ=YM,Z2=I0,JZ=GZ(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Z2(e,t[0],t[1])?t=[]:n>2&&Z2(t[0],t[1],t[2])&&(t=[t[0]]),qZ(e,$Z(t,1),[])}),KZ=JZ;const QZ=$r(KZ);function d1(e,t){var n=dS(e);return n?n.innerWidth:t?e.clientWidth:Dd(e).width}function UM(e){return ZC(e)||sM(e)||iS(e)||$C()}function XZ(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var zM=XZ,$2=BM;function e$(e,t,n){t=="__proto__"&&$2?$2(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var MS=e$,t$=MS,n$=yg,r$=Object.prototype,o$=r$.hasOwnProperty;function i$(e,t,n){var r=e[t];(!(o$.call(e,t)&&n$(r,n))||n===void 0&&!(t in e))&&t$(e,t,n)}var VM=i$,a$=VM,s$=MS;function l$(e,t,n,r){var o=!n;n||(n={});for(var i=-1,a=t.length;++i<a;){var u=t[i],d=r?r(n[u],e[u],u,n,e):void 0;d===void 0&&(d=e[u]),o?s$(n,u,d):a$(n,u,d)}return n}var Tg=l$,u$=Tg,c$=Sg;function d$(e,t){return e&&u$(t,c$(t),e)}var f$=d$;function h$(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var p$=h$,m$=uu,g$=DS,y$=p$,v$=Object.prototype,w$=v$.hasOwnProperty;function b$(e){if(!m$(e))return y$(e);var t=g$(e),n=[];for(var r in e)r=="constructor"&&(t||!w$.call(e,r))||n.push(r);return n}var S$=b$,D$=xM,T$=S$,I$=vg;function x$(e){return I$(e)?D$(e,!0):T$(e)}var L0=x$,E$=Tg,C$=L0;function M$(e,t){return e&&E$(t,C$(t),e)}var k$=M$,zv={exports:{}};zv.exports;(function(e,t){var n=wl,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i?n.Buffer:void 0,u=a?a.allocUnsafe:void 0;function d(f,m){if(m)return f.slice();var g=f.length,v=u?u(g):new f.constructor(g);return f.copy(v),v}e.exports=d})(zv,zv.exports);var N$=zv.exports;function A$(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var F$=A$,P$=Tg,O$=vS;function j$(e,t){return P$(e,O$(e),t)}var L$=j$,R$=EM,_$=R$(Object.getPrototypeOf,Object),R0=_$,B$=yS,H$=R0,Y$=vS,U$=TM,z$=Object.getOwnPropertySymbols,V$=z$?function(e){for(var t=[];e;)B$(t,Y$(e)),e=H$(e);return t}:U$,WM=V$,W$=Tg,Z$=WM;function $$(e,t){return W$(e,Z$(e),t)}var q$=$$,G$=DM,J$=WM,K$=L0;function Q$(e){return G$(e,K$,J$)}var ZM=Q$,X$=Object.prototype,eq=X$.hasOwnProperty;function tq(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&eq.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var nq=tq,q2=SM;function rq(e){var t=new e.constructor(e.byteLength);return new q2(t).set(new q2(e)),t}var kS=rq,oq=kS;function iq(e,t){var n=t?oq(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var aq=iq,sq=/\w*$/;function lq(e){var t=new e.constructor(e.source,sq.exec(e));return t.lastIndex=e.lastIndex,t}var uq=lq,G2=Bh,J2=G2?G2.prototype:void 0,K2=J2?J2.valueOf:void 0;function cq(e){return K2?Object(K2.call(e)):{}}var dq=cq,fq=kS;function hq(e,t){var n=t?fq(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var pq=hq,mq=kS,gq=aq,yq=uq,vq=dq,wq=pq,bq="[object Boolean]",Sq="[object Date]",Dq="[object Map]",Tq="[object Number]",Iq="[object RegExp]",xq="[object Set]",Eq="[object String]",Cq="[object Symbol]",Mq="[object ArrayBuffer]",kq="[object DataView]",Nq="[object Float32Array]",Aq="[object Float64Array]",Fq="[object Int8Array]",Pq="[object Int16Array]",Oq="[object Int32Array]",jq="[object Uint8Array]",Lq="[object Uint8ClampedArray]",Rq="[object Uint16Array]",_q="[object Uint32Array]";function Bq(e,t,n){var r=e.constructor;switch(t){case Mq:return mq(e);case bq:case Sq:return new r(+e);case kq:return gq(e,n);case Nq:case Aq:case Fq:case Pq:case Oq:case jq:case Lq:case Rq:case _q:return wq(e,n);case Dq:return new r;case Tq:case Eq:return new r(e);case Iq:return yq(e);case xq:return new r;case Cq:return vq(e)}}var Hq=Bq,Yq=uu,Q2=Object.create,Uq=function(){function e(){}return function(t){if(!Yq(t))return{};if(Q2)return Q2(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),$M=Uq,zq=$M,Vq=R0,Wq=DS;function Zq(e){return typeof e.constructor=="function"&&!Wq(e)?zq(Vq(e)):{}}var $q=Zq,qq=A0,Gq=yc,Jq="[object Map]";function Kq(e){return Gq(e)&&qq(e)==Jq}var Qq=Kq,Xq=Qq,eG=N0,X2=bS,eI=X2&&X2.isMap,tG=eI?eG(eI):Xq,nG=tG,rG=A0,oG=yc,iG="[object Set]";function aG(e){return oG(e)&&rG(e)==iG}var sG=aG,lG=sG,uG=N0,tI=bS,nI=tI&&tI.isSet,cG=nI?uG(nI):lG,dG=cG,fG=gS,hG=zM,pG=VM,mG=f$,gG=k$,yG=N$,vG=F$,wG=L$,bG=q$,SG=CM,DG=ZM,TG=A0,IG=nq,xG=Hq,EG=$q,CG=_a,MG=k0,kG=nG,NG=uu,AG=dG,FG=Sg,PG=L0,OG=1,jG=2,LG=4,qM="[object Arguments]",RG="[object Array]",_G="[object Boolean]",BG="[object Date]",HG="[object Error]",GM="[object Function]",YG="[object GeneratorFunction]",UG="[object Map]",zG="[object Number]",JM="[object Object]",VG="[object RegExp]",WG="[object Set]",ZG="[object String]",$G="[object Symbol]",qG="[object WeakMap]",GG="[object ArrayBuffer]",JG="[object DataView]",KG="[object Float32Array]",QG="[object Float64Array]",XG="[object Int8Array]",eJ="[object Int16Array]",tJ="[object Int32Array]",nJ="[object Uint8Array]",rJ="[object Uint8ClampedArray]",oJ="[object Uint16Array]",iJ="[object Uint32Array]",Vn={};Vn[qM]=Vn[RG]=Vn[GG]=Vn[JG]=Vn[_G]=Vn[BG]=Vn[KG]=Vn[QG]=Vn[XG]=Vn[eJ]=Vn[tJ]=Vn[UG]=Vn[zG]=Vn[JM]=Vn[VG]=Vn[WG]=Vn[ZG]=Vn[$G]=Vn[nJ]=Vn[rJ]=Vn[oJ]=Vn[iJ]=!0;Vn[HG]=Vn[GM]=Vn[qG]=!1;function pv(e,t,n,r,o,i){var a,u=t&OG,d=t&jG,f=t&LG;if(n&&(a=o?n(e,r,o,i):n(e)),a!==void 0)return a;if(!NG(e))return e;var m=CG(e);if(m){if(a=IG(e),!u)return vG(e,a)}else{var g=TG(e),v=g==GM||g==YG;if(MG(e))return yG(e,u);if(g==JM||g==qM||v&&!o){if(a=d||v?{}:EG(e),!u)return d?bG(e,gG(a,e)):wG(e,mG(a,e))}else{if(!Vn[g])return o?e:{};a=xG(e,g,u)}}i||(i=new fG);var w=i.get(e);if(w)return w;i.set(e,a),AG(e)?e.forEach(function(I){a.add(pv(I,t,n,I,e,i))}):kG(e)&&e.forEach(function(I,k){a.set(k,pv(I,t,n,k,e,i))});var D=f?d?DG:SG:d?PG:FG,T=m?void 0:D(e);return hG(T||e,function(I,k){T&&(k=I,I=e[k]),pG(a,k,pv(I,t,n,k,e,i))}),a}var aJ=pv;function sJ(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var lJ=sJ,uJ=P0,cJ=lM;function dJ(e,t){return t.length<2?e:uJ(e,cJ(t,0,-1))}var fJ=dJ,hJ=F0,pJ=lJ,mJ=fJ,gJ=Dg;function yJ(e,t){return t=hJ(t,e),e=mJ(e,t),e==null||delete e[gJ(pJ(t))]}var vJ=yJ,wJ=Hh,bJ=R0,SJ=yc,DJ="[object Object]",TJ=Function.prototype,IJ=Object.prototype,KM=TJ.toString,xJ=IJ.hasOwnProperty,EJ=KM.call(Object);function CJ(e){if(!SJ(e)||wJ(e)!=DJ)return!1;var t=bJ(e);if(t===null)return!0;var n=xJ.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&KM.call(n)==EJ}var MJ=CJ,kJ=MJ;function NJ(e){return kJ(e)?void 0:e}var AJ=NJ,FJ=RM;function PJ(e){var t=e==null?0:e.length;return t?FJ(e,1):[]}var OJ=PJ,jJ=OJ,LJ=_M,RJ=HM;function _J(e){return RJ(LJ(e,void 0,jJ),e+"")}var BJ=_J,HJ=ES,YJ=aJ,UJ=vJ,zJ=F0,VJ=Tg,WJ=AJ,ZJ=BJ,$J=ZM,qJ=1,GJ=2,JJ=4,KJ=ZJ(function(e,t){var n={};if(e==null)return n;var r=!1;t=HJ(t,function(i){return i=zJ(i,e),r||(r=i.length>1),i}),VJ(e,$J(e),n),r&&(n=YJ(n,qJ|GJ|JJ,WJ));for(var o=t.length;o--;)UJ(n,t[o]);return n}),QJ=KJ;const XJ=$r(QJ);var eK=YM,tK=yg,nK=I0,rK=L0,QM=Object.prototype,oK=QM.hasOwnProperty,iK=eK(function(e,t){e=Object(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&nK(t[0],t[1],o)&&(r=1);++n<r;)for(var i=t[n],a=rK(i),u=-1,d=a.length;++u<d;){var f=a[u],m=e[f];(m===void 0||tK(m,QM[f])&&!oK.call(e,f))&&(e[f]=i[f])}return e}),aK=iK;const sK=$r(aK);var lK=zM,uK=$M,cK=CS,dK=j0,fK=R0,hK=_a,pK=k0,mK=lS,gK=uu,yK=SS;function vK(e,t,n){var r=hK(e),o=r||pK(e)||yK(e);if(t=dK(t),n==null){var i=e&&e.constructor;o?n=r?new i:[]:gK(e)?n=mK(i)?uK(fK(e)):{}:n={}}return(o?lK:cK)(e,function(a,u,d){return t(n,a,u,d)}),n}var wK=vK;const bK=$r(wK);var SK=MS,DK=CS,TK=j0;function IK(e,t){var n={};return t=TK(t),DK(e,function(r,o,i){SK(n,o,t(r,o,i))}),n}var xK=IK;const EK=$r(xK);var CK={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Vr,function(){return function(n,r,o){r.prototype.isBetween=function(i,a,u,d){var f=o(i),m=o(a),g=(d=d||"()")[0]==="(",v=d[1]===")";return(g?this.isAfter(f,u):!this.isBefore(f,u))&&(v?this.isBefore(m,u):!this.isAfter(m,u))||(g?this.isBefore(f,u):!this.isAfter(f,u))&&(v?this.isAfter(m,u):!this.isBefore(m,u))}}})})(CK);var MK={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Vr,function(){return function(n,r){r.prototype.isSameOrAfter=function(o,i){return this.isSame(o,i)||this.isAfter(o,i)}}})})(MK);var kK={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Vr,function(){return function(n,r){r.prototype.isSameOrBefore=function(o,i){return this.isSame(o,i)||this.isBefore(o,i)}}})})(kK);var NK={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Vr,function(){return function(n,r,o){var i=r.prototype,a=function(g){return g&&(g.indexOf?g:g.s)},u=function(g,v,w,D,T){var I=g.name?g:g.$locale(),k=a(I[v]),A=a(I[w]),R=k||A.map(function(B){return B.slice(0,D)});if(!T)return R;var j=I.weekStart;return R.map(function(B,L){return R[(L+(j||0))%7]})},d=function(){return o.Ls[o.locale()]},f=function(g,v){return g.formats[v]||function(w){return w.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(D,T,I){return T||I.slice(1)})}(g.formats[v.toUpperCase()])},m=function(){var g=this;return{months:function(v){return v?v.format("MMMM"):u(g,"months")},monthsShort:function(v){return v?v.format("MMM"):u(g,"monthsShort","months",3)},firstDayOfWeek:function(){return g.$locale().weekStart||0},weekdays:function(v){return v?v.format("dddd"):u(g,"weekdays")},weekdaysMin:function(v){return v?v.format("dd"):u(g,"weekdaysMin","weekdays",2)},weekdaysShort:function(v){return v?v.format("ddd"):u(g,"weekdaysShort","weekdays",3)},longDateFormat:function(v){return f(g.$locale(),v)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return m.bind(this)()},o.localeData=function(){var g=d();return{firstDayOfWeek:function(){return g.weekStart||0},weekdays:function(){return o.weekdays()},weekdaysShort:function(){return o.weekdaysShort()},weekdaysMin:function(){return o.weekdaysMin()},months:function(){return o.months()},monthsShort:function(){return o.monthsShort()},longDateFormat:function(v){return f(g,v)},meridiem:g.meridiem,ordinal:g.ordinal}},o.months=function(){return u(d(),"months")},o.monthsShort=function(){return u(d(),"monthsShort","months",3)},o.weekdays=function(g){return u(d(),"weekdays",null,null,g)},o.weekdaysShort=function(g){return u(d(),"weekdaysShort","weekdays",3,g)},o.weekdaysMin=function(g){return u(d(),"weekdaysMin","weekdays",2,g)}}})})(NK);var AK={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Vr,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,i){var a=o.prototype,u=a.format;i.en.formats=n,a.format=function(d){d===void 0&&(d="YYYY-MM-DDTHH:mm:ssZ");var f=this.$locale().formats,m=function(g,v){return g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(w,D,T){var I=T&&T.toUpperCase();return D||v[T]||n[T]||v[I].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(k,A,R){return A||R.slice(1)})})}(d,f===void 0?{}:f);return u.call(this,m)}}})})(AK);var FK={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Vr,function(){return function(n,r,o){var i=function(a,u){if(!u||!u.length||u.length===1&&!u[0]||u.length===1&&Array.isArray(u[0])&&!u[0].length)return null;var d;u.length===1&&u[0].length>0&&(u=u[0]),d=(u=u.filter(function(m){return m}))[0];for(var f=1;f<u.length;f+=1)u[f].isValid()&&!u[f][a](d)||(d=u[f]);return d};o.max=function(){var a=[].slice.call(arguments,0);return i("isAfter",a)},o.min=function(){var a=[].slice.call(arguments,0);return i("isBefore",a)}}})})(FK);var PK={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Vr,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(i,a,u){var d=a.prototype;u.utc=function(T){var I={date:T,utc:!0,args:arguments};return new a(I)},d.utc=function(T){var I=u(this.toDate(),{locale:this.$L,utc:!0});return T?I.add(this.utcOffset(),n):I},d.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var f=d.parse;d.parse=function(T){T.utc&&(this.$u=!0),this.$utils().u(T.$offset)||(this.$offset=T.$offset),f.call(this,T)};var m=d.init;d.init=function(){if(this.$u){var T=this.$d;this.$y=T.getUTCFullYear(),this.$M=T.getUTCMonth(),this.$D=T.getUTCDate(),this.$W=T.getUTCDay(),this.$H=T.getUTCHours(),this.$m=T.getUTCMinutes(),this.$s=T.getUTCSeconds(),this.$ms=T.getUTCMilliseconds()}else m.call(this)};var g=d.utcOffset;d.utcOffset=function(T,I){var k=this.$utils().u;if(k(T))return this.$u?0:k(this.$offset)?g.call(this):this.$offset;if(typeof T=="string"&&(T=function(B){B===void 0&&(B="");var L=B.match(r);if(!L)return null;var Z=(""+L[0]).match(o)||["-",0,0],U=Z[0],z=60*+Z[1]+ +Z[2];return z===0?0:U==="+"?z:-z}(T),T===null))return this;var A=Math.abs(T)<=16?60*T:T,R=this;if(I)return R.$offset=A,R.$u=T===0,R;if(T!==0){var j=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(R=this.local().add(A+j,n)).$offset=A,R.$x.$localOffset=j}else R=this.utc();return R};var v=d.format;d.format=function(T){var I=T||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return v.call(this,I)},d.valueOf=function(){var T=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*T},d.isUTC=function(){return!!this.$u},d.toISOString=function(){return this.toDate().toISOString()},d.toString=function(){return this.toDate().toUTCString()};var w=d.toDate;d.toDate=function(T){return T==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():w.call(this)};var D=d.diff;d.diff=function(T,I,k){if(T&&this.$u===T.$u)return D.call(this,T,I,k);var A=this.local(),R=u(T).local();return D.call(A,R,I,k)}}})})(PK);function Kl(e){return e.children}var Pi={PREVIOUS:"PREV",NEXT:"NEXT",TODAY:"TODAY",DATE:"DATE"},ii={MONTH:"month",WEEK:"week",WORK_WEEK:"work_week",DAY:"day",AGENDA:"agenda"},rI=Object.keys(ii).map(function(e){return ii[e]});Me.oneOfType([Me.string,Me.func]);Me.any;Me.func;Me.oneOfType([Me.arrayOf(Me.oneOf(rI)),Me.objectOf(function(e,t){var n=rI.indexOf(t)!==-1&&typeof e[t]=="boolean";if(n)return null;for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return Me.elementType.apply(Me,[e,t].concat(o))})]);Me.oneOfType([Me.oneOf(["overlap","no-overlap"]),Me.func]);function nr(e,t){e&&e.apply(null,[].concat(t))}var oI={seconds:1e3,minutes:1e3*60,hours:1e3*60*60,day:1e3*60*60*24};function XM(e,t){var n=Io(e,"month");return Io(n,"week",t.startOfWeek())}function e3(e,t){var n=_v(e,"month");return _v(n,"week",t.startOfWeek())}function OK(e,t){for(var n=XM(e,t),r=e3(e,t),o=[];Rh(n,r,"day");)o.push(n),n=gs(n,1,"day");return o}function jK(e,t){var n=Io(e,t);return mg(n,e)?n:gs(n,1,t)}function LK(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",r=e,o=[];Rh(r,t,n);)o.push(r),r=gs(r,1,n);return o}function RK(e,t){return t==null&&e==null?null:(t==null&&(t=new Date),e==null&&(e=new Date),e=Io(e,"day"),e=Vm(e,Vm(t)),e=Th(e,Th(t)),e=zm(e,zm(t)),Um(e,Um(t)))}function iI(e){return Vm(e)===0&&Th(e)===0&&zm(e)===0&&Um(e)===0}function _K(e,t,n,r){return n==="day"&&(n="date"),Math.abs(JT[n](e,void 0,r)-JT[n](t,void 0,r))}function NS(e,t,n){return!n||n==="milliseconds"?Math.abs(+e-+t):Math.round(Math.abs(+Io(e,n)/oI[n]-+Io(t,n)/oI[n]))}var BK=Me.oneOfType([Me.string,Me.func]);function HK(e,t,n,r,o){var i=typeof r=="function"?r(n,o,e):t.call(e,n,r,o);return Lm(i==null||typeof i=="string","`localizer format(..)` must return a string, null, or undefined"),i}function YK(e,t,n){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,t+n,0,0)}function AS(e,t){return e.getTimezoneOffset()-t.getTimezoneOffset()}function UK(e,t){return NS(e,t,"minutes")+AS(e,t)}function zK(e){var t=Io(e,"day");return NS(t,e,"minutes")+AS(t,e)}function VK(e,t){return sS(e,t,"day")}function WK(e,t,n){var r=mg(e,t,"minutes");return r?gg(t,n,"minutes"):T0(t,n,"minutes")}function f1(e,t){return _K(e,t,"day")}function ZK(e){var t=e.evtA,n=t.start,r=t.end,o=t.allDay,i=e.evtB,a=i.start,u=i.end,d=i.allDay,f=+Io(n,"day")-+Io(a,"day"),m=f1(n,r),g=f1(a,u);return f||g-m||!!d-!!o||+n-+a||+r-+u}function $K(e){var t=e.event,n=t.start,r=t.end,o=e.range,i=o.start,a=o.end,u=Io(n,"day"),d=Rh(u,a,"day"),f=aS(u,r,"minutes"),m=f?T0(r,i,"minutes"):gg(r,i,"minutes");return d&&m}function qK(e,t){return mg(e,t,"day")}function GK(e,t){return iI(e)&&iI(t)}var JK=uo(function e(t){var n=this;lo(this,e),Lm(typeof t.format=="function","date localizer `format(..)` must be a function"),Lm(typeof t.firstOfWeek=="function","date localizer `firstOfWeek(..)` must be a function"),this.propType=t.propType||BK,this.formats=t.formats,this.format=function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return HK.apply(void 0,[n,t.format].concat(o))},this.startOfWeek=t.firstOfWeek,this.merge=t.merge||RK,this.inRange=t.inRange||rM,this.lt=t.lt||sS,this.lte=t.lte||Rh,this.gt=t.gt||T0,this.gte=t.gte||gg,this.eq=t.eq||mg,this.neq=t.neq||aS,this.startOf=t.startOf||Io,this.endOf=t.endOf||_v,this.add=t.add||gs,this.range=t.range||LK,this.diff=t.diff||NS,this.ceil=t.ceil||jK,this.min=t.min||tM,this.max=t.max||nM,this.minutes=t.minutes||Th,this.daySpan=t.daySpan||f1,this.firstVisibleDay=t.firstVisibleDay||XM,this.lastVisibleDay=t.lastVisibleDay||e3,this.visibleDays=t.visibleDays||OK,this.getSlotDate=t.getSlotDate||YK,this.getTimezoneOffset=t.getTimezoneOffset||function(r){return r.getTimezoneOffset()},this.getDstOffset=t.getDstOffset||AS,this.getTotalMin=t.getTotalMin||UK,this.getMinutesFromMidnight=t.getMinutesFromMidnight||zK,this.continuesPrior=t.continuesPrior||VK,this.continuesAfter=t.continuesAfter||WK,this.sortEvents=t.sortEvents||ZK,this.inEventRange=t.inEventRange||$K,this.isSameDate=t.isSameDate||qK,this.startAndEndAreDateOnly=t.startAndEndAreDateOnly||GK,this.segmentOffset=t.browserTZOffset?t.browserTZOffset():0});function KK(e,t,n,r){var o=zn(zn({},e.formats),n);return zn(zn({},e),{},{messages:r,startOfWeek:function(){return e.startOfWeek(t)},format:function(a,u){return e.format(a,o[u]||u,t)}})}var QK={date:"Date",time:"Time",event:"Event",allDay:"All Day",week:"Week",work_week:"Work Week",day:"Day",month:"Month",previous:"Back",next:"Next",yesterday:"Yesterday",tomorrow:"Tomorrow",today:"Today",agenda:"Agenda",noEventsInRange:"There are no events in this range.",showMore:function(t){return"+".concat(t," more")}};function XK(e){return zn(zn({},QK),e)}function eQ(e){var t=e.ref,n=e.callback;F.useEffect(function(){var r=function(i){t.current&&!t.current.contains(i.target)&&n()};return document.addEventListener("mousedown",r),function(){document.removeEventListener("mousedown",r)}},[t,n])}var tQ=["style","className","event","selected","isAllDay","onSelect","onDoubleClick","onKeyPress","localizer","continuesPrior","continuesAfter","accessors","getters","children","components","slotStart","slotEnd"],t3=function(e){li(t,e);function t(){return lo(this,t),si(this,t,arguments)}return uo(t,[{key:"render",value:function(){var r=this.props,o=r.style,i=r.className,a=r.event,u=r.selected,d=r.isAllDay,f=r.onSelect,m=r.onDoubleClick,g=r.onKeyPress,v=r.localizer,w=r.continuesPrior,D=r.continuesAfter,T=r.accessors,I=r.getters,k=r.children,A=r.components,R=A.event,j=A.eventWrapper,B=r.slotStart,L=r.slotEnd,Z=vl(r,tQ);delete Z.resizable;var U=T.title(a),z=T.tooltip(a),$=T.end(a),te=T.start(a),Q=T.allDay(a),ue=d||Q||v.diff(te,v.ceil($,"day"),"day")>1,ee=I.eventProp(a,te,$,u),le=se.createElement("div",{className:"rbc-event-content",title:z||void 0},R?se.createElement(R,{event:a,continuesPrior:w,continuesAfter:D,title:U,isAllDay:Q,localizer:v,slotStart:B,slotEnd:L}):U);return se.createElement(j,Object.assign({},this.props,{type:"date"}),se.createElement("div",Object.assign({},Z,{style:zn(zn({},ee.style),o),className:Zr("rbc-event",i,ee.className,{"rbc-selected":u,"rbc-event-allday":ue,"rbc-event-continues-prior":w,"rbc-event-continues-after":D}),onClick:function(de){return f&&f(a,de)},onDoubleClick:function(de){return m&&m(a,de)},onKeyDown:function(de){return g&&g(a,de)}}),typeof k=="function"?k(le):le))}}]),t}(se.Component);function _0(e,t){return!e||t==null?!1:wz(e,t)}function n3(e,t){var n=e.right-e.left,r=n/t;return r}function r3(e,t,n,r){var o=n3(e,r);return n?r-1-Math.floor((t-e.left)/o):Math.floor((t-e.left)/o)}function nQ(e,t){var n=t.x,r=t.y;return r>=e.top&&r<=e.bottom&&n>=e.left&&n<=e.right}function rQ(e,t,n,r,o){var i=-1,a=-1,u=r-1,d=n3(t,r),f=r3(t,n.x,o,r),m=t.top<n.y&&t.bottom>n.y,g=t.top<e.y&&t.bottom>e.y,v=e.y>t.bottom,w=t.top>e.y,D=n.top<t.top&&n.bottom>t.bottom;return D&&(i=0,a=u),m&&(w?(i=0,a=f):v&&(i=f,a=u)),g&&(i=a=o?u-Math.floor((e.x-t.left)/d):Math.floor((e.x-t.left)/d),m?f<i?i=f:a=f:e.y<n.y?a=u:i=0),{startIdx:i,endIdx:a}}function oQ(e){var t=e.target,n=e.offset,r=e.container,o=e.box,i=Dd(t),a=i.top,u=i.left,d=i.width,f=i.height,m=Dd(r),g=m.top,v=m.left,w=m.width,D=m.height,T=Dd(o),I=T.width,k=T.height,A=g+D,R=v+w,j=a+k,B=u+I,L=n.x,Z=n.y,U=j>A?a-k-Z:a+Z+f,z=B>R?u+L-I+d:u+L;return{topOffset:U,leftOffset:z}}function iQ(e){var t=e.containerRef,n=e.accessors,r=e.getters,o=e.selected,i=e.components,a=e.localizer,u=e.position,d=e.show,f=e.events,m=e.slotStart,g=e.slotEnd,v=e.onSelect,w=e.onDoubleClick,D=e.onKeyPress,T=e.handleDragStart,I=e.popperRef,k=e.target,A=e.offset;eQ({ref:I,callback:d}),F.useLayoutEffect(function(){var B=oQ({target:k,offset:A,container:t.current,box:I.current}),L=B.topOffset,Z=B.leftOffset;I.current.style.top="".concat(L,"px"),I.current.style.left="".concat(Z,"px")},[A.x,A.y,k]);var R=u.width,j={minWidth:R+R/2};return se.createElement("div",{style:j,className:"rbc-overlay",ref:I},se.createElement("div",{className:"rbc-overlay-header"},a.format(m,"dayHeaderFormat")),f.map(function(B,L){return se.createElement(t3,{key:L,type:"popup",localizer:a,event:B,getters:r,onSelect:v,accessors:n,components:i,onDoubleClick:w,onKeyPress:D,continuesPrior:a.lt(n.end(B),m,"day"),continuesAfter:a.gte(n.start(B),g,"day"),slotStart:m,slotEnd:g,selected:_0(B,o),draggable:!0,onDragStart:function(){return T(B)},onDragEnd:function(){return d()}})}))}var o3=se.forwardRef(function(e,t){return se.createElement(iQ,Object.assign({},e,{popperRef:t}))});o3.propTypes={accessors:Me.object.isRequired,getters:Me.object.isRequired,selected:Me.object,components:Me.object.isRequired,localizer:Me.object.isRequired,position:Me.object.isRequired,show:Me.func.isRequired,events:Me.array.isRequired,slotStart:Me.instanceOf(Date).isRequired,slotEnd:Me.instanceOf(Date),onSelect:Me.func,onDoubleClick:Me.func,onKeyPress:Me.func,handleDragStart:Me.func,style:Me.object,offset:Me.shape({x:Me.number,y:Me.number})};function aQ(e){var t=e.containerRef,n=e.popupOffset,r=n===void 0?5:n,o=e.overlay,i=e.accessors,a=e.localizer,u=e.components,d=e.getters,f=e.selected,m=e.handleSelectEvent,g=e.handleDoubleClickEvent,v=e.handleKeyPressEvent,w=e.handleDragStart,D=e.onHide,T=e.overlayDisplay,I=F.useRef(null);if(!o.position)return null;var k=r;isNaN(r)||(k={x:r,y:r});var A=o.position,R=o.events,j=o.date,B=o.end;return se.createElement(ZR,{rootClose:!0,flip:!0,show:!0,placement:"bottom",onHide:D,target:o.target},function(L){var Z=L.props;return se.createElement(o3,Object.assign({},Z,{containerRef:t,ref:I,target:o.target,offset:k,accessors:i,getters:d,selected:f,components:u,localizer:a,position:A,show:T,events:R,slotStart:j,slotEnd:B,onSelect:m,onDoubleClick:g,onKeyPress:v,handleDragStart:w}))})}var FS=se.forwardRef(function(e,t){return se.createElement(aQ,Object.assign({},e,{containerRef:t}))});FS.propTypes={popupOffset:Me.oneOfType([Me.number,Me.shape({x:Me.number,y:Me.number})]),overlay:Me.shape({position:Me.object,events:Me.array,date:Me.instanceOf(Date),end:Me.instanceOf(Date)}),accessors:Me.object.isRequired,localizer:Me.object.isRequired,components:Me.object.isRequired,getters:Me.object.isRequired,selected:Me.object,handleSelectEvent:Me.func,handleDoubleClickEvent:Me.func,handleKeyPressEvent:Me.func,handleDragStart:Me.func,onHide:Me.func,overlayDisplay:Me.func};function Lo(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:document;return ym(n,e,t,{passive:!1})}function sQ(e,t,n){return!e||Wm(e,document.elementFromPoint(t,n))}function lQ(e,t){var n=t.clientX,r=t.clientY,o=document.elementFromPoint(n,r);return NM(o,".rbc-event",e)}function uQ(e,t){var n=t.clientX,r=t.clientY,o=document.elementFromPoint(n,r);return NM(o,".rbc-show-more",e)}function Vv(e,t){return!!lQ(e,t)}function cQ(e,t){return!!uQ(e,t)}function nh(e){var t=e;return e.touches&&e.touches.length&&(t=e.touches[0]),{clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY}}var aI=5,dQ=250,i3=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.global,o=r===void 0?!1:r,i=n.longPressThreshold,a=i===void 0?250:i,u=n.validContainers,d=u===void 0?[]:u;lo(this,e),this.isDetached=!1,this.container=t,this.globalMouse=!t||o,this.longPressThreshold=a,this.validContainers=d,this._listeners=Object.create(null),this._handleInitialEvent=this._handleInitialEvent.bind(this),this._handleMoveEvent=this._handleMoveEvent.bind(this),this._handleTerminatingEvent=this._handleTerminatingEvent.bind(this),this._keyListener=this._keyListener.bind(this),this._dropFromOutsideListener=this._dropFromOutsideListener.bind(this),this._dragOverFromOutsideListener=this._dragOverFromOutsideListener.bind(this),this._removeTouchMoveWindowListener=Lo("touchmove",function(){},window),this._removeKeyDownListener=Lo("keydown",this._keyListener),this._removeKeyUpListener=Lo("keyup",this._keyListener),this._removeDropFromOutsideListener=Lo("drop",this._dropFromOutsideListener),this._removeDragOverFromOutsideListener=Lo("dragover",this._dragOverFromOutsideListener),this._addInitialEventListener()}return uo(e,[{key:"on",value:function(n,r){var o=this._listeners[n]||(this._listeners[n]=[]);return o.push(r),{remove:function(){var a=o.indexOf(r);a!==-1&&o.splice(a,1)}}}},{key:"emit",value:function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];var a,u=this._listeners[n]||[];return u.forEach(function(d){a===void 0&&(a=d.apply(void 0,o))}),a}},{key:"teardown",value:function(){this.isDetached=!0,this._listeners=Object.create(null),this._removeTouchMoveWindowListener&&this._removeTouchMoveWindowListener(),this._removeInitialEventListener&&this._removeInitialEventListener(),this._removeEndListener&&this._removeEndListener(),this._onEscListener&&this._onEscListener(),this._removeMoveListener&&this._removeMoveListener(),this._removeKeyUpListener&&this._removeKeyUpListener(),this._removeKeyDownListener&&this._removeKeyDownListener(),this._removeDropFromOutsideListener&&this._removeDropFromOutsideListener(),this._removeDragOverFromOutsideListener&&this._removeDragOverFromOutsideListener()}},{key:"isSelected",value:function(n){var r=this._selectRect;return!r||!this.selecting?!1:sI(r,Ad(n))}},{key:"filter",value:function(n){var r=this._selectRect;return!r||!this.selecting?[]:n.filter(this.isSelected,this)}},{key:"_addLongPressListener",value:function(n,r){var o=this,i=null,a=null,u=null,d=function(v){i=setTimeout(function(){m(),n(v)},o.longPressThreshold),a=Lo("touchmove",function(){return m()}),u=Lo("touchend",function(){return m()})},f=Lo("touchstart",d),m=function(){i&&clearTimeout(i),a&&a(),u&&u(),i=null,a=null,u=null};return r&&d(r),function(){m(),f()}}},{key:"_addInitialEventListener",value:function(){var n=this,r=Lo("mousedown",function(i){n._removeInitialEventListener(),n._handleInitialEvent(i),n._removeInitialEventListener=Lo("mousedown",n._handleInitialEvent)}),o=Lo("touchstart",function(i){n._removeInitialEventListener(),n._removeInitialEventListener=n._addLongPressListener(n._handleInitialEvent,i)});this._removeInitialEventListener=function(){r(),o()}}},{key:"_dropFromOutsideListener",value:function(n){var r=nh(n),o=r.pageX,i=r.pageY,a=r.clientX,u=r.clientY;this.emit("dropFromOutside",{x:o,y:i,clientX:a,clientY:u}),n.preventDefault()}},{key:"_dragOverFromOutsideListener",value:function(n){var r=nh(n),o=r.pageX,i=r.pageY,a=r.clientX,u=r.clientY;this.emit("dragOverFromOutside",{x:o,y:i,clientX:a,clientY:u}),n.preventDefault()}},{key:"_handleInitialEvent",value:function(n){if(!this.isDetached){var r=nh(n),o=r.clientX,i=r.clientY,a=r.pageX,u=r.pageY,d=this.container(),f,m;if(!(n.which===3||n.button===2||!sQ(d,o,i))){if(!this.globalMouse&&d&&!Wm(d,n.target)){var g=fQ(0),v=g.top,w=g.left,D=g.bottom,T=g.right;if(m=Ad(d),f=sI({top:m.top-v,left:m.left-w,bottom:m.bottom+D,right:m.right+T},{top:u,left:a}),!f)return}var I=this.emit("beforeSelect",this._initialEventData={isTouch:/^touch/.test(n.type),x:a,y:u,clientX:o,clientY:i});if(I!==!1)switch(n.type){case"mousedown":this._removeEndListener=Lo("mouseup",this._handleTerminatingEvent),this._onEscListener=Lo("keydown",this._handleTerminatingEvent),this._removeMoveListener=Lo("mousemove",this._handleMoveEvent);break;case"touchstart":this._handleMoveEvent(n),this._removeEndListener=Lo("touchend",this._handleTerminatingEvent),this._removeMoveListener=Lo("touchmove",this._handleMoveEvent);break}}}}},{key:"_isWithinValidContainer",value:function(n){var r=n.target,o=this.validContainers;return!o||!o.length||!r?!0:o.some(function(i){return!!r.closest(i)})}},{key:"_handleTerminatingEvent",value:function(n){var r=nh(n),o=r.pageX,i=r.pageY;if(this.selecting=!1,this._removeEndListener&&this._removeEndListener(),this._removeMoveListener&&this._removeMoveListener(),!!this._initialEventData){var a=!this.container||Wm(this.container(),n.target),u=this._isWithinValidContainer(n),d=this._selectRect,f=this.isClick(o,i);return this._initialEventData=null,n.key==="Escape"||!u?this.emit("reset"):f&&a?this._handleClickEvent(n):f?this.emit("reset"):this.emit("select",d)}}},{key:"_handleClickEvent",value:function(n){var r=nh(n),o=r.pageX,i=r.pageY,a=r.clientX,u=r.clientY,d=new Date().getTime();return this._lastClickData&&d-this._lastClickData.timestamp<dQ?(this._lastClickData=null,this.emit("doubleClick",{x:o,y:i,clientX:a,clientY:u})):(this._lastClickData={timestamp:d},this.emit("click",{x:o,y:i,clientX:a,clientY:u}))}},{key:"_handleMoveEvent",value:function(n){if(!(this._initialEventData===null||this.isDetached)){var r=this._initialEventData,o=r.x,i=r.y,a=nh(n),u=a.pageX,d=a.pageY,f=Math.abs(o-u),m=Math.abs(i-d),g=Math.min(u,o),v=Math.min(d,i),w=this.selecting;this.isClick(u,d)&&!w&&!(f||m)||(this.selecting=!0,this._selectRect={top:v,left:g,x:u,y:d,right:g+f,bottom:v+m},w||this.emit("selectStart",this._initialEventData),this.isClick(u,d)||this.emit("selecting",this._selectRect),n.preventDefault())}}},{key:"_keyListener",value:function(n){this.ctrl=n.metaKey||n.ctrlKey}},{key:"isClick",value:function(n,r){var o=this._initialEventData,i=o.x,a=o.y,u=o.isTouch;return!u&&Math.abs(n-i)<=aI&&Math.abs(r-a)<=aI}}]),e}();function fQ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return ru(e)!=="object"&&(e={top:e,left:e,right:e,bottom:e}),e}function sI(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=Ad(e),o=r.top,i=r.left,a=r.right,u=a===void 0?i:a,d=r.bottom,f=d===void 0?o:d,m=Ad(t),g=m.top,v=m.left,w=m.right,D=w===void 0?v:w,T=m.bottom,I=T===void 0?g:T;return!(f-n<g||o+n>I||u-n<v||i+n>D)}function Ad(e){if(!e.getBoundingClientRect)return e;var t=e.getBoundingClientRect(),n=t.left+lI("left"),r=t.top+lI("top");return{top:r,left:n,right:(e.offsetWidth||0)+n,bottom:(e.offsetHeight||0)+r}}function lI(e){if(e==="left")return window.pageXOffset||document.body.scrollLeft||0;if(e==="top")return window.pageYOffset||document.body.scrollTop||0}var hQ=function(e){li(t,e);function t(n,r){var o;return lo(this,t),o=si(this,t,[n,r]),o.state={selecting:!1},o.containerRef=F.createRef(),o}return uo(t,[{key:"componentDidMount",value:function(){this.props.selectable&&this._selectable()}},{key:"componentWillUnmount",value:function(){this._teardownSelectable()}},{key:"componentDidUpdate",value:function(r){!r.selectable&&this.props.selectable&&this._selectable(),r.selectable&&!this.props.selectable&&this._teardownSelectable()}},{key:"render",value:function(){var r=this.props,o=r.range,i=r.getNow,a=r.getters,u=r.date,d=r.components.dateCellWrapper,f=r.localizer,m=this.state,g=m.selecting,v=m.startIdx,w=m.endIdx,D=i();return se.createElement("div",{className:"rbc-row-bg",ref:this.containerRef},o.map(function(T,I){var k=g&&I>=v&&I<=w,A=a.dayProp(T),R=A.className,j=A.style;return se.createElement(d,{key:I,value:T,range:o},se.createElement("div",{style:j,className:Zr("rbc-day-bg",R,k&&"rbc-selected-cell",f.isSameDate(T,D)&&"rbc-today",u&&f.neq(u,T,"month")&&"rbc-off-range-bg")}))}))}},{key:"_selectable",value:function(){var r=this,o=this.containerRef.current,i=this._selector=new i3(this.props.container,{longPressThreshold:this.props.longPressThreshold}),a=function(d,f){if(!Vv(o,d)&&!cQ(o,d)){var m=Ad(o),g=r.props,v=g.range,w=g.rtl;if(nQ(m,d)){var D=r3(m,d.x,w,v.length);r._selectSlot({startIdx:D,endIdx:D,action:f,box:d})}}r._initial={},r.setState({selecting:!1})};i.on("selecting",function(u){var d=r.props,f=d.range,m=d.rtl,g=-1,v=-1;if(r.state.selecting||(nr(r.props.onSelectStart,[u]),r._initial={x:u.x,y:u.y}),i.isSelected(o)){var w=Ad(o),D=rQ(r._initial,w,u,f.length,m);g=D.startIdx,v=D.endIdx}r.setState({selecting:!0,startIdx:g,endIdx:v})}),i.on("beforeSelect",function(u){if(r.props.selectable==="ignoreEvents")return!Vv(r.containerRef.current,u)}),i.on("click",function(u){return a(u,"click")}),i.on("doubleClick",function(u){return a(u,"doubleClick")}),i.on("select",function(u){r._selectSlot(zn(zn({},r.state),{},{action:"select",bounds:u})),r._initial={},r.setState({selecting:!1}),nr(r.props.onSelectEnd,[r.state])})}},{key:"_teardownSelectable",value:function(){this._selector&&(this._selector.teardown(),this._selector=null)}},{key:"_selectSlot",value:function(r){var o=r.endIdx,i=r.startIdx,a=r.action,u=r.bounds,d=r.box;o!==-1&&i!==-1&&this.props.onSelectSlot&&this.props.onSelectSlot({start:i,end:o,action:a,bounds:u,box:d,resourceId:this.props.resourceId})}}]),t}(se.Component),cl={propTypes:{slotMetrics:Me.object.isRequired,selected:Me.object,isAllDay:Me.bool,accessors:Me.object.isRequired,localizer:Me.object.isRequired,components:Me.object.isRequired,getters:Me.object.isRequired,onSelect:Me.func,onDoubleClick:Me.func,onKeyPress:Me.func},defaultProps:{segments:[],selected:{}},renderEvent:function(t,n){var r=t.selected;t.isAllDay;var o=t.accessors,i=t.getters,a=t.onSelect,u=t.onDoubleClick,d=t.onKeyPress,f=t.localizer,m=t.slotMetrics,g=t.components,v=t.resizable,w=m.continuesPrior(n),D=m.continuesAfter(n);return se.createElement(t3,{event:n,getters:i,localizer:f,accessors:o,components:g,onSelect:a,onDoubleClick:u,onKeyPress:d,continuesPrior:w,continuesAfter:D,slotStart:m.first,slotEnd:m.last,selected:_0(n,r),resizable:v})},renderSpan:function(t,n,r){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:" ",i=Math.abs(n)/t*100+"%";return se.createElement("div",{key:r,className:"rbc-row-segment",style:{WebkitFlexBasis:i,flexBasis:i,maxWidth:i}},o)}},a3=function(e){li(t,e);function t(){return lo(this,t),si(this,t,arguments)}return uo(t,[{key:"render",value:function(){var r=this,o=this.props,i=o.segments,a=o.slotMetrics.slots,u=o.className,d=1;return se.createElement("div",{className:Zr(u,"rbc-row")},i.reduce(function(f,m,g){var v=m.event,w=m.left,D=m.right,T=m.span,I="_lvl_"+g,k=w-d,A=cl.renderEvent(r.props,v);return k&&f.push(cl.renderSpan(a,k,"".concat(I,"_gap"))),f.push(cl.renderSpan(a,T,I,A)),d=D+1,f},[]))}}]),t}(se.Component);a3.defaultProps=zn({},cl.defaultProps);function s3(e){var t=e.dateRange,n=e.unit,r=n===void 0?"day":n,o=e.localizer;return{first:t[0],last:o.add(t[t.length-1],1,r)}}function pQ(e,t,n,r){var o=s3({dateRange:t,localizer:r}),i=o.first,a=o.last,u=r.diff(i,a,"day"),d=r.max(r.startOf(n.start(e),"day"),i),f=r.min(r.ceil(n.end(e),"day"),a),m=bW(t,function(v){return r.isSameDate(v,d)}),g=r.diff(d,f,"day");return g=Math.min(g,u),g=Math.max(g-r.segmentOffset,1),{event:e,span:g,left:m+1,right:Math.max(m+g,1)}}function l3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1/0,n,r,o,i=[],a=[];for(n=0;n<e.length;n++){for(o=e[n],r=0;r<i.length&&mQ(o,i[r]);r++);r>=t?a.push(o):(i[r]||(i[r]=[])).push(o)}for(n=0;n<i.length;n++)i[n].sort(function(u,d){return u.left-d.left});return{levels:i,extra:a}}function Zm(e,t,n,r,o){var i={start:r.start(e),end:r.end(e)},a={start:t,end:n};return o.inEventRange({event:i,range:a})}function mQ(e,t){return t.some(function(n){return n.left<=e.right&&n.right>=e.left})}function gQ(e,t,n){var r=hv(e),o=[],i=[];r.forEach(function(d){var f=t.start(d),m=t.end(d);n.daySpan(f,m)>1?o.push(d):i.push(d)});var a=o.sort(function(d,f){return h1(d,f,t,n)}),u=i.sort(function(d,f){return h1(d,f,t,n)});return[].concat(hv(a),hv(u))}function h1(e,t,n,r){var o={start:n.start(e),end:n.end(e),allDay:n.allDay(e)},i={start:n.start(t),end:n.end(t),allDay:n.allDay(t)};return r.sortEvents({evtA:o,evtB:i})}var u3=function(t,n){return t.left<=n&&t.right>=n},uI=function(t,n){return t.filter(function(r){return u3(r,n)}).map(function(r){return r.event})},c3=function(e){li(t,e);function t(){return lo(this,t),si(this,t,arguments)}return uo(t,[{key:"render",value:function(){for(var r=this.props,o=r.segments,i=r.slotMetrics.slots,a=l3(o).levels[0],u=1,d=1,f=[];u<=i;){var m="_lvl_"+u,g=a.filter(function(A){return u3(A,u)})[0]||{},v=g.event,w=g.left,D=g.right,T=g.span;if(!v){u++;continue}var I=Math.max(0,w-d);if(this.canRenderSlotEvent(w,T)){var k=cl.renderEvent(this.props,v);I&&f.push(cl.renderSpan(i,I,m+"_gap")),f.push(cl.renderSpan(i,T,m,k)),d=u=D+1}else I&&f.push(cl.renderSpan(i,I,m+"_gap")),f.push(cl.renderSpan(i,1,m,this.renderShowMore(o,u))),d=u+=1}return se.createElement("div",{className:"rbc-row"},f)}},{key:"canRenderSlotEvent",value:function(r,o){var i=this.props.segments;return FW(r,r+o).every(function(a){var u=uI(i,a).length;return u===1})}},{key:"renderShowMore",value:function(r,o){var i=this,a=this.props,u=a.localizer,d=a.slotMetrics,f=d.getEventsForSlot(o),m=uI(r,o),g=m.length;return g?se.createElement("button",{type:"button",key:"sm_"+o,className:Zr("rbc-button-link","rbc-show-more"),onClick:function(w){return i.showMore(o,w)}},u.messages.showMore(g,m,f)):!1}},{key:"showMore",value:function(r,o){o.preventDefault(),o.stopPropagation(),this.props.onShowMore(r,o.target)}}]),t}(se.Component);c3.defaultProps=zn({},cl.defaultProps);var yQ=function(t){var n=t.children;return se.createElement("div",{className:"rbc-row-content-scroll-container"},n)},vQ=function(t,n){return t.left<=n&&t.right>=n},wQ=function(t,n){return t[0].range===n[0].range&&t[0].events===n[0].events};function d3(){return jM(function(e){for(var t=e.range,n=e.events,r=e.maxRows,o=e.minRows,i=e.accessors,a=e.localizer,u=s3({dateRange:t,localizer:a}),d=u.first,f=u.last,m=n.map(function(T){return pQ(T,t,i,a)}),g=l3(m,Math.max(r-1,1)),v=g.levels,w=g.extra,D=w.length>0?o-1:o;v.length<D;)v.push([]);return{first:d,last:f,levels:v,extra:w,range:t,slots:t.length,clone:function(I){var k=d3();return k(zn(zn({},e),I))},getDateForSlot:function(I){return t[I]},getSlotForDate:function(I){return t.find(function(k){return a.isSameDate(k,I)})},getEventsForSlot:function(I){return m.filter(function(k){return vQ(k,I)}).map(function(k){return k.event})},continuesPrior:function(I){return a.continuesPrior(i.start(I),d)},continuesAfter:function(I){var k=i.start(I),A=i.end(I);return a.continuesAfter(k,A,f)}}},wQ)}var Wv=function(e){li(t,e);function t(){var n;lo(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=si(this,t,[].concat(o)),n.handleSelectSlot=function(a){var u=n.props,d=u.range,f=u.onSelectSlot;f(d.slice(a.start,a.end+1),a)},n.handleShowMore=function(a,u){var d=n.props,f=d.range,m=d.onShowMore,g=n.slotMetrics(n.props),v=SR(n.containerRef.current,".rbc-row-bg")[0],w;v&&(w=v.children[a-1]);var D=g.getEventsForSlot(a);m(D,f[a-1],w,a,u)},n.getContainer=function(){var a=n.props.container;return a?a():n.containerRef.current},n.renderHeadingCell=function(a,u){var d=n.props,f=d.renderHeader,m=d.getNow,g=d.localizer;return f({date:a,key:"header_".concat(u),className:Zr("rbc-date-cell",g.isSameDate(a,m())&&"rbc-now")})},n.renderDummy=function(){var a=n.props,u=a.className,d=a.range,f=a.renderHeader,m=a.showAllEvents;return se.createElement("div",{className:u,ref:n.containerRef},se.createElement("div",{className:Zr("rbc-row-content",m&&"rbc-row-content-scrollable")},f&&se.createElement("div",{className:"rbc-row",ref:n.headingRowRef},d.map(n.renderHeadingCell)),se.createElement("div",{className:"rbc-row",ref:n.eventRowRef},se.createElement("div",{className:"rbc-row-segment"},se.createElement("div",{className:"rbc-event"},se.createElement("div",{className:"rbc-event-content"}," "))))))},n.containerRef=F.createRef(),n.headingRowRef=F.createRef(),n.eventRowRef=F.createRef(),n.slotMetrics=d3(),n}return uo(t,[{key:"getRowLimit",value:function(){var r,o=ub(this.eventRowRef.current),i=(r=this.headingRowRef)!==null&&r!==void 0&&r.current?ub(this.headingRowRef.current):0,a=ub(this.containerRef.current)-i;return Math.max(Math.floor(a/o),1)}},{key:"render",value:function(){var r=this.props,o=r.date,i=r.rtl,a=r.range,u=r.className,d=r.selected,f=r.selectable,m=r.renderForMeasure,g=r.accessors,v=r.getters,w=r.components,D=r.getNow,T=r.renderHeader,I=r.onSelect,k=r.localizer,A=r.onSelectStart,R=r.onSelectEnd,j=r.onDoubleClick,B=r.onKeyPress,L=r.resourceId,Z=r.longPressThreshold,U=r.isAllDay,z=r.resizable,$=r.showAllEvents;if(m)return this.renderDummy();var te=this.slotMetrics(this.props),Q=te.levels,ue=te.extra,ee=$?yQ:Kl,le=w.weekWrapper,W={selected:d,accessors:g,getters:v,localizer:k,components:w,onSelect:I,onDoubleClick:j,onKeyPress:B,resourceId:L,slotMetrics:te,resizable:z};return se.createElement("div",{className:u,role:"rowgroup",ref:this.containerRef},se.createElement(hQ,{localizer:k,date:o,getNow:D,rtl:i,range:a,selectable:f,container:this.getContainer,getters:v,onSelectStart:A,onSelectEnd:R,onSelectSlot:this.handleSelectSlot,components:w,longPressThreshold:Z,resourceId:L}),se.createElement("div",{className:Zr("rbc-row-content",$&&"rbc-row-content-scrollable"),role:"row"},T&&se.createElement("div",{className:"rbc-row ",ref:this.headingRowRef},a.map(this.renderHeadingCell)),se.createElement(ee,null,se.createElement(le,Object.assign({isAllDay:U},W,{rtl:this.props.rtl}),Q.map(function(de,oe){return se.createElement(a3,Object.assign({key:oe,segments:de},W))}),!!ue.length&&se.createElement(c3,Object.assign({segments:ue,onShowMore:this.handleShowMore},W))))))}}]),t}(se.Component);Wv.defaultProps={minRows:0,maxRows:1/0};var f3=function(t){var n=t.label;return se.createElement("span",{role:"columnheader","aria-sort":"none"},n)},bQ=function(t){var n=t.label,r=t.drilldownView,o=t.onDrillDown;return r?se.createElement("button",{type:"button",className:"rbc-button-link",onClick:o,role:"cell"},n):se.createElement("span",null,n)},SQ=["date","className"],DQ=function(t,n,r,o,i){return t.filter(function(a){return Zm(a,n,r,o,i)})},B0=function(e){li(t,e);function t(){var n;lo(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=si(this,t,[].concat(o)),n.getContainer=function(){return n.containerRef.current},n.renderWeek=function(a,u){var d=n.props,f=d.events,m=d.components,g=d.selectable,v=d.getNow,w=d.selected,D=d.date,T=d.localizer,I=d.longPressThreshold,k=d.accessors,A=d.getters,R=d.showAllEvents,j=n.state,B=j.needLimitMeasure,L=j.rowLimit,Z=DQ(hv(f),a[0],a[a.length-1],k,T),U=gQ(Z,k,T);return se.createElement(Wv,{key:u,ref:u===0?n.slotRowRef:void 0,container:n.getContainer,className:"rbc-month-row",getNow:v,date:D,range:a,events:U,maxRows:R?1/0:L,selected:w,selectable:g,components:m,accessors:k,getters:A,localizer:T,renderHeader:n.readerDateHeading,renderForMeasure:B,onShowMore:n.handleShowMore,onSelect:n.handleSelectEvent,onDoubleClick:n.handleDoubleClickEvent,onKeyPress:n.handleKeyPressEvent,onSelectSlot:n.handleSelectSlot,longPressThreshold:I,rtl:n.props.rtl,resizable:n.props.resizable,showAllEvents:R})},n.readerDateHeading=function(a){var u=a.date,d=a.className,f=vl(a,SQ),m=n.props,g=m.date,v=m.getDrilldownView,w=m.localizer,D=w.neq(u,g,"month"),T=w.isSameDate(u,g),I=v(u),k=w.format(u,"dateFormat"),A=n.props.components.dateHeader||bQ;return se.createElement("div",Object.assign({},f,{className:Zr(d,D&&"rbc-off-range",T&&"rbc-current"),role:"cell"}),se.createElement(A,{label:k,date:u,drilldownView:I,isOffRange:D,onDrillDown:function(j){return n.handleHeadingClick(u,I,j)}}))},n.handleSelectSlot=function(a,u){n._pendingSelection=n._pendingSelection.concat(a),clearTimeout(n._selectTimer),n._selectTimer=setTimeout(function(){return n.selectDates(u)})},n.handleHeadingClick=function(a,u,d){d.preventDefault(),n.clearSelection(),nr(n.props.onDrillDown,[a,u])},n.handleSelectEvent=function(){n.clearSelection();for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];nr(n.props.onSelectEvent,u)},n.handleDoubleClickEvent=function(){n.clearSelection();for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];nr(n.props.onDoubleClickEvent,u)},n.handleKeyPressEvent=function(){n.clearSelection();for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];nr(n.props.onKeyPressEvent,u)},n.handleShowMore=function(a,u,d,f,m){var g=n.props,v=g.popup,w=g.onDrillDown,D=g.onShowMore,T=g.getDrilldownView,I=g.doShowMoreDrillDown;if(n.clearSelection(),v){var k=gM(d,n.containerRef.current);n.setState({overlay:{date:u,events:a,position:k,target:m}})}else I&&nr(w,[u,T(u)||ii.DAY]);nr(D,[a,u,f])},n.overlayDisplay=function(){n.setState({overlay:null})},n.state={rowLimit:5,needLimitMeasure:!0,date:null},n.containerRef=F.createRef(),n.slotRowRef=F.createRef(),n._bgRows=[],n._pendingSelection=[],n}return uo(t,[{key:"componentDidMount",value:function(){var r=this,o;this.state.needLimitMeasure&&this.measureRowLimit(this.props),window.addEventListener("resize",this._resizeListener=function(){o||yM(function(){o=!1,r.setState({needLimitMeasure:!0})})},!1)}},{key:"componentDidUpdate",value:function(){this.state.needLimitMeasure&&this.measureRowLimit(this.props)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this._resizeListener,!1)}},{key:"render",value:function(){var r=this.props,o=r.date,i=r.localizer,a=r.className,u=i.visibleDays(o,i),d=iR(u,7);return this._weekCount=d.length,se.createElement("div",{className:Zr("rbc-month-view",a),role:"table","aria-label":"Month View",ref:this.containerRef},se.createElement("div",{className:"rbc-row rbc-month-header",role:"row"},this.renderHeaders(d[0])),d.map(this.renderWeek),this.props.popup&&this.renderOverlay())}},{key:"renderHeaders",value:function(r){var o=this.props,i=o.localizer,a=o.components,u=r[0],d=r[r.length-1],f=a.header||f3;return i.range(u,d,"day").map(function(m,g){return se.createElement("div",{key:"header_"+g,className:"rbc-header"},se.createElement(f,{date:m,localizer:i,label:i.format(m,"weekdayFormat")}))})}},{key:"renderOverlay",value:function(){var r,o,i=this,a=(r=(o=this.state)===null||o===void 0?void 0:o.overlay)!==null&&r!==void 0?r:{},u=this.props,d=u.accessors,f=u.localizer,m=u.components,g=u.getters,v=u.selected,w=u.popupOffset,D=u.handleDragStart,T=function(){return i.setState({overlay:null})};return se.createElement(FS,{overlay:a,accessors:d,localizer:f,components:m,getters:g,selected:v,popupOffset:w,ref:this.containerRef,handleKeyPressEvent:this.handleKeyPressEvent,handleSelectEvent:this.handleSelectEvent,handleDoubleClickEvent:this.handleDoubleClickEvent,handleDragStart:D,show:!!a.position,overlayDisplay:this.overlayDisplay,onHide:T})}},{key:"measureRowLimit",value:function(){this.setState({needLimitMeasure:!1,rowLimit:this.slotRowRef.current.getRowLimit()})}},{key:"selectDates",value:function(r){var o=this._pendingSelection.slice();this._pendingSelection=[],o.sort(function(u,d){return+u-+d});var i=new Date(o[0]),a=new Date(o[o.length-1]);a.setDate(o[o.length-1].getDate()+1),nr(this.props.onSelectSlot,{slots:o,start:i,end:a,action:r.action,bounds:r.bounds,box:r.box})}},{key:"clearSelection",value:function(){clearTimeout(this._selectTimer),this._pendingSelection=[]}}],[{key:"getDerivedStateFromProps",value:function(r,o){var i=r.date,a=r.localizer;return{date:i,needLimitMeasure:a.neq(i,o.date,"month")}}}]),t}(se.Component);B0.range=function(e,t){var n=t.localizer,r=n.firstVisibleDay(e,n),o=n.lastVisibleDay(e,n);return{start:r,end:o}};B0.navigate=function(e,t,n){var r=n.localizer;switch(t){case Pi.PREVIOUS:return r.add(e,-1,"month");case Pi.NEXT:return r.add(e,1,"month");default:return e}};B0.title=function(e,t){var n=t.localizer;return n.format(e,"monthHeaderFormat")};var cI=function(t){var n=t.min,r=t.max,o=t.step,i=t.slots,a=t.localizer;return"".concat(+a.startOf(n,"minutes"))+"".concat(+a.startOf(r,"minutes"))+"".concat(o,"-").concat(i)};function PS(e){for(var t=e.min,n=e.max,r=e.step,o=e.timeslots,i=e.localizer,a=cI({start:t,end:n,step:r,timeslots:o,localizer:i}),u=1+i.getTotalMin(t,n),d=i.getMinutesFromMidnight(t),f=Math.ceil((u-1)/(r*o)),m=f*o,g=new Array(f),v=new Array(m),w=0;w<f;w++){g[w]=new Array(o);for(var D=0;D<o;D++){var T=w*o+D,I=T*r;v[T]=g[w][D]=i.getSlotDate(t,d,I)}}var k=v.length*r;v.push(i.getSlotDate(t,d,k));function A(R){var j=i.diff(t,R,"minutes")+i.getDstOffset(t,R);return Math.min(j,u)}return{groups:g,update:function(j){return cI(j)!==a?PS(j):this},dateIsInGroup:function(j,B){var L=g[B+1];return i.inRange(j,g[B][0],L?L[0]:n,"minutes")},nextSlot:function(j){var B=v[Math.min(v.indexOf(j)+1,v.length-1)];return B===j&&(B=i.add(j,r,"minutes")),B},closestSlotToPosition:function(j){var B=Math.min(v.length-1,Math.max(0,Math.floor(j*m)));return v[B]},closestSlotFromPoint:function(j,B){var L=Math.abs(B.top-B.bottom);return this.closestSlotToPosition((j.y-B.top)/L)},closestSlotFromDate:function(j){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(i.lt(j,t,"minutes"))return v[0];if(i.gt(j,n,"minutes"))return v[v.length-1];var L=i.diff(t,j,"minutes");return v[(L-L%r)/r+B]},startsBeforeDay:function(j){return i.lt(j,t,"day")},startsAfterDay:function(j){return i.gt(j,n,"day")},startsBefore:function(j){return i.lt(i.merge(t,j),t,"minutes")},startsAfter:function(j){return i.gt(i.merge(n,j),n,"minutes")},getRange:function(j,B,L,Z){L||(j=i.min(n,i.max(t,j))),Z||(B=i.min(n,i.max(t,B)));var U=A(j),z=A(B),$=z>r*m&&!i.eq(n,B)?(U-r)/(r*m)*100:U/(r*m)*100;return{top:$,height:z/(r*m)*100-$,start:A(j),startDate:j,end:A(B),endDate:B}},getCurrentTimePosition:function(j){var B=A(j),L=B/(r*m)*100;return L}}}var TQ=function(){function e(t,n){var r=n.accessors,o=n.slotMetrics;lo(this,e);var i=o.getRange(r.start(t),r.end(t)),a=i.start,u=i.startDate,d=i.end,f=i.endDate,m=i.top,g=i.height;this.start=a,this.end=d,this.startMs=+u,this.endMs=+f,this.top=m,this.height=g,this.data=t}return uo(e,[{key:"_width",get:function(){if(this.rows){var n=this.rows.reduce(function(o,i){return Math.max(o,i.leaves.length+1)},0)+1;return 100/n}if(this.leaves){var r=100-this.container._width;return r/(this.leaves.length+1)}return this.row._width}},{key:"width",get:function(){var n=this._width,r=Math.min(100,this._width*1.7);if(this.rows)return r;if(this.leaves)return this.leaves.length>0?r:n;var o=this.row.leaves,i=o.indexOf(this);return i===o.length-1?n:r}},{key:"xOffset",get:function(){if(this.rows)return 0;if(this.leaves)return this.container._width;var n=this.row,r=n.leaves,o=n.xOffset,i=n._width,a=r.indexOf(this)+1;return o+a*i}}]),e}();function IQ(e,t,n){return Math.abs(t.start-e.start)<n||t.start>e.start&&t.start<e.end}function xQ(e){for(var t=QZ(e,["startMs",function(u){return-u.endMs}]),n=[];t.length>0;){var r=t.shift();n.push(r);for(var o=0;o<t.length;o++){var i=t[o];if(!(r.endMs>i.startMs)){if(o>0){var a=t.splice(o,1)[0];n.push(a)}break}}}return n}function h3(e){for(var t=e.events,n=e.minimumStartDifference,r=e.slotMetrics,o=e.accessors,i=t.map(function(m){return new TQ(m,{slotMetrics:r,accessors:o})}),a=xQ(i),u=[],d=function(){var g=a[f],v=u.find(function(T){return T.end>g.start||Math.abs(g.start-T.start)<n});if(!v)return g.rows=[],u.push(g),1;g.container=v;for(var w=null,D=v.rows.length-1;!w&&D>=0;D--)IQ(v.rows[D],g,n)&&(w=v.rows[D]);w?(w.leaves.push(g),g.row=w):(g.leaves=[],v.rows.push(g))},f=0;f<a.length;f++)d();return a.map(function(m){return{event:m.data,style:{top:m.top,height:m.height,width:m.width,xOffset:Math.max(0,m.xOffset)}}})}function p3(e,t,n){for(var r=0;r<e.friends.length;++r)if(!(n.indexOf(e.friends[r])>-1)){t=t>e.friends[r].idx?t:e.friends[r].idx,n.push(e.friends[r]);var o=p3(e.friends[r],t,n);t=t>o?t:o}return t}function EQ(e){var t=e.events,n=e.minimumStartDifference,r=e.slotMetrics,o=e.accessors,i=h3({events:t,minimumStartDifference:n,slotMetrics:r,accessors:o});i.sort(function(le,W){return le=le.style,W=W.style,le.top!==W.top?le.top>W.top?1:-1:le.height!==W.height?le.top+le.height<W.top+W.height?1:-1:0});for(var a=0;a<i.length;++a)i[a].friends=[],delete i[a].style.left,delete i[a].style.left,delete i[a].idx,delete i[a].size;for(var u=0;u<i.length-1;++u)for(var d=i[u],f=d.style.top,m=d.style.top+d.style.height,g=u+1;g<i.length;++g){var v=i[g],w=v.style.top,D=v.style.top+v.style.height;(w>=f&&D<=m||D>f&&D<=m||w>=f&&w<m)&&(d.friends.push(v),v.friends.push(d))}for(var T=0;T<i.length;++T){for(var I=i[T],k=[],A=0;A<100;++A)k.push(1);for(var R=0;R<I.friends.length;++R)I.friends[R].idx!==void 0&&(k[I.friends[R].idx]=0);I.idx=k.indexOf(1)}for(var j=0;j<i.length;++j){var B=0;if(!i[j].size){var L=[],Z=p3(i[j],0,L);B=100/(Z+1),i[j].size=B;for(var U=0;U<L.length;++U)L[U].size=B}}for(var z=0;z<i.length;++z){var $=i[z];$.style.left=$.idx*$.size;for(var te=0,Q=0;Q<$.friends.length;++Q){var ue=$.friends[Q].idx;te=te>ue?te:ue}te<=$.idx&&($.size=100-$.idx*$.size);var ee=$.idx===0?0:3;$.style.width="calc(".concat($.size,"% - ").concat(ee,"px)"),$.style.height="calc(".concat($.style.height,"% - 2px)"),$.style.xOffset="calc(".concat($.style.left,"% + ").concat(ee,"px)")}return i}var dI={overlap:h3,"no-overlap":EQ};function CQ(e){return!!(e&&e.constructor&&e.call&&e.apply)}function MQ(e){e.events,e.minimumStartDifference,e.slotMetrics,e.accessors;var t=e.dayLayoutAlgorithm,n=t;return t in dI&&(n=dI[t]),CQ(n)?n.apply(this,arguments):[]}var m3=function(e){li(t,e);function t(){return lo(this,t),si(this,t,arguments)}return uo(t,[{key:"render",value:function(){var r=this.props,o=r.renderSlot,i=r.resource,a=r.group,u=r.getters,d=r.components,f=d===void 0?{}:d,m=f.timeSlotWrapper,g=m===void 0?Kl:m,v=u?u.slotGroupProp(a):{};return se.createElement("div",Object.assign({className:"rbc-timeslot-group"},v),a.map(function(w,D){var T=u?u.slotProp(w,i):{};return se.createElement(g,{key:D,value:w,resource:i},se.createElement("div",Object.assign({},T,{className:Zr("rbc-time-slot",T.className)}),o&&o(w,D)))}))}}]),t}(F.Component);function Uy(e){return typeof e=="string"?e:e+"%"}function kQ(e){var t=e.style,n=e.className,r=e.event,o=e.accessors,i=e.rtl,a=e.selected,u=e.label,d=e.continuesPrior,f=e.continuesAfter,m=e.getters,g=e.onClick,v=e.onDoubleClick,w=e.isBackgroundEvent,D=e.onKeyPress,T=e.components,I=T.event,k=T.eventWrapper,A=o.title(r),R=o.tooltip(r),j=o.end(r),B=o.start(r),L=m.eventProp(r,B,j,a),Z=[se.createElement("div",{key:"1",className:"rbc-event-label"},u),se.createElement("div",{key:"2",className:"rbc-event-content"},I?se.createElement(I,{event:r,title:A}):A)],U=t.height,z=t.top,$=t.width,te=t.xOffset,Q=zn(zn({},L.style),{},pd({top:Uy(z),height:Uy(U),width:Uy($)},i?"right":"left",Uy(te)));return se.createElement(k,Object.assign({type:"time"},e),se.createElement("div",{role:"button",tabIndex:0,onClick:g,onDoubleClick:v,style:Q,onKeyDown:D,title:R?(typeof u=="string"?u+": ":"")+R:void 0,className:Zr(w?"rbc-background-event":"rbc-event",n,L.className,{"rbc-selected":a,"rbc-event-continues-earlier":d,"rbc-event-continues-later":f})},Z))}var NQ=function(t){var n=t.children,r=t.className,o=t.style,i=t.innerRef;return se.createElement("div",{className:r,style:o,ref:i},n)},AQ=se.forwardRef(function(e,t){return se.createElement(NQ,Object.assign({},e,{innerRef:t}))}),FQ=["dayProp"],PQ=["eventContainerWrapper"],g3=function(e){li(t,e);function t(){var n;lo(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=si(this,t,[].concat(o)),n.state={selecting:!1,timeIndicatorPosition:null},n.intervalTriggered=!1,n.renderEvents=function(a){var u=a.events,d=a.isBackgroundEvent,f=n.props,m=f.rtl,g=f.selected,v=f.accessors,w=f.localizer,D=f.getters,T=f.components,I=f.step,k=f.timeslots,A=f.dayLayoutAlgorithm,R=f.resizable,j=WC(n),B=j.slotMetrics,L=w.messages,Z=MQ({events:u,accessors:v,slotMetrics:B,minimumStartDifference:Math.ceil(I*k/2),dayLayoutAlgorithm:A});return Z.map(function(U,z){var $=U.event,te=U.style,Q=v.end($),ue=v.start($),ee="eventTimeRangeFormat",le,W=B.startsBeforeDay(ue),de=B.startsAfterDay(Q);W?ee="eventTimeRangeEndFormat":de&&(ee="eventTimeRangeStartFormat"),W&&de?le=L.allDay:le=w.format({start:ue,end:Q},ee);var oe=W||B.startsBefore(ue),he=de||B.startsAfter(Q);return se.createElement(kQ,{style:te,event:$,label:le,key:"evt_"+z,getters:D,rtl:m,components:T,continuesPrior:oe,continuesAfter:he,accessors:v,resource:n.props.resource,selected:_0($,g),onClick:function(re){return n._select(zn(zn(zn({},$),n.props.resource&&{sourceResource:n.props.resource}),d&&{isBackgroundEvent:!0}),re)},onDoubleClick:function(re){return n._doubleClick($,re)},isBackgroundEvent:d,onKeyPress:function(re){return n._keyPress($,re)},resizable:R})})},n._selectable=function(){var a=n.containerRef.current,u=n.props,d=u.longPressThreshold,f=u.localizer,m=n._selector=new i3(function(){return a},{longPressThreshold:d}),g=function(T){var I=n.props.onSelecting,k=n.state||{},A=v(T),R=A.startDate,j=A.endDate;I&&(f.eq(k.startDate,R,"minutes")&&f.eq(k.endDate,j,"minutes")||I({start:R,end:j,resourceId:n.props.resource})===!1)||(n.state.start!==A.start||n.state.end!==A.end||n.state.selecting!==A.selecting)&&n.setState(A)},v=function(T){var I=n.slotMetrics.closestSlotFromPoint(T,Ad(a));n.state.selecting||(n._initialSlot=I);var k=n._initialSlot;f.lte(k,I)?I=n.slotMetrics.nextSlot(I):f.gt(k,I)&&(k=n.slotMetrics.nextSlot(k));var A=n.slotMetrics.getRange(f.min(k,I),f.max(k,I));return zn(zn({},A),{},{selecting:!0,top:"".concat(A.top,"%"),height:"".concat(A.height,"%")})},w=function(T,I){if(!Vv(n.containerRef.current,T)){var k=v(T),A=k.startDate,R=k.endDate;n._selectSlot({startDate:A,endDate:R,action:I,box:T})}n.setState({selecting:!1})};m.on("selecting",g),m.on("selectStart",g),m.on("beforeSelect",function(D){if(n.props.selectable==="ignoreEvents")return!Vv(n.containerRef.current,D)}),m.on("click",function(D){return w(D,"click")}),m.on("doubleClick",function(D){return w(D,"doubleClick")}),m.on("select",function(D){n.state.selecting&&(n._selectSlot(zn(zn({},n.state),{},{action:"select",bounds:D})),n.setState({selecting:!1}))}),m.on("reset",function(){n.state.selecting&&n.setState({selecting:!1})})},n._teardownSelectable=function(){n._selector&&(n._selector.teardown(),n._selector=null)},n._selectSlot=function(a){for(var u=a.startDate,d=a.endDate,f=a.action,m=a.bounds,g=a.box,v=u,w=[];n.props.localizer.lte(v,d);)w.push(v),v=new Date(+v+n.props.step*60*1e3);nr(n.props.onSelectSlot,{slots:w,start:u,end:d,resourceId:n.props.resource,action:f,bounds:m,box:g})},n._select=function(){for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];nr(n.props.onSelectEvent,u)},n._doubleClick=function(){for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];nr(n.props.onDoubleClickEvent,u)},n._keyPress=function(){for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];nr(n.props.onKeyPressEvent,u)},n.slotMetrics=PS(n.props),n.containerRef=F.createRef(),n}return uo(t,[{key:"componentDidMount",value:function(){this.props.selectable&&this._selectable(),this.props.isNow&&this.setTimeIndicatorPositionUpdateInterval()}},{key:"componentWillUnmount",value:function(){this._teardownSelectable(),this.clearTimeIndicatorInterval()}},{key:"componentDidUpdate",value:function(r,o){this.props.selectable&&!r.selectable&&this._selectable(),!this.props.selectable&&r.selectable&&this._teardownSelectable(),this.slotMetrics=this.slotMetrics.update(this.props);var i=this.props,a=i.getNow,u=i.isNow,d=i.localizer,f=i.date,m=i.min,g=i.max,v=d.neq(r.getNow(),a(),"minutes");if(r.isNow!==u||v){if(this.clearTimeIndicatorInterval(),u){var w=!v&&d.eq(r.date,f,"minutes")&&o.timeIndicatorPosition===this.state.timeIndicatorPosition;this.setTimeIndicatorPositionUpdateInterval(w)}}else u&&(d.neq(r.min,m,"minutes")||d.neq(r.max,g,"minutes"))&&this.positionTimeIndicator()}},{key:"setTimeIndicatorPositionUpdateInterval",value:function(){var r=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;!this.intervalTriggered&&!o&&this.positionTimeIndicator(),this._timeIndicatorTimeout=window.setTimeout(function(){r.intervalTriggered=!0,r.positionTimeIndicator(),r.setTimeIndicatorPositionUpdateInterval()},6e4)}},{key:"clearTimeIndicatorInterval",value:function(){this.intervalTriggered=!1,window.clearTimeout(this._timeIndicatorTimeout)}},{key:"positionTimeIndicator",value:function(){var r=this.props,o=r.min,i=r.max,a=r.getNow,u=a();if(u>=o&&u<=i){var d=this.slotMetrics.getCurrentTimePosition(u);this.intervalTriggered=!0,this.setState({timeIndicatorPosition:d})}else this.clearTimeIndicatorInterval()}},{key:"render",value:function(){var r=this.props,o=r.date,i=r.max,a=r.rtl,u=r.isNow,d=r.resource,f=r.accessors,m=r.localizer,g=r.getters,v=g.dayProp,w=vl(g,FQ),D=r.components,T=D.eventContainerWrapper,I=vl(D,PQ),k=this.slotMetrics,A=this.state,R=A.selecting,j=A.top,B=A.height,L=A.startDate,Z=A.endDate,U={start:L,end:Z},z=v(i),$=z.className,te=z.style,Q=I.dayColumnWrapper||AQ;return se.createElement(Q,{ref:this.containerRef,date:o,style:te,className:Zr($,"rbc-day-slot","rbc-time-column",u&&"rbc-now",u&&"rbc-today",R&&"rbc-slot-selecting"),slotMetrics:k},k.groups.map(function(ue,ee){return se.createElement(m3,{key:ee,group:ue,resource:d,getters:w,components:I})}),se.createElement(T,{localizer:m,resource:d,accessors:f,getters:w,components:I,slotMetrics:k},se.createElement("div",{className:Zr("rbc-events-container",a&&"rtl")},this.renderEvents({events:this.props.backgroundEvents,isBackgroundEvent:!0}),this.renderEvents({events:this.props.events}))),R&&se.createElement("div",{className:"rbc-slot-selection",style:{top:j,height:B}},se.createElement("span",null,m.format(U,"selectRangeFormat"))),u&&this.intervalTriggered&&se.createElement("div",{className:"rbc-current-time-indicator",style:{top:"".concat(this.state.timeIndicatorPosition,"%")}}))}}]),t}(se.Component);g3.defaultProps={dragThroughEvents:!0,timeslots:2};function OQ(e){var t=e.min,n=e.max,r=e.localizer;return r.getTimezoneOffset(t)!==r.getTimezoneOffset(n)?{start:r.add(t,-1,"day"),end:r.add(n,-1,"day")}:{start:t,end:n}}var jQ=function(t){var n=t.min,r=t.max,o=t.timeslots,i=t.step,a=t.localizer,u=t.getNow,d=t.resource,f=t.components,m=t.getters,g=t.gutterRef,v=f.timeGutterWrapper,w=F.useMemo(function(){return OQ({min:n,max:r,localizer:a})},[n==null?void 0:n.toISOString(),r==null?void 0:r.toISOString(),a]),D=w.start,T=w.end,I=F.useState(PS({min:D,max:T,timeslots:o,step:i,localizer:a})),k=Ql(I,2),A=k[0],R=k[1];F.useEffect(function(){A&&R(A.update({min:D,max:T,timeslots:o,step:i,localizer:a}))},[D==null?void 0:D.toISOString(),T==null?void 0:T.toISOString(),o,i]);var j=F.useCallback(function(B,L){if(L)return null;var Z=A.dateIsInGroup(u(),L);return se.createElement("span",{className:Zr("rbc-label",Z&&"rbc-now")},a.format(B,"timeGutterFormat"))},[A,a,u]);return se.createElement(v,{slotMetrics:A},se.createElement("div",{className:"rbc-time-gutter rbc-time-column",ref:g},A.groups.map(function(B,L){return se.createElement(m3,{key:L,group:B,resource:d,components:f,renderSlot:j,getters:m})})))},LQ=se.forwardRef(function(e,t){return se.createElement(jQ,Object.assign({gutterRef:t},e))}),RQ=function(t){var n=t.label;return se.createElement(se.Fragment,null,n)},_Q=function(e){li(t,e);function t(){var n;lo(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=si(this,t,[].concat(o)),n.handleHeaderClick=function(a,u,d){d.preventDefault(),nr(n.props.onDrillDown,[a,u])},n.renderRow=function(a){var u=n.props,d=u.events,f=u.rtl,m=u.selectable,g=u.getNow,v=u.range,w=u.getters,D=u.localizer,T=u.accessors,I=u.components,k=u.resizable,A=T.resourceId(a),R=a?d.filter(function(j){return T.resource(j)===A}):d;return se.createElement(Wv,{isAllDay:!0,rtl:f,getNow:g,minRows:2,maxRows:n.props.allDayMaxRows+1,range:v,events:R,resourceId:A,className:"rbc-allday-cell",selectable:m,selected:n.props.selected,components:I,accessors:T,getters:w,localizer:D,onSelect:n.props.onSelectEvent,onShowMore:n.props.onShowMore,onDoubleClick:n.props.onDoubleClickEvent,onKeyPress:n.props.onKeyPressEvent,onSelectSlot:n.props.onSelectSlot,longPressThreshold:n.props.longPressThreshold,resizable:k})},n}return uo(t,[{key:"renderHeaderCells",value:function(r){var o=this,i=this.props,a=i.localizer,u=i.getDrilldownView,d=i.getNow,f=i.getters.dayProp,m=i.components.header,g=m===void 0?f3:m,v=d();return r.map(function(w,D){var T=u(w),I=a.format(w,"dayFormat"),k=f(w),A=k.className,R=k.style,j=se.createElement(g,{date:w,label:I,localizer:a});return se.createElement("div",{key:D,style:R,className:Zr("rbc-header",A,a.isSameDate(w,v)&&"rbc-today")},T?se.createElement("button",{type:"button",className:"rbc-button-link",onClick:function(L){return o.handleHeaderClick(w,T,L)}},j):se.createElement("span",null,j))})}},{key:"render",value:function(){var r=this,o=this.props,i=o.width,a=o.rtl,u=o.resources,d=o.range,f=o.events,m=o.getNow,g=o.accessors,v=o.selectable,w=o.components,D=o.getters,T=o.scrollRef,I=o.localizer,k=o.isOverflowing,A=o.components,R=A.timeGutterHeader,j=A.resourceHeader,B=j===void 0?RQ:j,L=o.resizable,Z={};k&&(Z[a?"marginLeft":"marginRight"]="".concat(vM()-1,"px"));var U=u.groupEvents(f);return se.createElement("div",{style:Z,ref:T,className:Zr("rbc-time-header",k&&"rbc-overflowing")},se.createElement("div",{className:"rbc-label rbc-time-header-gutter",style:{width:i,minWidth:i,maxWidth:i}},R&&se.createElement(R,null)),u.map(function(z,$){var te=Ql(z,2),Q=te[0],ue=te[1];return se.createElement("div",{className:"rbc-time-header-content",key:Q||$},ue&&se.createElement("div",{className:"rbc-row rbc-row-resource",key:"resource_".concat($)},se.createElement("div",{className:"rbc-header"},se.createElement(B,{index:$,label:g.resourceTitle(ue),resource:ue}))),se.createElement("div",{className:"rbc-row rbc-time-header-cell".concat(d.length<=1?" rbc-time-header-cell-single-day":"")},r.renderHeaderCells(d)),se.createElement(Wv,{isAllDay:!0,rtl:a,getNow:m,minRows:2,maxRows:r.props.allDayMaxRows+1,range:d,events:U.get(Q)||[],resourceId:ue&&Q,className:"rbc-allday-cell",selectable:v,selected:r.props.selected,components:w,accessors:g,getters:D,localizer:I,onSelect:r.props.onSelectEvent,onShowMore:r.props.onShowMore,onDoubleClick:r.props.onDoubleClickEvent,onKeyDown:r.props.onKeyPressEvent,onSelectSlot:r.props.onSelectSlot,longPressThreshold:r.props.longPressThreshold,resizable:L}))}))}}]),t}(se.Component),fb={};function BQ(e,t){return{map:function(r){return e?e.map(function(o,i){return r([t.resourceId(o),o],i)}):[r([fb,null],0)]},groupEvents:function(r){var o=new Map;return e?(r.forEach(function(i){var a=t.resource(i)||fb;if(Array.isArray(a))a.forEach(function(d){var f=o.get(d)||[];f.push(i),o.set(d,f)});else{var u=o.get(a)||[];u.push(i),o.set(a,u)}}),o):(o.set(fb,r),o)}}}var Zh=function(e){li(t,e);function t(n){var r;return lo(this,t),r=si(this,t,[n]),r.handleScroll=function(o){r.scrollRef.current&&(r.scrollRef.current.scrollLeft=o.target.scrollLeft)},r.handleResize=function(){i2(r.rafHandle),r.rafHandle=yM(r.checkOverflow)},r.handleKeyPressEvent=function(){r.clearSelection();for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];nr(r.props.onKeyPressEvent,i)},r.handleSelectEvent=function(){r.clearSelection();for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];nr(r.props.onSelectEvent,i)},r.handleDoubleClickEvent=function(){r.clearSelection();for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];nr(r.props.onDoubleClickEvent,i)},r.handleShowMore=function(o,i,a,u,d){var f=r.props,m=f.popup,g=f.onDrillDown,v=f.onShowMore,w=f.getDrilldownView,D=f.doShowMoreDrillDown;if(r.clearSelection(),m){var T=gM(a,r.containerRef.current);r.setState({overlay:{date:i,events:o,position:zn(zn({},T),{},{width:"200px"}),target:d}})}else D&&nr(g,[i,w(i)||ii.DAY]);nr(v,[o,i,u])},r.handleSelectAllDaySlot=function(o,i){var a=r.props.onSelectSlot,u=new Date(o[0]),d=new Date(o[o.length-1]);d.setDate(o[o.length-1].getDate()+1),nr(a,{slots:o,start:u,end:d,action:i.action,resourceId:i.resourceId})},r.overlayDisplay=function(){r.setState({overlay:null})},r.checkOverflow=function(){if(!r._updatingOverflow){var o=r.contentRef.current;if(o!=null&&o.scrollHeight){var i=o.scrollHeight>o.clientHeight;r.state.isOverflowing!==i&&(r._updatingOverflow=!0,r.setState({isOverflowing:i},function(){r._updatingOverflow=!1}))}}},r.memoizedResources=jM(function(o,i){return BQ(o,i)}),r.state={gutterWidth:void 0,isOverflowing:null},r.scrollRef=se.createRef(),r.contentRef=se.createRef(),r.containerRef=se.createRef(),r._scrollRatio=null,r.gutterRef=F.createRef(),r}return uo(t,[{key:"getSnapshotBeforeUpdate",value:function(){return this.checkOverflow(),null}},{key:"componentDidMount",value:function(){this.props.width==null&&this.measureGutter(),this.calculateScroll(),this.applyScroll(),window.addEventListener("resize",this.handleResize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.handleResize),i2(this.rafHandle),this.measureGutterAnimationFrameRequest&&window.cancelAnimationFrame(this.measureGutterAnimationFrameRequest)}},{key:"componentDidUpdate",value:function(){this.applyScroll()}},{key:"renderEvents",value:function(r,o,i,a){var u=this,d=this.props,f=d.min,m=d.max,g=d.components,v=d.accessors,w=d.localizer,D=d.dayLayoutAlgorithm,T=this.memoizedResources(this.props.resources,v),I=T.groupEvents(o),k=T.groupEvents(i);return T.map(function(A,R){var j=Ql(A,2),B=j[0],L=j[1];return r.map(function(Z,U){var z=(I.get(B)||[]).filter(function(te){return w.inRange(Z,v.start(te),v.end(te),"day")}),$=(k.get(B)||[]).filter(function(te){return w.inRange(Z,v.start(te),v.end(te),"day")});return se.createElement(g3,Object.assign({},u.props,{localizer:w,min:w.merge(Z,f),max:w.merge(Z,m),resource:L&&B,components:g,isNow:w.isSameDate(Z,a),key:R+"-"+U,date:Z,events:z,backgroundEvents:$,dayLayoutAlgorithm:D}))})})}},{key:"render",value:function(){var r,o=this.props,i=o.events,a=o.backgroundEvents,u=o.range,d=o.width,f=o.rtl,m=o.selected,g=o.getNow,v=o.resources,w=o.components,D=o.accessors,T=o.getters,I=o.localizer,k=o.min,A=o.max,R=o.showMultiDayTimes,j=o.longPressThreshold,B=o.resizable;d=d||this.state.gutterWidth;var L=u[0],Z=u[u.length-1];this.slots=u.length;var U=[],z=[],$=[];return i.forEach(function(te){if(Zm(te,L,Z,D,I)){var Q=D.start(te),ue=D.end(te);D.allDay(te)||I.startAndEndAreDateOnly(Q,ue)||!R&&!I.isSameDate(Q,ue)?U.push(te):z.push(te)}}),a.forEach(function(te){Zm(te,L,Z,D,I)&&$.push(te)}),U.sort(function(te,Q){return h1(te,Q,D,I)}),se.createElement("div",{className:Zr("rbc-time-view",v&&"rbc-time-view-resources"),ref:this.containerRef},se.createElement(_Q,{range:u,events:U,width:d,rtl:f,getNow:g,localizer:I,selected:m,allDayMaxRows:this.props.showAllEvents?1/0:(r=this.props.allDayMaxRows)!==null&&r!==void 0?r:1/0,resources:this.memoizedResources(v,D),selectable:this.props.selectable,accessors:D,getters:T,components:w,scrollRef:this.scrollRef,isOverflowing:this.state.isOverflowing,longPressThreshold:j,onSelectSlot:this.handleSelectAllDaySlot,onSelectEvent:this.handleSelectEvent,onShowMore:this.handleShowMore,onDoubleClickEvent:this.props.onDoubleClickEvent,onKeyPressEvent:this.props.onKeyPressEvent,onDrillDown:this.props.onDrillDown,getDrilldownView:this.props.getDrilldownView,resizable:B}),this.props.popup&&this.renderOverlay(),se.createElement("div",{ref:this.contentRef,className:"rbc-time-content",onScroll:this.handleScroll},se.createElement(LQ,{date:L,ref:this.gutterRef,localizer:I,min:I.merge(L,k),max:I.merge(L,A),step:this.props.step,getNow:this.props.getNow,timeslots:this.props.timeslots,components:w,className:"rbc-time-gutter",getters:T}),this.renderEvents(u,z,$,g())))}},{key:"renderOverlay",value:function(){var r,o,i=this,a=(r=(o=this.state)===null||o===void 0?void 0:o.overlay)!==null&&r!==void 0?r:{},u=this.props,d=u.accessors,f=u.localizer,m=u.components,g=u.getters,v=u.selected,w=u.popupOffset,D=u.handleDragStart,T=function(){return i.setState({overlay:null})};return se.createElement(FS,{overlay:a,accessors:d,localizer:f,components:m,getters:g,selected:v,popupOffset:w,ref:this.containerRef,handleKeyPressEvent:this.handleKeyPressEvent,handleSelectEvent:this.handleSelectEvent,handleDoubleClickEvent:this.handleDoubleClickEvent,handleDragStart:D,show:!!a.position,overlayDisplay:this.overlayDisplay,onHide:T})}},{key:"clearSelection",value:function(){clearTimeout(this._selectTimer),this._pendingSelection=[]}},{key:"measureGutter",value:function(){var r=this;this.measureGutterAnimationFrameRequest&&window.cancelAnimationFrame(this.measureGutterAnimationFrameRequest),this.measureGutterAnimationFrameRequest=window.requestAnimationFrame(function(){var o,i=(o=r.gutterRef)!==null&&o!==void 0&&o.current?d1(r.gutterRef.current):void 0;i&&r.state.gutterWidth!==i&&r.setState({gutterWidth:i})})}},{key:"applyScroll",value:function(){if(this._scrollRatio!=null&&this.props.enableAutoScroll===!0){var r=this.contentRef.current;r.scrollTop=r.scrollHeight*this._scrollRatio,this._scrollRatio=null}}},{key:"calculateScroll",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,o=r.min,i=r.max,a=r.scrollToTime,u=r.localizer,d=u.diff(u.merge(a,o),a,"milliseconds"),f=u.diff(o,i,"milliseconds");this._scrollRatio=d/f}}]),t}(F.Component);Zh.defaultProps={step:30,timeslots:2};var HQ=["date","localizer","min","max","scrollToTime","enableAutoScroll"],H0=function(e){li(t,e);function t(){return lo(this,t),si(this,t,arguments)}return uo(t,[{key:"render",value:function(){var r=this.props,o=r.date,i=r.localizer,a=r.min,u=a===void 0?i.startOf(new Date,"day"):a,d=r.max,f=d===void 0?i.endOf(new Date,"day"):d,m=r.scrollToTime,g=m===void 0?i.startOf(new Date,"day"):m,v=r.enableAutoScroll,w=v===void 0?!0:v,D=vl(r,HQ),T=t.range(o,{localizer:i});return se.createElement(Zh,Object.assign({},D,{range:T,eventOffset:10,localizer:i,min:u,max:f,scrollToTime:g,enableAutoScroll:w}))}}]),t}(se.Component);H0.range=function(e,t){var n=t.localizer;return[n.startOf(e,"day")]};H0.navigate=function(e,t,n){var r=n.localizer;switch(t){case Pi.PREVIOUS:return r.add(e,-1,"day");case Pi.NEXT:return r.add(e,1,"day");default:return e}};H0.title=function(e,t){var n=t.localizer;return n.format(e,"dayHeaderFormat")};var YQ=["date","localizer","min","max","scrollToTime","enableAutoScroll"],uc=function(e){li(t,e);function t(){return lo(this,t),si(this,t,arguments)}return uo(t,[{key:"render",value:function(){var r=this.props,o=r.date,i=r.localizer,a=r.min,u=a===void 0?i.startOf(new Date,"day"):a,d=r.max,f=d===void 0?i.endOf(new Date,"day"):d,m=r.scrollToTime,g=m===void 0?i.startOf(new Date,"day"):m,v=r.enableAutoScroll,w=v===void 0?!0:v,D=vl(r,YQ),T=t.range(o,this.props);return se.createElement(Zh,Object.assign({},D,{range:T,eventOffset:15,localizer:i,min:u,max:f,scrollToTime:g,enableAutoScroll:w}))}}]),t}(se.Component);uc.defaultProps=Zh.defaultProps;uc.navigate=function(e,t,n){var r=n.localizer;switch(t){case Pi.PREVIOUS:return r.add(e,-1,"week");case Pi.NEXT:return r.add(e,1,"week");default:return e}};uc.range=function(e,t){var n=t.localizer,r=n.startOfWeek(),o=n.startOf(e,"week",r),i=n.endOf(e,"week",r);return n.range(o,i)};uc.title=function(e,t){var n=t.localizer,r=uc.range(e,{localizer:n}),o=UM(r),i=o[0],a=o.slice(1);return n.format({start:i,end:a.pop()},"dayRangeHeaderFormat")};var UQ=["date","localizer","min","max","scrollToTime","enableAutoScroll"];function OS(e,t){return uc.range(e,t).filter(function(n){return[6,0].indexOf(n.getDay())===-1})}var Ig=function(e){li(t,e);function t(){return lo(this,t),si(this,t,arguments)}return uo(t,[{key:"render",value:function(){var r=this.props,o=r.date,i=r.localizer,a=r.min,u=a===void 0?i.startOf(new Date,"day"):a,d=r.max,f=d===void 0?i.endOf(new Date,"day"):d,m=r.scrollToTime,g=m===void 0?i.startOf(new Date,"day"):m,v=r.enableAutoScroll,w=v===void 0?!0:v,D=vl(r,UQ),T=OS(o,this.props);return se.createElement(Zh,Object.assign({},D,{range:T,eventOffset:15,localizer:i,min:u,max:f,scrollToTime:g,enableAutoScroll:w}))}}]),t}(se.Component);Ig.defaultProps=Zh.defaultProps;Ig.range=OS;Ig.navigate=uc.navigate;Ig.title=function(e,t){var n=t.localizer,r=OS(e,{localizer:n}),o=UM(r),i=o[0],a=o.slice(1);return n.format({start:i,end:a.pop()},"dayRangeHeaderFormat")};function cc(e){var t=e.accessors,n=e.components,r=e.date,o=e.events,i=e.getters,a=e.length,u=e.localizer,d=e.onDoubleClickEvent,f=e.onSelectEvent,m=e.selected,g=F.useRef(null),v=F.useRef(null),w=F.useRef(null),D=F.useRef(null),T=F.useRef(null);F.useEffect(function(){A()});var I=function(Z,U,z){var $=n.event,te=n.date;return U=U.filter(function(Q){return Zm(Q,u.startOf(Z,"day"),u.endOf(Z,"day"),t,u)}),U.map(function(Q,ue){var ee=t.title(Q),le=t.end(Q),W=t.start(Q),de=i.eventProp(Q,W,le,_0(Q,m)),oe=ue===0&&u.format(Z,"agendaDateFormat"),he=ue===0?se.createElement("td",{rowSpan:U.length,className:"rbc-agenda-date-cell"},te?se.createElement(te,{day:Z,label:oe}):oe):!1;return se.createElement("tr",{key:z+"_"+ue,className:de.className,style:de.style},he,se.createElement("td",{className:"rbc-agenda-time-cell"},k(Z,Q)),se.createElement("td",{className:"rbc-agenda-event-cell",onClick:function(re){return f&&f(Q,re)},onDoubleClick:function(re){return d&&d(Q,re)}},$?se.createElement($,{event:Q,title:ee}):ee))},[])},k=function(Z,U){var z="",$=n.time,te=u.messages.allDay,Q=t.end(U),ue=t.start(U);return t.allDay(U)||(u.eq(ue,Q)?te=u.format(ue,"agendaTimeFormat"):u.isSameDate(ue,Q)?te=u.format({start:ue,end:Q},"agendaTimeRangeFormat"):u.isSameDate(Z,ue)?te=u.format(ue,"agendaTimeFormat"):u.isSameDate(Z,Q)&&(te=u.format(Q,"agendaTimeFormat"))),u.gt(Z,ue,"day")&&(z="rbc-continues-prior"),u.lt(Z,Q,"day")&&(z+=" rbc-continues-after"),se.createElement("span",{className:z.trim()},$?se.createElement($,{event:U,day:Z,label:te}):te)},A=function(){if(T.current){var Z=g.current,U=T.current.firstChild;if(U){var z=D.current.scrollHeight>D.current.clientHeight,$=[],te=$;$=[d1(U.children[0]),d1(U.children[1])],(te[0]!==$[0]||te[1]!==$[1])&&(v.current.style.width=$[0]+"px",w.current.style.width=$[1]+"px"),z?(UR(Z,"rbc-header-overflowing"),Z.style.marginRight=vM()+"px"):zR(Z,"rbc-header-overflowing")}}},R=u.messages,j=u.add(r,a,"day"),B=u.range(r,j,"day");return o=o.filter(function(L){return Zm(L,u.startOf(r,"day"),u.endOf(j,"day"),t,u)}),o.sort(function(L,Z){return+t.start(L)-+t.start(Z)}),se.createElement("div",{className:"rbc-agenda-view"},o.length!==0?se.createElement(se.Fragment,null,se.createElement("table",{ref:g,className:"rbc-agenda-table"},se.createElement("thead",null,se.createElement("tr",null,se.createElement("th",{className:"rbc-header",ref:v},R.date),se.createElement("th",{className:"rbc-header",ref:w},R.time),se.createElement("th",{className:"rbc-header"},R.event)))),se.createElement("div",{className:"rbc-agenda-content",ref:D},se.createElement("table",{className:"rbc-agenda-table"},se.createElement("tbody",{ref:T},B.map(function(L,Z){return I(L,o,Z)}))))):se.createElement("span",{className:"rbc-agenda-empty"},R.noEventsInRange))}cc.defaultProps={length:30};cc.range=function(e,t){var n=t.length,r=n===void 0?cc.defaultProps.length:n,o=t.localizer,i=o.add(e,r,"day");return{start:e,end:i}};cc.navigate=function(e,t,n){var r=n.length,o=r===void 0?cc.defaultProps.length:r,i=n.localizer;switch(t){case Pi.PREVIOUS:return i.add(e,-o,"day");case Pi.NEXT:return i.add(e,o,"day");default:return e}};cc.title=function(e,t){var n=t.length,r=n===void 0?cc.defaultProps.length:n,o=t.localizer,i=o.add(e,r,"day");return o.format({start:e,end:i},"agendaHeaderFormat")};var mv=pd(pd(pd(pd(pd({},ii.MONTH,B0),ii.WEEK,uc),ii.WORK_WEEK,Ig),ii.DAY,H0),ii.AGENDA,cc),zQ=["action","date","today"];function VQ(e,t){var n=t.action,r=t.date,o=t.today,i=vl(t,zQ);switch(e=typeof e=="string"?mv[e]:e,n){case Pi.TODAY:r=o||new Date;break;case Pi.DATE:break;default:Lm(e&&typeof e.navigate=="function","Calendar View components must implement a static `.navigate(date, action)` method.s"),r=e.navigate(r,n,i)}return r}var WQ=function(e){li(t,e);function t(){var n;lo(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=si(this,t,[].concat(o)),n.navigate=function(a){n.props.onNavigate(a)},n.view=function(a){n.props.onView(a)},n}return uo(t,[{key:"render",value:function(){var r=this.props,o=r.localizer.messages,i=r.label;return se.createElement("div",{className:"rbc-toolbar"},se.createElement("span",{className:"rbc-btn-group"},se.createElement("button",{type:"button",onClick:this.navigate.bind(null,Pi.TODAY)},o.today),se.createElement("button",{type:"button",onClick:this.navigate.bind(null,Pi.PREVIOUS)},o.previous),se.createElement("button",{type:"button",onClick:this.navigate.bind(null,Pi.NEXT)},o.next)),se.createElement("span",{className:"rbc-toolbar-label"},i),se.createElement("span",{className:"rbc-btn-group"},this.viewNamesGroup(o)))}},{key:"viewNamesGroup",value:function(r){var o=this,i=this.props.views,a=this.props.view;if(i.length>1)return i.map(function(u){return se.createElement("button",{type:"button",key:u,className:Zr({"rbc-active":a===u}),onClick:o.view.bind(null,u)},r[u])})}}]),t}(se.Component);function ZQ(e,t){var n=null;return typeof t=="function"?n=t(e):typeof t=="string"&&ru(e)==="object"&&e!=null&&t in e&&(n=e[t]),n}var Qu=function(t){return function(n){return ZQ(n,t)}},$Q=["view","date","getNow","onNavigate"],qQ=["view","toolbar","events","backgroundEvents","style","className","elementProps","date","getNow","length","showMultiDayTimes","onShowMore","doShowMoreDrillDown","components","formats","messages","culture"];function y3(e){if(Array.isArray(e))return e;for(var t=[],n=0,r=Object.entries(e);n<r.length;n++){var o=Ql(r[n],2),i=o[0],a=o[1];a&&t.push(i)}return t}function GQ(e,t){var n=t.views,r=y3(n);return r.indexOf(e)!==-1}var v3=function(e){li(t,e);function t(){var n;lo(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=si(this,t,[].concat(o)),n.getViews=function(){var a=n.props.views;return Array.isArray(a)?bK(a,function(u,d){return u[d]=mv[d]},{}):ru(a)==="object"?EK(a,function(u,d){return u===!0?mv[d]:u}):mv},n.getView=function(){var a=n.getViews();return a[n.props.view]},n.getDrilldownView=function(a){var u=n.props,d=u.view,f=u.drilldownView,m=u.getDrilldownView;return m?m(a,d,Object.keys(n.getViews())):f},n.handleRangeChange=function(a,u,d){var f=n.props,m=f.onRangeChange,g=f.localizer;m&&u.range&&m(u.range(a,{localizer:g}),d)},n.handleNavigate=function(a,u){var d=n.props,f=d.view,m=d.date,g=d.getNow,v=d.onNavigate,w=vl(d,$Q),D=n.getView(),T=g();m=VQ(D,zn(zn({},w),{},{action:a,date:u||m||T,today:T})),v(m,f,a),n.handleRangeChange(m,D)},n.handleViewChange=function(a){a!==n.props.view&&GQ(a,n.props)&&n.props.onView(a);var u=n.getViews();n.handleRangeChange(n.props.date||n.props.getNow(),u[a],a)},n.handleSelectEvent=function(){for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];nr(n.props.onSelectEvent,u)},n.handleDoubleClickEvent=function(){for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];nr(n.props.onDoubleClickEvent,u)},n.handleKeyPressEvent=function(){for(var a=arguments.length,u=new Array(a),d=0;d<a;d++)u[d]=arguments[d];nr(n.props.onKeyPressEvent,u)},n.handleSelectSlot=function(a){nr(n.props.onSelectSlot,a)},n.handleDrillDown=function(a,u){var d=n.props.onDrillDown;if(d){d(a,u,n.drilldownView);return}u&&n.handleViewChange(u),n.handleNavigate(Pi.DATE,a)},n.state={context:t.getContext(n.props)},n}return uo(t,[{key:"render",value:function(){var r=this.props,o=r.view,i=r.toolbar,a=r.events,u=r.backgroundEvents,d=r.style,f=r.className,m=r.elementProps,g=r.date,v=r.getNow,w=r.length,D=r.showMultiDayTimes,T=r.onShowMore,I=r.doShowMoreDrillDown;r.components,r.formats,r.messages,r.culture;var k=vl(r,qQ);g=g||v();var A=this.getView(),R=this.state.context,j=R.accessors,B=R.components,L=R.getters,Z=R.localizer,U=R.viewNames,z=B.toolbar||WQ,$=A.title(g,{localizer:Z,length:w});return se.createElement("div",Object.assign({},m,{className:Zr(f,"rbc-calendar",k.rtl&&"rbc-rtl"),style:d}),i&&se.createElement(z,{date:g,view:o,views:U,label:$,onView:this.handleViewChange,onNavigate:this.handleNavigate,localizer:Z}),se.createElement(A,Object.assign({},k,{events:a,backgroundEvents:u,date:g,getNow:v,length:w,localizer:Z,getters:L,components:B,accessors:j,showMultiDayTimes:D,getDrilldownView:this.getDrilldownView,onNavigate:this.handleNavigate,onDrillDown:this.handleDrillDown,onSelectEvent:this.handleSelectEvent,onDoubleClickEvent:this.handleDoubleClickEvent,onKeyPressEvent:this.handleKeyPressEvent,onSelectSlot:this.handleSelectSlot,onShowMore:T,doShowMoreDrillDown:I})))}}],[{key:"getDerivedStateFromProps",value:function(r){return{context:t.getContext(r)}}},{key:"getContext",value:function(r){var o=r.startAccessor,i=r.endAccessor,a=r.allDayAccessor,u=r.tooltipAccessor,d=r.titleAccessor,f=r.resourceAccessor,m=r.resourceIdAccessor,g=r.resourceTitleAccessor,v=r.eventPropGetter,w=r.backgroundEventPropGetter,D=r.slotPropGetter,T=r.slotGroupPropGetter,I=r.dayPropGetter,k=r.view,A=r.views,R=r.localizer,j=r.culture,B=r.messages,L=B===void 0?{}:B,Z=r.components,U=Z===void 0?{}:Z,z=r.formats,$=z===void 0?{}:z,te=y3(A),Q=XK(L);return{viewNames:te,localizer:KK(R,j,$,Q),getters:{eventProp:function(){return v&&v.apply(void 0,arguments)||{}},backgroundEventProp:function(){return w&&w.apply(void 0,arguments)||{}},slotProp:function(){return D&&D.apply(void 0,arguments)||{}},slotGroupProp:function(){return T&&T.apply(void 0,arguments)||{}},dayProp:function(){return I&&I.apply(void 0,arguments)||{}}},components:sK(U[k]||{},XJ(U,te),{eventWrapper:Kl,backgroundEventWrapper:Kl,eventContainerWrapper:Kl,dateCellWrapper:Kl,weekWrapper:Kl,timeSlotWrapper:Kl,timeGutterWrapper:Kl}),accessors:{start:Qu(o),end:Qu(i),allDay:Qu(a),tooltip:Qu(u),title:Qu(d),resource:Qu(f),resourceId:Qu(m),resourceTitle:Qu(g)}}}}]),t}(se.Component);v3.defaultProps={events:[],backgroundEvents:[],elementProps:{},popup:!1,toolbar:!0,view:ii.MONTH,views:[ii.MONTH,ii.WEEK,ii.DAY,ii.AGENDA],step:30,length:30,allDayMaxRows:1/0,doShowMoreDrillDown:!0,drilldownView:ii.DAY,titleAccessor:"title",tooltipAccessor:"title",allDayAccessor:"allDay",startAccessor:"start",endAccessor:"end",resourceAccessor:"resourceId",resourceIdAccessor:"id",resourceTitleAccessor:"title",longPressThreshold:250,getNow:function(){return new Date},dayLayoutAlgorithm:"overlap"};var JQ=KC(v3,{view:"onView",date:"onNavigate",selected:"onSelectEvent"}),KQ=function(t,n,r){var o=t.start,i=t.end;return r.format(o,"MMMM DD",n)+" – "+r.format(i,r.eq(o,i,"month")?"DD":"MMMM DD",n)},QQ=function(t,n,r){var o=t.start,i=t.end;return r.format(o,"L",n)+" – "+r.format(i,"L",n)},hb=function(t,n,r){var o=t.start,i=t.end;return r.format(o,"LT",n)+" – "+r.format(i,"LT",n)},XQ=function(t,n,r){var o=t.start;return r.format(o,"LT",n)+" – "},eX=function(t,n,r){var o=t.end;return" – "+r.format(o,"LT",n)},tX={dateFormat:"DD",dayFormat:"DD ddd",weekdayFormat:"ddd",selectRangeFormat:hb,eventTimeRangeFormat:hb,eventTimeRangeStartFormat:XQ,eventTimeRangeEndFormat:eX,timeGutterFormat:"LT",monthHeaderFormat:"MMMM YYYY",dayHeaderFormat:"dddd MMM DD",dayRangeHeaderFormat:KQ,agendaHeaderFormat:QQ,agendaDateFormat:"ddd MMM DD",agendaTimeFormat:"LT",agendaTimeRangeFormat:hb};function Xu(e){var t=e&&e.toLowerCase();return t==="FullYear"?t="year":t||(t=void 0),t}function nX(e){var t=function(pe,Ie){return Ie?pe.locale(Ie):pe};function n(re){return e(re).toDate().getTimezoneOffset()}function r(re,pe){var Ie,Oe,Ne=e(re).local(),Be=e(pe).local();if(!e.tz)return Ne.toDate().getTimezoneOffset()-Be.toDate().getTimezoneOffset();var Je=(Ie=Ne==null||(Oe=Ne._z)===null||Oe===void 0?void 0:Oe.name)!==null&&Ie!==void 0?Ie:e.tz.guess(),ze=e.tz.zone(Je).utcOffset(+Ne),Qe=e.tz.zone(Je).utcOffset(+Be);return ze-Qe}function o(re){var pe=e(re).startOf("day");return r(pe,re)}function i(re,pe,Ie){var Oe=Xu(Ie),Ne=Oe?e(re).startOf(Oe):e(re),Be=Oe?e(pe).startOf(Oe):e(pe);return[Ne,Be,Oe]}function a(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,pe=arguments.length>1?arguments[1]:void 0,Ie=Xu(pe);return Ie?e(re).startOf(Ie).toDate():e(re).toDate()}function u(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,pe=arguments.length>1?arguments[1]:void 0,Ie=Xu(pe);return Ie?e(re).endOf(Ie).toDate():e(re).toDate()}function d(re,pe,Ie){var Oe=i(re,pe,Ie),Ne=Ql(Oe,3),Be=Ne[0],Je=Ne[1],ze=Ne[2];return Be.isSame(Je,ze)}function f(re,pe,Ie){return!d(re,pe,Ie)}function m(re,pe,Ie){var Oe=i(re,pe,Ie),Ne=Ql(Oe,3),Be=Ne[0],Je=Ne[1],ze=Ne[2];return Be.isAfter(Je,ze)}function g(re,pe,Ie){var Oe=i(re,pe,Ie),Ne=Ql(Oe,3),Be=Ne[0],Je=Ne[1],ze=Ne[2];return Be.isBefore(Je,ze)}function v(re,pe,Ie){var Oe=i(re,pe,Ie),Ne=Ql(Oe,3),Be=Ne[0],Je=Ne[1],ze=Ne[2];return Be.isSameOrBefore(Je,ze)}function w(re,pe,Ie){var Oe=i(re,pe,Ie),Ne=Ql(Oe,3),Be=Ne[0],Je=Ne[1],ze=Ne[2];return Be.isSameOrBefore(Je,ze)}function D(re,pe,Ie){var Oe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"day",Ne=Xu(Oe),Be=e(re),Je=e(pe),ze=e(Ie);return Be.isBetween(Je,ze,Ne,"[]")}function T(re,pe){var Ie=e(re),Oe=e(pe),Ne=e.min(Ie,Oe);return Ne.toDate()}function I(re,pe){var Ie=e(re),Oe=e(pe),Ne=e.max(Ie,Oe);return Ne.toDate()}function k(re,pe){if(!re&&!pe)return null;var Ie=e(pe).format("HH:mm:ss"),Oe=e(re).startOf("day").format("MM/DD/YYYY");return e("".concat(Oe," ").concat(Ie),"MM/DD/YYYY HH:mm:ss").toDate()}function A(re,pe,Ie){var Oe=Xu(Ie);return e(re).add(pe,Oe).toDate()}function R(re,pe){for(var Ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",Oe=Xu(Ie),Ne=e(re).toDate(),Be=[];w(Ne,pe);)Be.push(Ne),Ne=A(Ne,1,Oe);return Be}function j(re,pe){var Ie=Xu(pe),Oe=a(re,Ie);return d(Oe,re)?Oe:A(Oe,1,Ie)}function B(re,pe){var Ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",Oe=Xu(Ie),Ne=e(re),Be=e(pe);return Be.diff(Ne,Oe)}function L(re){var pe=e(re);return pe.minutes()}function Z(re){var pe=re?e.localeData(re):e.localeData();return pe?pe.firstDayOfWeek():0}function U(re){return e(re).startOf("month").startOf("week").toDate()}function z(re){return e(re).endOf("month").endOf("week").toDate()}function $(re){for(var pe=U(re),Ie=z(re),Oe=[];w(pe,Ie);)Oe.push(pe),pe=A(pe,1,"d");return Oe}function te(re,pe,Ie){return e(re).startOf("day").minute(pe+Ie).toDate()}function Q(re,pe){return B(re,pe,"minutes")}function ue(re){var pe=e(re).startOf("day"),Ie=e(re);return Ie.diff(pe,"minutes")+o(re)}function ee(re,pe){var Ie=e(re),Oe=e(pe);return Ie.isBefore(Oe,"day")}function le(re,pe,Ie){var Oe=e(pe),Ne=e(Ie);return Oe.isSameOrAfter(Ne,"minutes")}function W(re,pe){var Ie=e(re),Oe=e(pe),Ne=e.duration(Oe.diff(Ie));return Ne.days()}function de(re){var pe=re.evtA,Ie=pe.start,Oe=pe.end,Ne=pe.allDay,Be=re.evtB,Je=Be.start,ze=Be.end,Qe=Be.allDay,It=+a(Ie,"day")-+a(Je,"day"),Zt=W(Ie,Oe),Re=W(Je,ze);return It||Re-Zt||!!Qe-!!Ne||+Ie-+Je||+Oe-+ze}function oe(re){var pe=re.event,Ie=pe.start,Oe=pe.end,Ne=re.range,Be=Ne.start,Je=Ne.end,ze=e(Ie).startOf("day"),Qe=e(Oe),It=e(Be),Zt=e(Je),Re=ze.isSameOrBefore(Zt,"day"),tt=!ze.isSame(Qe,"minutes"),at=tt?Qe.isAfter(It,"minutes"):Qe.isSameOrAfter(It,"minutes");return Re&&at}function he(re,pe){var Ie=e(re),Oe=e(pe);return Ie.isSame(Oe,"day")}function K(){var re=new Date,pe=/-/.test(re.toString())?"-":"",Ie=re.getTimezoneOffset(),Oe=Number("".concat(pe).concat(Math.abs(Ie))),Ne=e().utcOffset();return Ne>Oe?1:0}return new JK({formats:tX,firstOfWeek:Z,firstVisibleDay:U,lastVisibleDay:z,visibleDays:$,format:function(pe,Ie,Oe){return t(e(pe),Oe).format(Ie)},lt:g,lte:w,gt:m,gte:v,eq:d,neq:f,merge:k,inRange:D,startOf:a,endOf:u,range:R,add:A,diff:B,ceil:j,min:T,max:I,minutes:L,getSlotDate:te,getTimezoneOffset:n,getDstOffset:r,getTotalMin:Q,getMinutesFromMidnight:ue,continuesPrior:ee,continuesAfter:le,sortEvents:de,inEventRange:oe,isSameDate:he,daySpan:W,browserTZOffset:K})}function fI(e,t,n,r,o){const i={start:r.start(e),end:r.end(e)},a={start:t,end:n};return o.inEventRange({event:i,range:a})}function rX(e,t){return!e||t==null?!1:Nx.isEqual(e,t)}const uh={PREVIOUS:"PREV",NEXT:"NEXT",TODAY:"TODAY",DATE:"DATE"};function ou({accessors:e,components:t,date:n,events:r,getters:o,length:i,localizer:a,onDoubleClickEvent:u,onSelectEvent:d,selected:f}){F.useRef(null);const m=F.useRef(null),g=F.useRef(null),v=F.useRef(null),w=F.useRef(null),[D,T]=F.useState(!1),[I,k]=F.useState(!1),A=($,te,Q)=>{const{event:ue,date:ee}=t;return te=te.filter(le=>fI(le,a.startOf($,"day"),a.endOf($,"day"),e,a)),te.map((le,W)=>{const de=e.title(le),oe=e.end(le),he=e.start(le),K=o.eventProp(le,he,oe,rX(le,f)),re=W===0&&a.format($,"agendaDateFormat"),pe=W===0?y.jsx("td",{rowSpan:te.length,className:"rbc-agenda-date-cell",children:ee?y.jsx(ee,{day:$,label:re}):re}):!1;return y.jsxs("tr",{className:K.className,style:K.style,children:[pe,y.jsx("td",{className:"rbc-agenda-time-cell",children:R($,le)}),y.jsx("td",{className:"rbc-agenda-event-cell",onClick:Ie=>d&&d(le,Ie),onDoubleClick:Ie=>u&&u(le,Ie),children:ue?y.jsx(ue,{event:le,title:de}):de})]},Q+"_"+W)},[])},R=($,te)=>{const Q=t.time;let ue="",ee=a.messages.allDay;const le=e.end(te),W=e.start(te);return e.allDay(te)||(a.eq(W,le)?ee=a.format(W,"agendaTimeFormat"):a.isSameDate(W,le)?ee=a.format({start:W,end:le},"agendaTimeRangeFormat"):a.isSameDate($,W)?ee=a.format(W,"agendaTimeFormat"):a.isSameDate($,le)&&(ee=a.format(le,"agendaTimeFormat"))),a.gt($,W,"day")&&(ue="rbc-continues-prior"),a.lt($,le,"day")&&(ue+=" rbc-continues-after"),y.jsx("span",{className:ue.trim(),children:Q?y.jsx(Q,{event:te,day:$,label:ee}):ee})},{messages:j}=a,B=a.add(n,-i/2,"day"),L=a.add(n,i/2,"day"),Z=a.range(B,L,"day");D&&Z.reverse(),r=r.filter($=>fI($,a.startOf(B,"day"),a.endOf(L,"day"),e,a)),r.sort(($,te)=>+e.start($)-+e.start(te)),I&&r.reverse();const U=F.useCallback(()=>setTimeout(()=>{w.current&&m0(w.current).then($=>{new C.Notice(E("Image is generating..."));const te=yt.getState().settings.AutoSaveWhenOnMobile,Q=yt.getState().app.vault;if(te&&C.Platform.isMobile){const ue=$.split("base64,")[1];n0(ue,"image/png").arrayBuffer().then(async le=>{let W;const de="png",oe=su();for(const he in oe)if(oe[he]instanceof C.TFile){W=oe[he];break}W!==void 0&&await Q.createBinary(await Q.getAvailablePathForAttachments(`Pasted Image ${C.moment().format("YYYYMMDDHHmmss")}`,de,W),le)})}g0({imgUrl:$})}).catch($=>{console.error($)})},0),[w.current,Z]),z=F.useCallback($=>{const te=new C.Menu;te.addItem(Q=>{Q.setIcon("share-2").setTitle(E("Share")).onClick(()=>{U()})}),te.showAtMouseEvent($.nativeEvent)},[w.current,Z,U]);return y.jsx("div",{className:"rbc-agenda-view",children:r.length!==0?y.jsx(se.Fragment,{children:y.jsxs("table",{ref:w,className:"rbc-agenda-table",children:[y.jsx("thead",{onContextMenu:z,children:y.jsxs("tr",{children:[y.jsx("th",{className:"rbc-header",ref:m,onClick:()=>{T(!D)},children:j.date+(D?" 🔼":" 🔽")}),y.jsx("th",{className:"rbc-header",ref:g,onClick:()=>{k(!I)},children:j.time+(I?" 🔼":" 🔽")}),y.jsx("th",{className:"rbc-header",children:j.event})]})}),y.jsx("tbody",{ref:v,children:Z.map(($,te)=>A($,r,te))})]})}):y.jsx("span",{className:"rbc-agenda-empty",children:j.noEventsInRange})})}ou.propTypes={accessors:Me.object.isRequired,components:Me.object.isRequired,date:Me.instanceOf(Date),events:Me.array,getters:Me.object.isRequired,length:Me.number.isRequired,localizer:Me.object.isRequired,onSelectEvent:Me.func,onDoubleClickEvent:Me.func,selected:Me.object};ou.defaultProps={length:30};ou.range=(e,{length:t=ou.defaultProps.length,localizer:n})=>{const r=n.add(e,-t/2,"day"),o=n.add(e,t/2,"day");return{customStart:r,customEnd:o}};ou.navigate=(e,t,{length:n=ou.defaultProps.length,localizer:r})=>{switch(t){case uh.PREVIOUS:return r.add(e,-n,"day");case uh.NEXT:return r.add(e,n,"day");default:return e}};ou.title=(e,{length:t=ou.defaultProps.length,localizer:n})=>{const r=n.add(e,-t/2,"day"),o=n.add(e,t/2,"day");return n.format({start:r,end:o},"agendaHeaderFormat")};function oX(e,t){e.hoverEl.toggleClass("thino-hover-popover",!0);const n=sg(e.hoverEl);return n.render(y.jsx(Ra,{store:_e,context:Ot,children:y.jsx(Oi,{memo:t})})),n}function iX({event:e}){const t=e.resource,n=t.content.split(`
|
|
|
`)[0].slice(0,20),r=se.useRef(null),o=se.useRef(null),i=se.useRef(null);F.useEffect(()=>{if(o.current)return C.setIcon(o.current,"calendar"),()=>{r.current&&(r.current=null)}},[r]);const a=F.useCallback(d=>{i.current&&(i.current.unmount(),i.current=null),i.current=d},[]),u=F.useCallback(d=>{if(!r.current||!C.Keymap.isModifier(d.nativeEvent,"Mod"))return;const f=new C.HoverPopover(yt.getState().view,r.current,100),m=oX(f,t);a(m)},[r.current]);return y.jsxs("span",{className:"rbc-event-renderer","data-source-type":t.sourceType,"data-thino-type":t.thinoType,"data-thino-id":t.id,ref:r,"aria-label":t.path,onMouseOver:u,children:[y.jsx(aX,{event:e}),y.jsx("strong",{children:n})]})}const aX=({event:e})=>{const t=se.useRef(null),n=e.resource;F.useEffect(()=>{t.current&&C.setIcon(t.current,n.thinoType==="JOURNAL"?"calendar":n.thinoType==="TASK-TODO"?"square":"check-square")},[n==null?void 0:n.thinoType,t]);const r=F.useCallback(async o=>{o.stopPropagation(),o.preventDefault(),await(async()=>{const a=await je.updateMemo(n.id,n.content,n.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");a&&je.editMemo(a)})()},[n==null?void 0:n.thinoType,n==null?void 0:n.id,n==null?void 0:n.content]);return y.jsx(y.Fragment,{children:y.jsxs("span",{className:"rbc-event-icon-group",children:[y.jsx("span",{className:"rbc-event-icon",ref:t,onClick:r}),y.jsx("span",{className:Kn("rbc-event-time","hidden"),children:y.jsx("span",{className:"rbc-event-time-text",children:C.moment(e.start).format("HH:mm")})})]})})};function w3({views:e,view:t,messages:n,onView:r}){return e.map(o=>y.jsx("button",{type:"button",className:Kn({"rbc-active":t===o}),onClick:()=>r(o),children:n[o]},o))}w3.propTypes={messages:Me.object,onView:Me.func,view:Me.string,views:Me.array};function b3({date:e,label:t,localizer:{messages:n},onNavigate:r,onView:o,view:i,views:a}){const u={previous:F.useRef(null),today:F.useRef(null),next:F.useRef(null)};F.useEffect(()=>{u&&(C.setIcon(u.previous.current,"chevron-left"),C.setIcon(u.today.current,"dot"),C.setIcon(u.next.current,"chevron-right"))},[u]);const d=F.useMemo(()=>y.jsxs(y.Fragment,{children:[y.jsx("button",{ref:u.previous,type:"button",onClick:()=>r(uh.PREVIOUS),"aria-label":n.previous,children:"<"}),y.jsx("button",{ref:u.today,type:"button",onClick:()=>r(uh.TODAY),"aria-label":n.today,children:"•"}),y.jsx("button",{ref:u.next,type:"button",onClick:()=>r(uh.NEXT),"aria-label":n.next,children:">"})]}),[n]);return y.jsxs("div",{className:"rbc-toolbar",children:[y.jsx("span",{className:Kn("rbc-btn-group","thino-view-custom-toolbar"),children:d}),y.jsx("span",{className:"rbc-toolbar-label",children:y.jsx(Cv,{type:"text",handleValueChange:f=>{r(uh.DATE,C.moment(f,"YYYY-MM-DD").format("YYYY-MM-DDTHH:mm:ssZ"))},defaultText:t+(i==="week"?C.moment(e.valueOf(),"x").format(" [W]WW"):""),defaultValue:C.moment(e.valueOf(),"x").valueOf()})}),y.jsx("span",{className:"rbc-btn-group",children:y.jsx(w3,{view:i,views:a,messages:n,onView:o})})]})}b3.propTypes={date:Me.instanceOf(Date),label:Me.string,localizer:Me.object,messages:Me.object,onNavigate:Me.func,onView:Me.func,view:Me.string,views:Me.array};function sX({event:e,children:t,showPopup:n,callRender:r,...o}){const i=F.useRef(null),a=F.useRef(null),u=F.useCallback(d=>{if(!d.isTrusted){r();return}a.current=d.nativeEvent.target,a.current&&(a.current.hasClass("rbc-event")||(a.current=a.current.closest(".rbc-event")),i.current!==null?(window.clearTimeout(i.current),i.current=null):i.current=window.setTimeout(()=>{n(e,a.current),i.current=null},250))},[e,n]);return y.jsx(y.Fragment,{children:y.jsx("div",{className:"rbc-event-wrapper","aria-describedby":"thino",onClick:u,children:t})})}const lX=nX(C.moment),uX=({event:e})=>{const t=e.resource;return y.jsx(y.Fragment,{children:y.jsx(Oi,{memo:t})})},cX=e=>{var Q;const{thinos:t}=e,[n,r]=se.useState([]),[o,i]=se.useState((app==null?void 0:app.loadLocalStorage("thino-calendar-view"))||"month"),[a,u]=se.useState(null),d=se.useRef(null),f=se.useRef(null),[m,g]=se.useState(!1),v=F.useRef(null),[w,D]=F.useState(new Date);F.useEffect(()=>()=>{d.current&&(d.current=null),f.current&&(f.current=null),v.current&&(v.current=null)},[]),F.useEffect(()=>{const ue=t.map(ee=>{const le=C.moment(ee.createdAt,"YYYY/MM/DD HH:mm:ss"),W=le.clone().add(1,"minute");return{title:ee.content,start:new Date(le.format("YYYY-MM-DDTHH:mm:ss")),end:new Date(W.format("YYYY-MM-DDTHH:mm:ss")),resource:ee}});r(ue)},[t]),F.useEffect(()=>{app==null||app.saveLocalStorage("thino-calendar-view",o)},[o]),F.useEffect(()=>{m&&u(t.find(ue=>ue.id===a.id))},[t]),F.useEffect(()=>{a&&v.current.update()},[a]),v.current=p0(d.current,f.current,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,4]}}]});const T=F.useCallback(()=>{v.current.update(),v.current.update()},[]),I=F.useCallback((ue,ee)=>{u(null),j(),v.current.state.elements.reference=ee,u(ue.resource),B()},[]),k=F.useCallback(()=>{j(),u(null)},[]),A=F.useCallback((ue,ee,le)=>{var W;if(R(ue),ee==="week"||ee==="day"){const de=d.current.find(".rbc-event-wrapper");if(d.current.closest(".memolist-wrapper"),de){(W=de.children[0])==null||W.click();return}else{setTimeout(()=>{var he,K;const oe=d.current.find(".rbc-event-wrapper");(K=(he=oe==null?void 0:oe.children)==null?void 0:he[0])==null||K.click()},0);return}}},[]),R=F.useCallback(ue=>{D(ue)},[D]);cg(f,k);const j=F.useCallback(()=>{g(!1)},[g]),B=F.useCallback(()=>{v.current.update(),g(!0)},[g]),L=F.useCallback(ue=>{const ee=ue.resource;dt.setEditMemoId(ee.id)},[]),Z=F.useCallback(ue=>{i(ue)},[i]),{components:U,views:z,messages:$}=F.useMemo(()=>({components:{toolbar:b3,eventWrapper:ue=>y.jsx(sX,{...ue,callRender:T,showPopup:I}),agenda:{event:uX},event:iX},views:{month:!0,agenda:ou,week:!0,day:!0},messages:{month:E("Month"),day:E("Day"),next:E("Next"),previous:E("Previous"),today:E("Today"),agenda:E("Agenda"),week:E("Week"),yesterday:E("Yesterday"),tomorrow:E("Tomorrow"),noEventsInRange:E("No thinos in range"),date:E("date"),time:E("time"),event:E("event")}}),[]),te=F.useMemo(()=>({timeGutterFormat:(ue,ee,le)=>le.format(ue,"HH:mm",ee),agendaTimeRangeFormat:({start:ue,end:ee},le,W)=>W.format(ue,"HH:mm",le)+" — "+W.format(ee,"HH:mm",le),agendaHeaderFormat:({start:ue,end:ee},le,W)=>W.format(ue,"YYYY-MM-DD")+" — "+W.format(ee,"YYYY-MM-DD")}),[]);return y.jsxs("div",{ref:d,className:"calendar-view",children:[y.jsx(JQ,{date:w,messages:$,components:U,localizer:lX,events:n,views:z,onView:Z,onDoubleClickEvent:L,onNavigate:A,formats:te,defaultView:o,tooltipAccessor:null,startAccessor:"start",endAccessor:"end"}),y.jsx("div",{ref:f,style:(Q=v.current)==null?void 0:Q.styles.popper,className:Kn("thino-popup-container",m?"":"hidden"),children:a&&y.jsx(Oi,{memo:a})})]})};function ic(e,t){return typeof e=="function"?e(t):e}function la(e,t){return n=>{t.setState(r=>({...r,[e]:ic(n,r[e])}))}}function Zv(e){return e instanceof Function}function dX(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function fX(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const a=t(i);a!=null&&a.length&&r(a)})};return r(e),n}function Lt(e,t,n){let r=[],o;return i=>{let a;n.key&&n.debug&&(a=Date.now());const u=e(i);if(!(u.length!==r.length||u.some((m,g)=>r[g]!==m)))return o;r=u;let f;if(n.key&&n.debug&&(f=Date.now()),o=t(...u),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const m=Math.round((Date.now()-a)*100)/100,v=Math.round((Date.now()-f)*100)/100/16,w=(D,T)=>{for(D=String(D);D.length<T;)D=" "+D;return D}}return o}}function Rt(e,t,n,r){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[t]},key:!1,onChange:r}}function hX(e,t,n,r){var o,i;const u={...e._getDefaultColumnDef(),...t},d=u.accessorKey;let f=(o=(i=u.id)!=null?i:d?d.replace(".","_"):void 0)!=null?o:typeof u.header=="string"?u.header:void 0,m;if(u.accessorFn?m=u.accessorFn:d&&(d.includes(".")?m=v=>{let w=v;for(const T of d.split(".")){var D;w=(D=w)==null?void 0:D[T]}return w}:m=v=>v[u.accessorKey]),!f)throw new Error;let g={id:`${String(f)}`,accessorFn:m,parent:r,depth:n,columnDef:u,columns:[],getFlatColumns:Lt(()=>[!0],()=>{var v;return[g,...(v=g.columns)==null?void 0:v.flatMap(w=>w.getFlatColumns())]},Rt(e.options,"debugColumns")),getLeafColumns:Lt(()=>[e._getOrderColumnsFn()],v=>{var w;if((w=g.columns)!=null&&w.length){let D=g.columns.flatMap(T=>T.getLeafColumns());return v(D)}return[g]},Rt(e.options,"debugColumns"))};for(const v of e._features)v.createColumn==null||v.createColumn(g,e);return g}const Ro="debugHeaders";function hI(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],u=d=>{d.subHeaders&&d.subHeaders.length&&d.subHeaders.map(u),a.push(d)};return u(i),a},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(i,e)}),i}const pX={createTable:e=>{e.getHeaderGroups=Lt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,a;const u=(i=r==null?void 0:r.map(g=>n.find(v=>v.id===g)).filter(Boolean))!=null?i:[],d=(a=o==null?void 0:o.map(g=>n.find(v=>v.id===g)).filter(Boolean))!=null?a:[],f=n.filter(g=>!(r!=null&&r.includes(g.id))&&!(o!=null&&o.includes(g.id)));return zy(t,[...u,...f,...d],e)},Rt(e.options,Ro)),e.getCenterHeaderGroups=Lt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),zy(t,n,e,"center")),Rt(e.options,Ro)),e.getLeftHeaderGroups=Lt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(u=>u.id===a)).filter(Boolean))!=null?o:[];return zy(t,i,e,"left")},Rt(e.options,Ro)),e.getRightHeaderGroups=Lt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(a=>n.find(u=>u.id===a)).filter(Boolean))!=null?o:[];return zy(t,i,e,"right")},Rt(e.options,Ro)),e.getFooterGroups=Lt(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Rt(e.options,Ro)),e.getLeftFooterGroups=Lt(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Rt(e.options,Ro)),e.getCenterFooterGroups=Lt(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Rt(e.options,Ro)),e.getRightFooterGroups=Lt(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Rt(e.options,Ro)),e.getFlatHeaders=Lt(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Rt(e.options,Ro)),e.getLeftFlatHeaders=Lt(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Rt(e.options,Ro)),e.getCenterFlatHeaders=Lt(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Rt(e.options,Ro)),e.getRightFlatHeaders=Lt(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Rt(e.options,Ro)),e.getCenterLeafHeaders=Lt(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Rt(e.options,Ro)),e.getLeftLeafHeaders=Lt(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Rt(e.options,Ro)),e.getRightLeafHeaders=Lt(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Rt(e.options,Ro)),e.getLeafHeaders=Lt(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,a,u,d,f;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(a=(u=n[0])==null?void 0:u.headers)!=null?a:[],...(d=(f=r[0])==null?void 0:f.headers)!=null?d:[]].map(m=>m.getLeafHeaders()).flat()},Rt(e.options,Ro))}};function zy(e,t,n,r){var o,i;let a=0;const u=function(v,w){w===void 0&&(w=1),a=Math.max(a,w),v.filter(D=>D.getIsVisible()).forEach(D=>{var T;(T=D.columns)!=null&&T.length&&u(D.columns,w+1)},0)};u(e);let d=[];const f=(v,w)=>{const D={depth:w,id:[r,`${w}`].filter(Boolean).join("_"),headers:[]},T=[];v.forEach(I=>{const k=[...T].reverse()[0],A=I.column.depth===D.depth;let R,j=!1;if(A&&I.column.parent?R=I.column.parent:(R=I.column,j=!0),k&&(k==null?void 0:k.column)===R)k.subHeaders.push(I);else{const B=hI(n,R,{id:[r,w,R.id,I==null?void 0:I.id].filter(Boolean).join("_"),isPlaceholder:j,placeholderId:j?`${T.filter(L=>L.column===R).length}`:void 0,depth:w,index:T.length});B.subHeaders.push(I),T.push(B)}D.headers.push(I),I.headerGroup=D}),d.push(D),w>0&&f(T,w-1)},m=t.map((v,w)=>hI(n,v,{depth:a,index:w}));f(m,a-1),d.reverse();const g=v=>v.filter(D=>D.column.getIsVisible()).map(D=>{let T=0,I=0,k=[0];D.subHeaders&&D.subHeaders.length?(k=[],g(D.subHeaders).forEach(R=>{let{colSpan:j,rowSpan:B}=R;T+=j,k.push(B)})):T=1;const A=Math.min(...k);return I+=A,D.colSpan=T,D.rowSpan=I,{colSpan:T,rowSpan:I}});return g((o=(i=d[0])==null?void 0:i.headers)!=null?o:[]),d}const Vy={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},pb=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),mX={getDefaultColumnDef:()=>Vy,getInitialState:e=>({columnSizing:{},columnSizingInfo:pb(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:la("columnSizing",e),onColumnSizingInfoChange:la("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Vy.minSize,(r=i??e.columnDef.size)!=null?r:Vy.size),(o=e.columnDef.maxSize)!=null?o:Vy.maxSize)},e.getStart=Lt(n=>[n,Im(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),Rt(t.options,"debugColumns")),e.getAfter=Lt(n=>[n,Im(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),Rt(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=r==null?void 0:r.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),mb(i)&&i.touches&&i.touches.length>1))return;const a=e.getSize(),u=e?e.getLeafHeaders().map(k=>[k.column.id,k.column.getSize()]):[[r.id,r.getSize()]],d=mb(i)?Math.round(i.touches[0].clientX):i.clientX,f={},m=(k,A)=>{typeof A=="number"&&(t.setColumnSizingInfo(R=>{var j,B;const L=t.options.columnResizeDirection==="rtl"?-1:1,Z=(A-((j=R==null?void 0:R.startOffset)!=null?j:0))*L,U=Math.max(Z/((B=R==null?void 0:R.startSize)!=null?B:0),-.999999);return R.columnSizingStart.forEach(z=>{let[$,te]=z;f[$]=Math.round(Math.max(te+te*U,0)*100)/100}),{...R,deltaOffset:Z,deltaPercentage:U}}),(t.options.columnResizeMode==="onChange"||k==="end")&&t.setColumnSizing(R=>({...R,...f})))},g=k=>m("move",k),v=k=>{m("end",k),t.setColumnSizingInfo(A=>({...A,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},w=n||typeof document<"u"?document:null,D={moveHandler:k=>g(k.clientX),upHandler:k=>{w==null||w.removeEventListener("mousemove",D.moveHandler),w==null||w.removeEventListener("mouseup",D.upHandler),v(k.clientX)}},T={moveHandler:k=>(k.cancelable&&(k.preventDefault(),k.stopPropagation()),g(k.touches[0].clientX),!1),upHandler:k=>{var A;w==null||w.removeEventListener("touchmove",T.moveHandler),w==null||w.removeEventListener("touchend",T.upHandler),k.cancelable&&(k.preventDefault(),k.stopPropagation()),v((A=k.touches[0])==null?void 0:A.clientX)}},I=gX()?{passive:!1}:!1;mb(i)?(w==null||w.addEventListener("touchmove",T.moveHandler,I),w==null||w.addEventListener("touchend",T.upHandler,I)):(w==null||w.addEventListener("mousemove",D.moveHandler,I),w==null||w.addEventListener("mouseup",D.upHandler,I)),t.setColumnSizingInfo(k=>({...k,startOffset:d,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:u,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?pb():(n=e.initialState.columnSizingInfo)!=null?n:pb())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let Wy=null;function gX(){if(typeof Wy=="boolean")return Wy;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Wy=e,Wy}function mb(e){return e.type==="touchstart"}const yX={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:la("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const a=i.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(u=>{a[u]=!0}):a=r,n=(o=n)!=null?o:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:u,...d}=a;return d}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},S3=(e,t,n)=>{var r;const o=n.toLowerCase();return!!(!((r=e.getValue(t))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(o))};S3.autoRemove=e=>ps(e);const D3=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};D3.autoRemove=e=>ps(e);const T3=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};T3.autoRemove=e=>ps(e);const I3=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};I3.autoRemove=e=>ps(e)||!(e!=null&&e.length);const x3=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});x3.autoRemove=e=>ps(e)||!(e!=null&&e.length);const E3=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});E3.autoRemove=e=>ps(e)||!(e!=null&&e.length);const C3=(e,t,n)=>e.getValue(t)===n;C3.autoRemove=e=>ps(e);const M3=(e,t,n)=>e.getValue(t)==n;M3.autoRemove=e=>ps(e);const jS=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};jS.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(o)?1/0:o;if(i>a){const u=i;i=a,a=u}return[i,a]};jS.autoRemove=e=>ps(e)||ps(e[0])&&ps(e[1]);const Gl={includesString:S3,includesStringSensitive:D3,equalsString:T3,arrIncludes:I3,arrIncludesAll:x3,arrIncludesSome:E3,equals:C3,weakEquals:M3,inNumberRange:jS};function ps(e){return e==null||e===""}const vX={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:la("columnFilters",e),onGlobalFilterChange:la("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Gl.includesString:typeof r=="number"?Gl.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Gl.equals:Array.isArray(r)?Gl.arrIncludes:Gl.weakEquals},e.getFilterFn=()=>{var n,r;return Zv(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Gl[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r==null?void 0:r.find(m=>m.id===e.id),a=ic(n,i?i.value:void 0);if(pI(o,a,e)){var u;return(u=r==null?void 0:r.filter(m=>m.id!==e.id))!=null?u:[]}const d={id:e.id,value:a};if(i){var f;return(f=r==null?void 0:r.map(m=>m.id===e.id?d:m))!=null?f:[]}return r!=null&&r.length?[...r,d]:[d]})},e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Gl.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Zv(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Gl[r]},e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=ic(t,o))==null?void 0:i.filter(a=>{const u=n.find(d=>d.id===a.id);if(u){const d=u.getFilterFn();if(pI(d,a.value,u))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()),e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}};function pI(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const wX=(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),bX=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},SX=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}),r},DX=(e,t,n)=>{let r,o;return n.forEach(i=>{const a=i.getValue(e);a!=null&&(r===void 0?a>=a&&(r=o=a):(r>a&&(r=a),o<a&&(o=a)))}),[r,o]},TX=(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},IX=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!dX(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,a)=>i-a);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},xX=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),EX=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,CX=(e,t)=>t.length,gb={sum:wX,min:bX,max:SX,extent:DX,mean:TX,median:IX,unique:xX,uniqueCount:EX,count:CX},MX={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:la("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r,o,i;return(n=(r=(o=(i=e.columnDef.enableGrouping)!=null?i:!0)!=null?o:t.options.enableGrouping)!=null?r:!0)!=null?n:!!e.accessorFn},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return gb.sum;if(Object.prototype.toString.call(r)==="[object Date]")return gb.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Zv(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:gb[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function kX(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(a=>a.id===i)).filter(Boolean),...r]}const NX={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:la("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Lt(n=>[Im(t,n)],n=>n.findIndex(r=>r.id===e.id),Rt(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=Im(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Im(t,n);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Lt(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const a=[...t],u=[...o];for(;u.length&&a.length;){const d=a.shift(),f=u.findIndex(m=>m.id===d);f>-1&&i.push(u.splice(f,1)[0])}i=[...i,...u]}return kX(i,n,r)},Rt(e.options,"debugTable"))}},p1=0,m1=10,yb=()=>({pageIndex:p1,pageSize:m1}),AX={getInitialState:e=>({...e,pagination:{...yb(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:la("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>ic(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?yb():(o=e.initialState.pagination)!=null?o:yb())},e.setPageIndex=r=>{e.setPagination(o=>{let i=ic(r,o.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,a)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?p1:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:p1)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?m1:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:m1)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,ic(r,o.pageSize)),a=o.pageSize*o.pageIndex,u=Math.floor(a/i);return{...o,pageIndex:u,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let a=ic(r,(i=e.options.pageCount)!=null?i:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...o,pageCount:a}}),e.getPageOptions=Lt(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,a)=>a)),o},Rt(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},vb=()=>({left:[],right:[]}),wb=()=>({top:[],bottom:[]}),FX={getInitialState:e=>({columnPinning:vb(),rowPinning:wb(),...e}),getDefaultOptions:e=>({onColumnPinningChange:la("columnPinning",e),onRowPinningChange:la("rowPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,a;if(n==="right"){var u,d;return{left:((u=o==null?void 0:o.left)!=null?u:[]).filter(g=>!(r!=null&&r.includes(g))),right:[...((d=o==null?void 0:o.right)!=null?d:[]).filter(g=>!(r!=null&&r.includes(g))),...r]}}if(n==="left"){var f,m;return{left:[...((f=o==null?void 0:o.left)!=null?f:[]).filter(g=>!(r!=null&&r.includes(g))),...r],right:((m=o==null?void 0:o.right)!=null?m:[]).filter(g=>!(r!=null&&r.includes(g)))}}return{left:((i=o==null?void 0:o.left)!=null?i:[]).filter(g=>!(r!=null&&r.includes(g))),right:((a=o==null?void 0:o.right)!=null?a:[]).filter(g=>!(r!=null&&r.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,a;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(u=>u.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(u=>r==null?void 0:r.includes(u)),a=n.some(u=>o==null?void 0:o.includes(u));return i?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(d=>{let{id:f}=d;return f}):[],a=o?e.getParentRows().map(d=>{let{id:f}=d;return f}):[],u=new Set([...a,e.id,...i]);t.setRowPinning(d=>{var f,m;if(n==="bottom"){var g,v;return{top:((g=d==null?void 0:d.top)!=null?g:[]).filter(T=>!(u!=null&&u.has(T))),bottom:[...((v=d==null?void 0:d.bottom)!=null?v:[]).filter(T=>!(u!=null&&u.has(T))),...Array.from(u)]}}if(n==="top"){var w,D;return{top:[...((w=d==null?void 0:d.top)!=null?w:[]).filter(T=>!(u!=null&&u.has(T))),...Array.from(u)],bottom:((D=d==null?void 0:d.bottom)!=null?D:[]).filter(T=>!(u!=null&&u.has(T)))}}return{top:((f=d==null?void 0:d.top)!=null?f:[]).filter(T=>!(u!=null&&u.has(T))),bottom:((m=d==null?void 0:d.bottom)!=null?m:[]).filter(T=>!(u!=null&&u.has(T)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(u=>r==null?void 0:r.includes(u)),a=n.some(u=>o==null?void 0:o.includes(u));return i?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=t._getPinnedRows(o))==null?void 0:n.map(a=>{let{id:u}=a;return u});return(r=i==null?void 0:i.indexOf(e.id))!=null?r:-1},e.getCenterVisibleCells=Lt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(a=>!i.includes(a.column.id))},Rt(t.options,"debugRows")),e.getLeftVisibleCells=Lt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),Rt(t.options,"debugRows")),e.getRightVisibleCells=Lt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(a=>a.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),Rt(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?vb():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:vb())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Lt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),Rt(e.options,"debugColumns")),e.getRightLeafColumns=Lt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),Rt(e.options,"debugColumns")),e.getCenterLeafColumns=Lt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},Rt(e.options,"debugColumns")),e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?wb():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:wb())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=Lt(t=>[e.getRowModel().rows,e.getState().rowPinning[t],t],(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(a=>{const u=e.getRow(a,!0);return u.getIsAllParentsExpanded()?u:null}):(n??[]).map(a=>t.find(u=>u.id===a))).filter(Boolean).map(a=>({...a,position:r}))},Rt(e.options,"debugRows")),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=Lt(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},Rt(e.options,"debugRows"))}},PX={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:la("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{g1(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Lt(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?bb(e,n):{rows:[],flatRows:[],rowsById:{}},Rt(e.options,"debugTable")),e.getFilteredSelectedRowModel=Lt(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?bb(e,n):{rows:[],flatRows:[],rowsById:{}},Rt(e.options,"debugTable")),e.getGroupedSelectedRowModel=Lt(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?bb(e,n):{rows:[],flatRows:[],rowsById:{}},Rt(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var a;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const u={...i};return g1(u,e.id,n,(a=r==null?void 0:r.selectChildren)!=null?a:!0,t),u})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return LS(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return y1(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return y1(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},g1=(e,t,n,r,o)=>{var i;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(u=>delete e[u]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=a.subRows)!=null&&i.length&&a.getCanSelectSubRows()&&a.subRows.forEach(u=>g1(e,u.id,n,r,o))};function bb(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(a,u){return a.map(d=>{var f;const m=LS(d,n);if(m&&(r.push(d),o[d.id]=d),(f=d.subRows)!=null&&f.length&&(d={...d,subRows:i(d.subRows)}),m)return d}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function LS(e,t){var n;return(n=t[e.id])!=null?n:!1}function y1(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(a=>{if(!(i&&!o)&&(a.getCanSelect()&&(LS(a,t)?i=!0:o=!1),a.subRows&&a.subRows.length)){const u=y1(a,t);u==="all"?i=!0:(u==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const v1=/([0-9]+)/gm,OX=(e,t,n)=>k3(dc(e.getValue(n)).toLowerCase(),dc(t.getValue(n)).toLowerCase()),jX=(e,t,n)=>k3(dc(e.getValue(n)),dc(t.getValue(n))),LX=(e,t,n)=>RS(dc(e.getValue(n)).toLowerCase(),dc(t.getValue(n)).toLowerCase()),RX=(e,t,n)=>RS(dc(e.getValue(n)),dc(t.getValue(n))),_X=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},BX=(e,t,n)=>RS(e.getValue(n),t.getValue(n));function RS(e,t){return e===t?0:e>t?1:-1}function dc(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function k3(e,t){const n=e.split(v1).filter(Boolean),r=t.split(v1).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),a=parseInt(o,10),u=parseInt(i,10),d=[a,u].sort();if(isNaN(d[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(d[1]))return isNaN(a)?-1:1;if(a>u)return 1;if(u>a)return-1}return n.length-r.length}const sh={alphanumeric:OX,alphanumericCaseSensitive:jX,text:LX,textCaseSensitive:RX,datetime:_X,basic:BX},HX={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:la("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return sh.datetime;if(typeof i=="string"&&(r=!0,i.split(v1).length>1))return sh.alphanumeric}return r?sh.text:sh.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Zv(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:sh[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(a=>{const u=a==null?void 0:a.find(w=>w.id===e.id),d=a==null?void 0:a.findIndex(w=>w.id===e.id);let f=[],m,g=i?n:o==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?u?m="toggle":m="add":a!=null&&a.length&&d!==a.length-1?m="replace":u?m="toggle":m="replace",m==="toggle"&&(i||o||(m="remove")),m==="add"){var v;f=[...a,{id:e.id,desc:g}],f.splice(0,f.length-((v=t.options.maxMultiSortColCount)!=null?v:Number.MAX_SAFE_INTEGER))}else m==="toggle"?f=a.map(w=>w.id===e.id?{...w,desc:g}:w):m==="remove"?f=a.filter(w=>w.id!==e.id):f=[{id:e.id,desc:g}];return f})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:a==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},YX={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:la("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const o=e.columns;return(n=o.length?o.some(i=>i.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Lt(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Rt(t.options,"debugRows")),e.getVisibleCells=Lt(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],Rt(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>Lt(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),Rt(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Im(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const mI=[pX,YX,NX,FX,vX,HX,MX,yX,AX,PX,mX];function UX(e){var t;e.debugAll||e.debugTable;let n={_features:mI};const r=n._features.reduce((m,g)=>Object.assign(m,g.getDefaultOptions==null?void 0:g.getDefaultOptions(n)),{}),o=m=>n.options.mergeOptions?n.options.mergeOptions(r,m):{...r,...m};let a={...{},...(t=e.initialState)!=null?t:{}};n._features.forEach(m=>{var g;a=(g=m.getInitialState==null?void 0:m.getInitialState(a))!=null?g:a});const u=[];let d=!1;const f={_features:mI,options:{...r,...e},initialState:a,_queue:m=>{u.push(m),d||(d=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();d=!1}).catch(g=>setTimeout(()=>{throw g})))},reset:()=>{n.setState(n.initialState)},setOptions:m=>{const g=ic(m,n.options);n.options=o(g)},getState:()=>n.options.state,setState:m=>{n.options.onStateChange==null||n.options.onStateChange(m)},_getRowId:(m,g,v)=>{var w;return(w=n.options.getRowId==null?void 0:n.options.getRowId(m,g,v))!=null?w:`${v?[v.id,g].join("."):g}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(m,g)=>{let v=(g?n.getPrePaginationRowModel():n.getRowModel()).rowsById[m];if(!v&&(v=n.getCoreRowModel().rowsById[m],!v))throw new Error;return v},_getDefaultColumnDef:Lt(()=>[n.options.defaultColumn],m=>{var g;return m=(g=m)!=null?g:{},{header:v=>{const w=v.header.column.columnDef;return w.accessorKey?w.accessorKey:w.accessorFn?w.id:null},cell:v=>{var w,D;return(w=(D=v.renderValue())==null||D.toString==null?void 0:D.toString())!=null?w:null},...n._features.reduce((v,w)=>Object.assign(v,w.getDefaultColumnDef==null?void 0:w.getDefaultColumnDef()),{}),...m}},Rt(e,"debugColumns")),_getColumnDefs:()=>n.options.columns,getAllColumns:Lt(()=>[n._getColumnDefs()],m=>{const g=function(v,w,D){return D===void 0&&(D=0),v.map(T=>{const I=hX(n,T,D,w),k=T;return I.columns=k.columns?g(k.columns,I,D+1):[],I})};return g(m)},Rt(e,"debugColumns")),getAllFlatColumns:Lt(()=>[n.getAllColumns()],m=>m.flatMap(g=>g.getFlatColumns()),Rt(e,"debugColumns")),_getAllFlatColumnsById:Lt(()=>[n.getAllFlatColumns()],m=>m.reduce((g,v)=>(g[v.id]=v,g),{}),Rt(e,"debugColumns")),getAllLeafColumns:Lt(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(m,g)=>{let v=m.flatMap(w=>w.getLeafColumns());return g(v)},Rt(e,"debugColumns")),getColumn:m=>n._getAllFlatColumnsById()[m]};Object.assign(n,f);for(let m=0;m<n._features.length;m++){const g=n._features[m];g==null||g.createTable==null||g.createTable(n)}return n}function zX(e,t,n,r){const o=()=>{var a;return(a=i.getValue())!=null?a:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:Lt(()=>[e,n,t,i],(a,u,d,f)=>({table:a,column:u,row:d,cell:f,getValue:f.getValue,renderValue:f.renderValue}),Rt(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(i,n,t,e)},{}),i}const _S=(e,t,n,r,o,i,a)=>{let u={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:d=>{if(u._valuesCache.hasOwnProperty(d))return u._valuesCache[d];const f=e.getColumn(d);if(f!=null&&f.accessorFn)return u._valuesCache[d]=f.accessorFn(u.original,r),u._valuesCache[d]},getUniqueValues:d=>{if(u._uniqueValuesCache.hasOwnProperty(d))return u._uniqueValuesCache[d];const f=e.getColumn(d);if(f!=null&&f.accessorFn)return f.columnDef.getUniqueValues?(u._uniqueValuesCache[d]=f.columnDef.getUniqueValues(u.original,r),u._uniqueValuesCache[d]):(u._uniqueValuesCache[d]=[u.getValue(d)],u._uniqueValuesCache[d])},renderValue:d=>{var f;return(f=u.getValue(d))!=null?f:e.options.renderFallbackValue},subRows:i??[],getLeafRows:()=>fX(u.subRows,d=>d.subRows),getParentRow:()=>u.parentId?e.getRow(u.parentId,!0):void 0,getParentRows:()=>{let d=[],f=u;for(;;){const m=f.getParentRow();if(!m)break;d.push(m),f=m}return d.reverse()},getAllCells:Lt(()=>[e.getAllLeafColumns()],d=>d.map(f=>zX(e,u,f,f.id)),Rt(e.options,"debugRows")),_getAllCellsByColumnId:Lt(()=>[u.getAllCells()],d=>d.reduce((f,m)=>(f[m.column.id]=m,f),{}),Rt(e.options,"debugRows"))};for(let d=0;d<e._features.length;d++){const f=e._features[d];f==null||f.createRow==null||f.createRow(u,e)}return u};function VX(){return e=>Lt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,a){i===void 0&&(i=0);const u=[];for(let f=0;f<o.length;f++){const m=_S(e,e._getRowId(o[f],f,a),o[f],f,i,void 0,a==null?void 0:a.id);if(n.flatRows.push(m),n.rowsById[m.id]=m,u.push(m),e.options.getSubRows){var d;m.originalSubRows=e.options.getSubRows(o[f],f),(d=m.originalSubRows)!=null&&d.length&&(m.subRows=r(m.originalSubRows,i+1,m))}}return u};return n.rows=r(t),n},Rt(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function N3(e,t,n){return n.options.filterFromLeafRows?WX(e,t,n):ZX(e,t,n)}function WX(e,t,n){var r;const o=[],i={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,u=function(d,f){f===void 0&&(f=0);const m=[];for(let v=0;v<d.length;v++){var g;let w=d[v];const D=_S(n,w.id,w.original,w.index,w.depth,void 0,w.parentId);if(D.columnFilters=w.columnFilters,(g=w.subRows)!=null&&g.length&&f<a){if(D.subRows=u(w.subRows,f+1),w=D,t(w)&&!D.subRows.length){m.push(w),i[w.id]=w,o.push(w);continue}if(t(w)||D.subRows.length){m.push(w),i[w.id]=w,o.push(w);continue}}else w=D,t(w)&&(m.push(w),i[w.id]=w,o.push(w))}return m};return{rows:u(e),flatRows:o,rowsById:i}}function ZX(e,t,n){var r;const o=[],i={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,u=function(d,f){f===void 0&&(f=0);const m=[];for(let v=0;v<d.length;v++){let w=d[v];if(t(w)){var g;if((g=w.subRows)!=null&&g.length&&f<a){const T=_S(n,w.id,w.original,w.index,w.depth,void 0,w.parentId);T.subRows=u(w.subRows,f+1),w=T}m.push(w),o.push(w),i[w.id]=w}}return m};return{rows:u(e),flatRows:o,rowsById:i}}function $X(){return e=>Lt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let v=0;v<t.flatRows.length;v++)t.flatRows[v].columnFilters={},t.flatRows[v].columnFiltersMeta={};return t}const o=[],i=[];(n??[]).forEach(v=>{var w;const D=e.getColumn(v.id);if(!D)return;const T=D.getFilterFn();T&&o.push({id:v.id,filterFn:T,resolvedValue:(w=T.resolveFilterValue==null?void 0:T.resolveFilterValue(v.value))!=null?w:v.value})});const a=n.map(v=>v.id),u=e.getGlobalFilterFn(),d=e.getAllLeafColumns().filter(v=>v.getCanGlobalFilter());r&&u&&d.length&&(a.push("__global__"),d.forEach(v=>{var w;i.push({id:v.id,filterFn:u,resolvedValue:(w=u.resolveFilterValue==null?void 0:u.resolveFilterValue(r))!=null?w:r})}));let f,m;for(let v=0;v<t.flatRows.length;v++){const w=t.flatRows[v];if(w.columnFilters={},o.length)for(let D=0;D<o.length;D++){f=o[D];const T=f.id;w.columnFilters[T]=f.filterFn(w,T,f.resolvedValue,I=>{w.columnFiltersMeta[T]=I})}if(i.length){for(let D=0;D<i.length;D++){m=i[D];const T=m.id;if(m.filterFn(w,T,m.resolvedValue,I=>{w.columnFiltersMeta[T]=I})){w.columnFilters.__global__=!0;break}}w.columnFilters.__global__!==!0&&(w.columnFilters.__global__=!1)}}const g=v=>{for(let w=0;w<a.length;w++)if(v.columnFilters[a[w]]===!1)return!1;return!0};return N3(t.rows,g,e)},Rt(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function qX(){return(e,t)=>Lt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,o)=>{if(!n.rows.length||!(r!=null&&r.length)&&!o)return n;const i=[...r.map(u=>u.id).filter(u=>u!==t),o?"__global__":void 0].filter(Boolean),a=u=>{for(let d=0;d<i.length;d++)if(u.columnFilters[i[d]]===!1)return!1;return!0};return N3(n.rows,a,e)},Rt(e.options,"debugTable"))}function GX(){return(e,t)=>Lt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let i=0;i<n.flatRows.length;i++){const a=n.flatRows[i].getUniqueValues(t);for(let u=0;u<a.length;u++){const d=a[u];if(r.has(d)){var o;r.set(d,((o=r.get(d))!=null?o:0)+1)}else r.set(d,1)}}return r},Rt(e.options,"debugTable"))}function JX(){return(e,t)=>Lt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{var r;if(!n)return;const o=(r=n.flatRows[0])==null?void 0:r.getUniqueValues(t);if(typeof o>"u")return;let i=[o,o];for(let a=0;a<n.flatRows.length;a++){const u=n.flatRows[a].getUniqueValues(t);for(let d=0;d<u.length;d++){const f=u[d];f<i[0]?i[0]=f:f>i[1]&&(i[1]=f)}}return i},Rt(e.options,"debugTable"))}function KX(){return e=>Lt(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,o=[],i=r.filter(d=>{var f;return(f=e.getColumn(d.id))==null?void 0:f.getCanSort()}),a={};i.forEach(d=>{const f=e.getColumn(d.id);f&&(a[d.id]={sortUndefined:f.columnDef.sortUndefined,invertSorting:f.columnDef.invertSorting,sortingFn:f.getSortingFn()})});const u=d=>{const f=d.map(m=>({...m}));return f.sort((m,g)=>{for(let w=0;w<i.length;w+=1){var v;const D=i[w],T=a[D.id],I=(v=D==null?void 0:D.desc)!=null?v:!1;let k=0;if(T.sortUndefined){const A=m.getValue(D.id),R=g.getValue(D.id),j=A===void 0,B=R===void 0;(j||B)&&(k=j&&B?0:j?T.sortUndefined:-T.sortUndefined)}if(k===0&&(k=T.sortingFn(m,g,D.id)),k!==0)return I&&(k*=-1),T.invertSorting&&(k*=-1),k}return m.index-g.index}),f.forEach(m=>{var g;o.push(m),(g=m.subRows)!=null&&g.length&&(m.subRows=u(m.subRows))}),f};return{rows:u(n.rows),flatRows:o,rowsById:n.rowsById}},Rt(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function QX(e){const t=[],n=r=>{var o;t.push(r),(o=r.subRows)!=null&&o.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function XX(e){return t=>Lt(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:o,pageIndex:i}=n;let{rows:a,flatRows:u,rowsById:d}=r;const f=o*i,m=f+o;a=a.slice(f,m);let g;t.options.paginateExpandedRows?g={rows:a,flatRows:u,rowsById:d}:g=QX({rows:a,flatRows:u,rowsById:d}),g.flatRows=[];const v=w=>{g.flatRows.push(w),w.subRows.length&&w.subRows.forEach(v)};return g.rows.forEach(v),g},Rt(t.options,"debugTable"))}function gI(e,t){return e?eee(e)?F.createElement(e,t):e:null}function eee(e){return tee(e)||typeof e=="function"||nee(e)}function tee(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function nee(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function ree(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=F.useState(()=>({current:UX(t)})),[r,o]=F.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:a=>{o(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const A3={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},oee=Object.keys(A3).join("|"),iee=new RegExp(oee,"g");function aee(e){return e.replace(iee,t=>A3[t])}const Ni={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function see(e,t,n){var r;if(n=n||{},n.threshold=(r=n.threshold)!=null?r:Ni.MATCHES,!n.accessors){const a=yI(e,t,n);return{rankedValue:e,rank:a,accessorIndex:-1,accessorThreshold:n.threshold,passed:a>=n.threshold}}const o=fee(e,n.accessors),i={rankedValue:e,rank:Ni.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let a=0;a<o.length;a++){const u=o[a];let d=yI(u.itemValue,t,n);const{minRanking:f,maxRanking:m,threshold:g=n.threshold}=u.attributes;d<f&&d>=Ni.MATCHES?d=f:d>m&&(d=m),d=Math.min(d,m),d>=g&&d>i.rank&&(i.rank=d,i.passed=!0,i.accessorIndex=a,i.accessorThreshold=g,i.rankedValue=u.itemValue)}return i}function yI(e,t,n){return e=vI(e,n),t=vI(t,n),t.length>e.length?Ni.NO_MATCH:e===t?Ni.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?Ni.EQUAL:e.startsWith(t)?Ni.STARTS_WITH:e.includes(` ${t}`)?Ni.WORD_STARTS_WITH:e.includes(t)?Ni.CONTAINS:t.length===1?Ni.NO_MATCH:lee(e).includes(t)?Ni.ACRONYM:uee(e,t))}function lee(e){let t="";return e.split(" ").forEach(r=>{r.split("-").forEach(i=>{t+=i.substr(0,1)})}),t}function uee(e,t){let n=0,r=0;function o(d,f,m){for(let g=m,v=f.length;g<v;g++)if(f[g]===d)return n+=1,g+1;return-1}function i(d){const f=1/d,m=n/t.length;return Ni.MATCHES+m*f}const a=o(t[0],e,0);if(a<0)return Ni.NO_MATCH;r=a;for(let d=1,f=t.length;d<f;d++){const m=t[d];if(r=o(m,e,r),!(r>-1))return Ni.NO_MATCH}const u=r-a;return i(u)}function cee(e,t){return e.rank===t.rank?0:e.rank>t.rank?-1:1}function vI(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=aee(e)),e}function dee(e,t){let n=t;typeof t=="object"&&(n=t.accessor);const r=n(e);return r==null?[]:Array.isArray(r)?r:[String(r)]}function fee(e,t){const n=[];for(let r=0,o=t.length;r<o;r++){const i=t[r],a=hee(i),u=dee(e,i);for(let d=0,f=u.length;d<f;d++)n.push({itemValue:u[d],attributes:a})}return n}const wI={maxRanking:1/0,minRanking:-1/0};function hee(e){return typeof e=="function"?wI:{...wI,...e}}const pee=({thino:e})=>{const t=F.useRef(null);F.useEffect(()=>(t.current&&C.setIcon(t.current,"pin"),()=>{t.current&&(t.current=null)}),[t]);const n=F.useCallback(async()=>{e.pinned?await je.unpinMemoById(e.id):await je.pinMemoById(e.id)},[e]);return y.jsx("span",{ref:t,className:Kn("pinned-status",e.pinned?"pinned":"not-pinned"),onClick:n})},mee=({thino:e})=>{const t=F.useRef(null);F.useEffect(()=>(t.current&&C.setIcon(t.current,e.thinoType==="JOURNAL"?"calendar":"check-square"),()=>{t.current&&(t.current=null)}),[t,e==null?void 0:e.thinoType]);const n=F.useCallback(async()=>{if(e.thinoType==="JOURNAL")return;const r=await je.updateMemo(e.id,e.content,e.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");r&&je.editMemo(r)},[e]);return y.jsx(y.Fragment,{children:e.thinoType!=="JOURNAL"?y.jsx("input",{className:Kn("thino-type-status","task-list-item-checkbox"),type:"checkbox",checked:e.thinoType!=="TASK-TODO","data-task":e.thinoType==="TASK-TODO"?"":e.thinoType==="TASK-DONE"?"x":e.thinoType.slice(5),onClick:n}):y.jsx("span",{ref:t,className:"thino-type-status"})})},gee=({id:e,path:t})=>{const n=F.useRef(null);F.useEffect(()=>(n.current&&C.setIcon(n.current,"link"),()=>{n.current&&(n.current=null)}),[]);const r=F.useCallback(()=>{!e||!t||je.openThinoByID(e)},[e,t]);return y.jsxs("span",{className:"source-thino",onClick:r,children:[y.jsx("span",{children:t}),y.jsx("span",{ref:n,className:"source-thino-icon"})]})},yee=({id:e,sourceType:t})=>{const n=F.useRef(null);F.useEffect(()=>{var o;return n.current&&C.setIcon(n.current,((o=km.find(i=>i.title===t))==null?void 0:o.icon)||"list"),()=>{n.current&&(n.current=null)}},[]);const r=F.useCallback(async()=>{e&&await je.openThinoByID(e)},[e]);return y.jsx("span",{ref:n,className:"source-type-icon",onClick:r})},bI=(e,t,n,r)=>{const o=see(e.getValue(t),n);return r({itemRank:o}),o.passed},SI=(e,t,n)=>{var o,i;let r=0;return e.columnFiltersMeta[n]&&(r=cee((o=e.columnFiltersMeta[n])==null?void 0:o.itemRank,(i=t.columnFiltersMeta[n])==null?void 0:i.itemRank)),r===0?sh.alphanumeric(e,t,n):r};function vee({thinos:e}){var m;se.useReducer(()=>({}),{})[1];const[t,n]=se.useState([]),[r,o]=se.useState(""),i=se.useMemo(()=>[{header:E("Basic Info"),footer:g=>g.column.id,columns:[{accessorKey:"createdAt",header:()=>y.jsx("span",{className:"create-at-header-cell",children:E("Created At")}),cell:g=>g.getValue(),footer:g=>g.column.id,enableColumnFilter:!1},{accessorFn:g=>g.content,id:"content",header:()=>y.jsx("span",{className:"thino-header-cell",children:E("Thino")}),cell:g=>y.jsx(Oi,{memo:g.row.original,type:"table"}),footer:g=>g.column.id,filterFn:"fuzzy",sortingFn:SI},{accessorFn:g=>g.thinoType,id:"thinoType",cell:g=>y.jsx(mee,{thino:g.row.original}),header:()=>y.jsx("span",{children:E("Thino Type")}),footer:g=>g.column.id},{accessorFn:g=>g.sourceType,id:"sourceType",cell:g=>y.jsx(yee,{id:g.row.original.id,sourceType:g.getValue()}),header:()=>y.jsx("span",{children:E("Source Type")}),footer:g=>g.column.id}]},{header:E("Additional Info"),footer:g=>g.column.id,columns:[{accessorKey:"pinned",header:()=>y.jsx("span",{children:E("Pinned Status")}),cell:g=>y.jsx(pee,{thino:g.row.original}),footer:g=>g.column.id,filterFn:"fuzzy",sortingFn:SI},{accessorKey:"rowStatus",header:()=>y.jsx("span",{children:E("Row status")}),cell:g=>y.jsx("span",{children:g.getValue()==="NORMAL"?"":g.getValue()}),footer:g=>g.column.id},{accessorKey:"path",header:()=>E("Path"),cell:g=>y.jsx(gee,{id:g.row.original.id,path:g.getValue()}),footer:g=>g.column.id}]}],[]),[a,u]=se.useState(()=>e),d=()=>u(g=>e);F.useEffect(()=>{d()},[e]);const f=ree({data:a,columns:i,filterFns:{fuzzy:bI},initialState:{pagination:{pageSize:20}},state:{columnFilters:t,globalFilter:r},onColumnFiltersChange:n,onGlobalFilterChange:o,globalFilterFn:bI,getCoreRowModel:VX(),getFilteredRowModel:$X(),getSortedRowModel:KX(),getPaginationRowModel:XX(),getFacetedRowModel:qX(),getFacetedUniqueValues:GX(),getFacetedMinMaxValues:JX(),debugTable:!1,debugHeaders:!1,debugColumns:!1});return se.useEffect(()=>{var g,v;((g=f.getState().columnFilters[0])==null?void 0:g.id)==="createdAt"&&((v=f.getState().sorting[0])==null?void 0:v.id)!=="createdAt"&&f.setSorting([{id:"createdAt",desc:!1}])},[(m=f.getState().columnFilters[0])==null?void 0:m.id]),y.jsxs("div",{className:"table-view",children:[y.jsx("div",{children:y.jsx(gv,{value:r||"",onChange:g=>o(String(g)),className:"table-search-bar",placeholder:E("Search all columns...")})}),y.jsxs("table",{className:"thino-table",children:[y.jsx("thead",{children:f.getHeaderGroups().map(g=>y.jsx("tr",{children:g.headers.map(v=>y.jsx("th",{colSpan:v.colSpan,children:v.isPlaceholder?null:y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:Kn(v.column.getCanSort()?"filter-header":"","table-header",v.column.id==="content"?"content-header":""),onClick:v.column.getToggleSortingHandler(),children:[gI(v.column.columnDef.header,v.getContext()),{asc:" 🔼",desc:" 🔽"}[v.column.getIsSorted()]??null]}),v.column.getCanFilter()?y.jsx(bee,{column:v.column,table:f}):null]})},v.id))},g.id))}),y.jsx("tbody",{children:f.getRowModel().rows.map(g=>y.jsx("tr",{className:Kn(g.getValue("pinned")?"pinned":""),children:g.getVisibleCells().map(v=>y.jsx("td",{children:gI(v.column.columnDef.cell,v.getContext())},v.id))},g.id))})]}),y.jsxs("div",{className:"table-nav-bar",children:[y.jsx("button",{className:"prev-start-btn",onClick:()=>f.setPageIndex(0),disabled:!f.getCanPreviousPage(),children:"<<"}),y.jsx("button",{className:"prev-btn",onClick:()=>f.previousPage(),disabled:!f.getCanPreviousPage(),children:"<"}),y.jsx("button",{className:"next-btn",onClick:()=>f.nextPage(),disabled:!f.getCanNextPage(),children:">"}),y.jsx("button",{className:"next-end-btn",onClick:()=>f.setPageIndex(f.getPageCount()-1),disabled:!f.getCanNextPage(),children:">>"}),y.jsxs("span",{className:"table-page-info",children:[y.jsx("div",{children:E("Page")}),y.jsxs("strong",{children:[f.getState().pagination.pageIndex+1," of ",f.getPageCount()]})]}),y.jsxs("span",{className:"table-page-jump",children:["| ",E("Go to page"),":",y.jsx("input",{type:"number",defaultValue:f.getState().pagination.pageIndex+1,onChange:g=>{const v=g.target.value?Number(g.target.value)-1:0;f.setPageIndex(v)},className:"jump-inputer"})]}),y.jsx("select",{value:f.getState().pagination.pageSize,onChange:g=>{f.setPageSize(Number(g.target.value))},children:[10,20,30,40,50].map(g=>y.jsxs("option",{value:g,children:[E("Show")," ",g," ",E("rows")]},g))})]})]})}const wee=e=>e==="sourceType"?["ALL"]:["ALL","ALL-TASK"];function bee({column:e,table:t}){var i,a,u,d,f,m,g,v,w;const n=(i=t.getPreFilteredRowModel().flatRows[0])==null?void 0:i.getValue(e.id),r=e.getFilterValue(),o=se.useMemo(()=>typeof n=="number"?[]:Array.from(e.getFacetedUniqueValues().keys()).sort(),[e.getFacetedUniqueValues()]);return typeof n=="number"?y.jsx("div",{children:y.jsxs("div",{className:"filter-input-group",children:[y.jsx(gv,{type:"number",min:Number(((a=e.getFacetedMinMaxValues())==null?void 0:a[0])??""),max:Number(((u=e.getFacetedMinMaxValues())==null?void 0:u[1])??""),value:(r==null?void 0:r[0])??"",onChange:D=>e.setFilterValue(T=>[D,T==null?void 0:T[1]]),placeholder:`Min ${(d=e.getFacetedMinMaxValues())!=null&&d[0]?`(${(f=e.getFacetedMinMaxValues())==null?void 0:f[0]})`:""}`,className:"filter-input-short"}),y.jsx(gv,{type:"number",min:Number(((m=e.getFacetedMinMaxValues())==null?void 0:m[0])??""),max:Number(((g=e.getFacetedMinMaxValues())==null?void 0:g[1])??""),value:(r==null?void 0:r[1])??"",onChange:D=>e.setFilterValue(T=>[T==null?void 0:T[0],D]),placeholder:`Max ${(v=e.getFacetedMinMaxValues())!=null&&v[1]?`(${(w=e.getFacetedMinMaxValues())==null?void 0:w[1]})`:""}`,className:"filter-input-short"})]})}):y.jsx(y.Fragment,{children:o.length>1?y.jsxs(y.Fragment,{children:[e.id!=="path"&&e.id!=="content"&&e.id!=="thinoType"&&e.id!=="sourceType"&&y.jsx("datalist",{id:e.id+"list",children:o.slice(0,5e3).map(D=>y.jsx("option",{value:D},D))}),e.id==="thinoType"||e.id==="sourceType"?y.jsx("select",{id:e.id,onChange:D=>e.setFilterValue(D.target.value==="ALL"?"":D.target.value==="ALL-TASK"?"TASK":D.target.value),children:[...wee(e.id),...o].map(D=>y.jsx("option",{value:D,children:E(D)||D},D))}):"",e.id!=="thinoType"&&e.id!=="sourceType"?y.jsx(gv,{type:"text",value:r??"",onChange:D=>e.setFilterValue(D),placeholder:`Search... (${e.getFacetedUniqueValues().size})`,className:"filter-input-long",list:e.id+"list"}):""]}):""})}function gv({value:e,onChange:t,debounce:n=500,...r}){const[o,i]=se.useState(e);return se.useEffect(()=>{i(e)},[e]),se.useEffect(()=>{const a=setTimeout(()=>{t(o)},n);return()=>clearTimeout(a)},[o]),y.jsx("input",{...r,value:o,onChange:a=>i(a.target.value)})}const See=e=>{const{locationState:{query:t},globalState:{memoListView:n,manifest:r},dailyNotesState:{app:o,settings:i}}=F.useContext(Ot),{thinos:a}=e,[u,d]=se.useState($m(a,"day")),f=se.useRef(null),m=F.useRef([]),g=F.useRef(0);F.useEffect(()=>{d($m(a,"day"))},[a]),F.useEffect(()=>{var A,R;const D=a.filter(j=>j.pinned),T=a.filter(j=>!j.pinned),I=m.current.filter(j=>j.pinned)[0],k=m.current.filter(j=>!j.pinned)[0];if(I&&I.id!==((A=D[0])==null?void 0:A.id)||k&&k.id!==((R=T[0])==null?void 0:R.id)){const j=f.current.closest(".memolist-wrapper");j.scrollTop=j.scrollHeight}else{const j=f.current.closest(".memolist-wrapper");j.scrollTop=j.scrollHeight-g.current,m.current=a}},[a]),F.useEffect(()=>{if(!f.current)return;const D=f.current.closest(".memolist-wrapper");D.scrollTop=D.scrollHeight},[t]),F.useEffect(()=>{if(n==="chat"&&f.current){const D=f.current.closest(".memolist-wrapper");D.scrollTop=D.scrollHeight,g.current=D.scrollHeight-D.scrollTop,m.current=a,D.onscrollend=()=>{g.current=D.scrollHeight-D.scrollTop}}},[f.current]);const v=F.useCallback(()=>{o.setting.open(),o.setting.openTabById(r.id||"obsidian-memos")},[o]),w=F.useMemo(()=>y.jsx(y.Fragment,{children:Object.keys(u).map((D,T)=>y.jsx(y.Fragment,{children:y.jsx(Dee,{thinos:u[D],dayMark:D,handleOpenSettings:v},D+T)}))}),[u]);return y.jsx("div",{ref:f,className:Kn("chat-view",`${i==null?void 0:i.chatViewStyle}-style`),children:w})},Dee=({thinos:e,dayMark:t,handleOpenSettings:n})=>{const{dailyNotesState:{settings:r,app:o}}=F.useContext(Ot),[i,a]=se.useState(!0),u=se.useRef(null),[d,f]=se.useState(r==null?void 0:r.MomentsIcon);F.useEffect(()=>{if(!(r!=null&&r.MomentsIcon)||!o)return;const w=o.vault.adapter.getResourcePath(C.normalizePath(r.MomentsIcon));w&&!(r!=null&&r.MomentsIcon.startsWith("http"))?f(w):f(r==null?void 0:r.MomentsIcon)},[r==null?void 0:r.MomentsIcon]);const m=w=>{if(C.Keymap.isModifier(w.nativeEvent,"Mod")){const D=C.moment(t,"YYYY-MM-DD");st.setFromAndToQuery(D.startOf("day").valueOf(),D.endOf("day").valueOf());return}a(!i),u.current.scrollIntoView(!0)},g=w=>{Lh(w)},v=F.useMemo(()=>e.map((w,D)=>y.jsxs("div",{className:"thino-bubble right",children:[y.jsx(Tee,{icon:d,handleOpenSettings:n}),y.jsx("div",{className:"wrap",children:y.jsx(Iee,{thino:w,handleClickTimeStamp:g},`${w.id}-${C.moment(w.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${D}`)})]},w.id+D)),[e,d]);return y.jsxs(y.Fragment,{children:[i&&v,y.jsx("div",{className:`thino-chat-day-mark day-mark ${i?"":"folded"}`,onClick:m,children:y.jsx("div",{className:"day-mark-bubble",children:(t==="PINNED"?t+" 📌":t)+(i?"":"...")})})]})},Tee=({icon:e,handleOpenSettings:t})=>y.jsx("div",{ref:n=>{if(e){n==null||n.empty();return}e||n&&C.setIcon(n,"Memos")},className:"icon-img",style:{backgroundImage:`url("${e}")`}}),Iee=({thino:e,handleClickTimeStamp:t})=>{const n=F.useCallback(async()=>{if(e.thinoType==="JOURNAL")return;const i=await je.updateMemo(e.id,e.content,e.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");i&&je.editMemo(i)},[e]),r=F.useMemo(()=>y.jsxs("div",{className:"content",children:[y.jsx("div",{className:"time-stamp","data-date":C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),"data-time":C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm:ss"),onClick:()=>{t(e)},children:C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm:ss")}),y.jsx(Oi,{memo:e})]}),[e.content]),o=F.useMemo(()=>y.jsxs("div",{className:"content task",children:[y.jsx("div",{className:"task-inputer",children:y.jsx("input",{className:Kn("thino-type-status","task-list-item-checkbox"),type:"checkbox",checked:e.thinoType!=="TASK-TODO","data-task":e.thinoType==="TASK-TODO"?"":e.thinoType==="TASK-DONE"?"x":e.thinoType.slice(5),onClick:n})}),y.jsx("div",{className:"time-stamp","data-date":C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),"data-time":C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm:ss"),onClick:()=>{t(e)},children:C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm:ss")}),y.jsx(Oi,{memo:e})]}),[e.content,e.thinoType]);return e.thinoType==="JOURNAL"?r:o};function xee(e){const t=e.filter(r=>r.pinned),n=e.filter(r=>!r.pinned);return[...t,...n]}function $m(e,t){const n={},r={day:"YYYY-MM-DD ddd",week:"YYYY-[W]WW",month:"YYYY-MM",quarter:"YYYY-[Q]Q",year:"YYYY"};for(const o of e){const i=C.moment(o.createdAt,"YYYY/MM/DD HH:mm:ss").format(r[t]);if(o.pinned){n.PINNED||(n.PINNED=[]),n.PINNED.push(o);continue}n[i]||(n[i]=[]),n[i].push(o)}return n}function Zy(e){const{tag:t,duration:n,type:r,text:o,filter:i}=e,a=tn.getQueryById(i);return!(!!(t||n&&n.from<n.to||r||o||a)||a)}const Eee=({tempMemos:e,query:t,HideDoneTasks:n})=>{const r=e.filter(g=>g.rowStatus!=="ARCHIVED"&&!(g.deletedAt!==""&&g.deletedAt)),{tag:o,duration:i,type:a,text:u,filter:d}=t,f=tn.getQueryById(d);return!!(o||i&&i.from<i.to||a||u||f)||f||n?r.filter(g=>{let v=!0;if(g.thinoType!==void 0&&n&&g.thinoType==="TASK-DONE"&&(v=!1),g.content.contains("comment:")&&(v=!1),f){const w=JSON.parse(f.querystring);Array.isArray(w)&&(v=jh(g,w))}if(o){const w=new Set;for(const D of Array.from(g.content.match(gr)||[])){const I=D.replace(gr,"$1").trim().split("/");let k="";for(const A of I)k+=A,w.add(k),k+="/"}for(const D of Array.from(g.content.match(jr)||[])){const I=D.replace(jr,"$1").trim().split("/");let k="";for(const A of I)k+=A,w.add(k),k+="/"}for(const D of Array.from(g.content.match(so)||[])){const I=D.replace(so,"$2").trim().split("/");let k="";for(const A of I)k+=A,w.add(k),k+="/"}w.has(o)||(v=!1)}return i&&i.from<i.to&&(ut.getTimeStampByDate(g.createdAt)<i.from||ut.getTimeStampByDate(g.createdAt)>i.to)&&(v=!1),a&&(a==="NOT_TAGGED"&&(g.content.match(gr)!==null||g.content.match(so)!==null||g.content.match(jr)!==null)||a==="LINKED"&&g.content.match(Od)===null||a==="IMAGED"&&g.content.match(jd)===null||a==="CONNECTED"&&g.content.match(hc)===null)&&(v=!1),u&&!g.content.toLowerCase().includes(u.toLowerCase())&&(v=!1),v}):r.filter(g=>!g.content.contains("comment:"))},Cee=({updateThinos:e})=>{var re;const{locationState:{query:t},memoState:{memos:n},globalState:{memoListView:r},dailyNotesState:{app:o,settings:i,verifyState:a,plugin:u}}=F.useContext(Ot),[d,f]=F.useState(!1),[m,g]=F.useState(!1),[v,w,D]=oi([]),[T,I]=F.useState([]),[k,A]=F.useState({}),[R,j]=F.useState((re=window.app||o)==null?void 0:re.loadLocalStorage("thinoListView")),[B,L]=F.useState((o==null?void 0:o.loadLocalStorage("showDayMark"))||!1),[Z,U]=F.useState((o==null?void 0:o.loadLocalStorage("dayMarkRange"))||"day"),[z,$,te]=oi([]),Q=F.useRef(0),ue=F.useRef(!1),ee=F.useRef(null),le=F.useRef(null),W=F.useRef(null),de=F.useRef(null),oe=F.useRef(!1);F.useEffect(()=>{j(r),o&&o.saveLocalStorage("thinoListView",r),w(z.slice(0,v.length>20?Math.min(v.length,40):40))},[r]),F.useEffect(()=>()=>{le.current&&(le.current=null),W.current&&(W.current=null),de.current&&(de.current=null)},[]),F.useLayoutEffect(()=>{if((n.length!==0||!o)&&oe.current===!0)return;const pe=Mee(o);!pe||pe.length===0||($(pe),I(pe),L((o==null?void 0:o.loadLocalStorage("showDayMark"))||!1),o!=null&&o.loadLocalStorage("showDayMark")&&A($m(pe,(o==null?void 0:o.loadLocalStorage("dayMarkRange"))||"day")))},[o]),F.useEffect(()=>{if(n.length===0&&!je.initialized)return;f(!1);const pe=xee(n),Ie=Eee({tempMemos:pe,query:t,HideDoneTasks:(i==null?void 0:i.HideDoneTasks)||!1});return oe.current=!0,e&&e(Ie),$(Ie),()=>{oe.current=!1}},[n,t,i==null?void 0:i.HideDoneTasks]),F.useEffect(()=>{w(z.slice(0,v.length>20?Math.min(v.length,40):40))},[z]),F.useEffect(()=>{var pe;v.length<40&&((pe=W.current)==null||pe.click())},[z]),F.useEffect(()=>{(Zy(t)&&v.length<z.length||v.length<z.length&&!Zy(t))&&g(!1),(Zy(t)&&v.length===n.length&&n.length>0||!Zy(t)&&v.length===z.length&&z.length>0)&&g(!0),kee(v||[],o),I(v),o==null||o.saveLocalStorage("showDayMark",i==null?void 0:i.showDayMark),o==null||o.saveLocalStorage("dayMarkRange",i==null?void 0:i.dayMarkRange),L((i==null?void 0:i.showDayMark)||!1),U((i==null?void 0:i.dayMarkRange)||"day"),i!=null&&i.showDayMark&&A($m(v,i==null?void 0:i.dayMarkRange))},[v,i==null?void 0:i.showDayMark,i==null?void 0:i.dayMarkRange]),F.useEffect(()=>{if(!le.current)return;const pe=async()=>{ue.current||(Q.current++,await he(),Q.current>=1&&(ue.current=!0,setTimeout(()=>{Q.current=0,ue.current=!1},3e3)))};v.length<40&&pe();const Ie=new IntersectionObserver(([Oe])=>{if(Oe.isIntersecting){if(m)return;pe()}else Q.current=0,ue.current=!1});return le!=null&&le.current&&Ie.observe(le.current),()=>{le!=null&&le.current&&Ie.unobserve(le.current)}},[d,m,le.current]),F.useEffect(()=>{var pe;(pe=de.current)==null||pe.scrollTo({top:0})},[t]);const he=async()=>{try{if(te.current.length>D.current.length){f(!0);const pe=Math.min(D.current.length+40,te.current.length)-D.current.length,Ie=te.current.slice(D.current.length,D.current.length+pe);w(Oe=>[...Oe,...Ie]),f(!1),g(Ie.length<40)}}catch(pe){console.error(pe),new C.Notice(pe.response.data.message)}},K=F.useMemo(()=>y.jsx("div",{ref:le,className:Kn("status-text-container",R==="calendar"||R==="table"?"hidden":""),children:y.jsx("p",{className:"status-text",children:d?E("Fetching data..."):m?z.length===0?E("Noooop!"):E("All Data is Loaded 🎉"):y.jsx(y.Fragment,{children:y.jsx("span",{ref:W,className:"cursor-pointer hover:text-green-600",onClick:he,children:E("fetch more")})})})}),[R,he,z,d,m,le]);return y.jsxs("div",{className:`memolist-wrapper ${m?"completed":""}`,ref:de,children:[R==="chat"&&K,y.jsxs("div",{ref:ee,className:"memolist-container",children:[R==="chat"&&y.jsx(See,{thinos:T}),R==="calendar"&&y.jsx(cX,{thinos:z}),R==="table"&&y.jsx(vee,{thinos:z}),R==="moments"&&y.jsx(Aee,{thinos:T}),R==="list"&&y.jsx(Ov,{breakpointCols:1,className:`${R}-view masonry-memolist`,columnClassName:"masonry-memolist-grid_column",children:B?y.jsx(y.Fragment,{children:Object.keys(k).sort((pe,Ie)=>Ie-pe).map(pe=>y.jsx(e1,{type:"list",thinos:k[pe],dayMark:pe,dayMarkRange:Z},pe))}):T.map((pe,Ie)=>y.jsx(Oi,{memo:pe},`${pe.id}-${C.moment(pe.updatedAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${Ie}`))}),R==="waterfall"&&y.jsx(y.Fragment,{children:B&&Object.keys(k).length>0?Object.keys(k).map(pe=>y.jsx(e1,{type:"waterfall",thinos:k[pe],dayMark:pe,dayMarkRange:Z},pe)):y.jsx(Ov,{breakpointCols:3,className:`${R}-view masonry-memolist`,columnClassName:"masonry-memolist-grid_column",children:T.map((pe,Ie)=>y.jsx(Oi,{memo:pe},`${pe.id}-${C.moment(pe.updatedAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${Ie}`))})})]}),R!=="chat"&&K]})};function F3(e){return`memosListCache:${e}`}function Mee(e){var t;try{const n=F3(e==null?void 0:e.appId),r=Wr.get([n])[n];return r?((t=JSON.parse(r))==null?void 0:t.memos)||[]:[]}catch(n){return console.error(n),[]}}function kee(e,t){try{if(!e)return;const n=e==null?void 0:e.slice(0,100),r=F3(t==null?void 0:t.appId);Wr.set({[r]:JSON.stringify({memos:n})})}catch(n){console.error(n)}}const Nee=({userIcon:e})=>y.jsx("div",{className:"moments-view-user-icon",ref:t=>{if(e){t==null||t.empty();return}e||t&&C.setIcon(t,"Memos")},style:{backgroundImage:`url("${e}")`}}),w1="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbG5zOnN2Z2pzPSJodHRwOi8vc3ZnanMuZGV2L3N2Z2pzIiB3aWR0aD0iMTQ0MCIgaGVpZ2h0PSI1NjAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHZpZXdCb3g9IjAgMCAxNDQwIDU2MCI+PGcgbWFzaz0idXJsKCZxdW90OyNTdmdqc01hc2sxMDgwJnF1b3Q7KSIgZmlsbD0ibm9uZSI+PHJlY3Qgd2lkdGg9IjE0NDAiIGhlaWdodD0iNTYwIiB4PSIwIiB5PSIwIiBmaWxsPSIjMGUyYTQ3Ij48L3JlY3Q+PHVzZSB4bGluazpocmVmPSIjU3ZnanNTeW1ib2wxMDg3IiB4PSIwIiB5PSIwIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1N5bWJvbDEwODciIHg9IjcyMCIgeT0iMCI+PC91c2U+PC9nPjxkZWZzPjxtYXNrIGlkPSJTdmdqc01hc2sxMDgwIj48cmVjdCB3aWR0aD0iMTQ0MCIgaGVpZ2h0PSI1NjAiIGZpbGw9IiNmZmZmZmYiPjwvcmVjdD48L21hc2s+PHBhdGggZD0iTS0xIDAgYTEgMSAwIDEgMCAyIDAgYTEgMSAwIDEgMCAtMiAweiIgaWQ9IlN2Z2pzUGF0aDEwODIiPjwvcGF0aD48cGF0aCBkPSJNLTMgMCBhMyAzIDAgMSAwIDYgMCBhMyAzIDAgMSAwIC02IDB6IiBpZD0iU3ZnanNQYXRoMTA4NiI+PC9wYXRoPjxwYXRoIGQ9Ik0tNSAwIGE1IDUgMCAxIDAgMTAgMCBhNSA1IDAgMSAwIC0xMCAweiIgaWQ9IlN2Z2pzUGF0aDEwODMiPjwvcGF0aD48cGF0aCBkPSJNMiAtMiBMLTIgMnoiIGlkPSJTdmdqc1BhdGgxMDg0Ij48L3BhdGg+PHBhdGggZD0iTTYgLTYgTC02IDZ6IiBpZD0iU3ZnanNQYXRoMTA4MSI+PC9wYXRoPjxwYXRoIGQ9Ik0zMCAtMzAgTC0zMCAzMHoiIGlkPSJTdmdqc1BhdGgxMDg1Ij48L3BhdGg+PC9kZWZzPjxzeW1ib2wgaWQ9IlN2Z2pzU3ltYm9sMTA4NyI+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzAiIHk9IjMwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgyIiB4PSIzMCIgeT0iOTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgyIiB4PSIzMCIgeT0iMTUwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIzMCIgeT0iMjEwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIzMCIgeT0iMjcwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIzMCIgeT0iMzMwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIzMCIgeT0iMzkwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIzMCIgeT0iNDUwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iMzAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjMwIiB5PSI1NzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODIiIHg9IjkwIiB5PSIzMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjkwIiB5PSI5MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjkwIiB5PSIxNTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjkwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgyIiB4PSI5MCIgeT0iMjcwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI5MCIgeT0iMzMwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iOTAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iOTAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjkwIiB5PSI1MTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI5MCIgeT0iNTcwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIxNTAiIHk9IjMwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIxNTAiIHk9IjkwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIxNTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMTUwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjE1MCIgeT0iMjcwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMTUwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjE1MCIgeT0iMzkwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMTUwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIxNTAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMTUwIiB5PSI1NzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODUiIHg9IjIxMCIgeT0iMzAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIiBzdHJva2Utd2lkdGg9IjMiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjIxMCIgeT0iOTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIyMTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODUiIHg9IjIxMCIgeT0iMjEwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgyIiB4PSIyMTAiIHk9IjI3MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iMjEwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIyMTAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjIxMCIgeT0iNDUwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMjEwIiB5PSI1MTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSIyMTAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMjcwIiB5PSIzMCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMjcwIiB5PSI5MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iMjcwIiB5PSIxNTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSIyNzAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMjcwIiB5PSIyNzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjI3MCIgeT0iMzMwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMjcwIiB5PSIzOTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSIyNzAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiIHN0cm9rZS13aWR0aD0iMyI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMjcwIiB5PSI1MTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIyNzAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzMwIiB5PSIzMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODYiIHg9IjMzMCIgeT0iOTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjMzMCIgeT0iMTUwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzMwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIzMzAiIHk9IjI3MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzMwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODUiIHg9IjMzMCIgeT0iMzkwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIiBzdHJva2Utd2lkdGg9IjMiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjMzMCIgeT0iNDUwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMzMwIiB5PSI1MTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODUiIHg9IjMzMCIgeT0iNTcwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIiBzdHJva2Utd2lkdGg9IjMiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODYiIHg9IjM5MCIgeT0iMzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjM5MCIgeT0iOTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIzOTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iMzkwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjM5MCIgeT0iMjcwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIzOTAiIHk9IjMzMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODUiIHg9IjM5MCIgeT0iMzkwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSIzOTAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIzOTAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjM5MCIgeT0iNTcwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iNDUwIiB5PSIzMCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NSIgeD0iNDUwIiB5PSI5MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI0NTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iNDUwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjQ1MCIgeT0iMjcwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NSIgeD0iNDUwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiIHN0cm9rZS13aWR0aD0iMyI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iNDUwIiB5PSIzOTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjQ1MCIgeT0iNDUwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSI0NTAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiIHN0cm9rZS13aWR0aD0iMyI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iNDUwIiB5PSI1NzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjUxMCIgeT0iMzAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI1MTAiIHk9IjkwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI1MTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjUxMCIgeT0iMjEwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI1MTAiIHk9IjI3MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNTEwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI1MTAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjUxMCIgeT0iNDUwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNTEwIiB5PSI1MTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjUxMCIgeT0iNTcwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI1NzAiIHk9IjMwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNTcwIiB5PSI5MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjU3MCIgeT0iMTUwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSI1NzAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iNTcwIiB5PSIyNzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjU3MCIgeT0iMzMwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI1NzAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iNTcwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODYiIHg9IjU3MCIgeT0iNTEwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iNTcwIiB5PSI1NzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjYzMCIgeT0iMzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjYzMCIgeT0iOTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjYzMCIgeT0iMTUwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI2MzAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iNjMwIiB5PSIyNzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODYiIHg9IjYzMCIgeT0iMzMwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI2MzAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDE5NywgOTAsIDk5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iNjMwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjYzMCIgeT0iNTEwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSI2MzAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiIHN0cm9rZS13aWR0aD0iMyI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNjkwIiB5PSIzMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjY5MCIgeT0iOTAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjY5MCIgeT0iMTUwIiBzdHJva2U9InJnYmEoMTk3LCA5MCwgOTksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSI2OTAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjY5MCIgeT0iMjcwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iNjkwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSgxOTcsIDkwLCA5OSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjY5MCIgeT0iMzkwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iNjkwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSg0NywgMTE0LCAxMzEsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI2OTAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDQ3LCAxMTQsIDEzMSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODUiIHg9IjY5MCIgeT0iNTcwIiBzdHJva2U9InJnYmEoNDcsIDExNCwgMTMxLCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48L3N5bWJvbD48L3N2Zz4=",yv="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbG5zOnN2Z2pzPSJodHRwOi8vc3ZnanMuZGV2L3N2Z2pzIiB3aWR0aD0iMTQ0MCIgaGVpZ2h0PSI1NjAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHZpZXdCb3g9IjAgMCAxNDQwIDU2MCI+PGcgbWFzaz0idXJsKCZxdW90OyNTdmdqc01hc2sxMDgwJnF1b3Q7KSIgZmlsbD0ibm9uZSI+PHJlY3Qgd2lkdGg9IjE0NDAiIGhlaWdodD0iNTYwIiB4PSIwIiB5PSIwIiBmaWxsPSJyZ2JhKDIzMSwgMjM4LCAyNDUsIDEpIj48L3JlY3Q+PHVzZSB4bGluazpocmVmPSIjU3ZnanNTeW1ib2wxMDg3IiB4PSIwIiB5PSIwIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1N5bWJvbDEwODciIHg9IjcyMCIgeT0iMCI+PC91c2U+PC9nPjxkZWZzPjxtYXNrIGlkPSJTdmdqc01hc2sxMDgwIj48cmVjdCB3aWR0aD0iMTQ0MCIgaGVpZ2h0PSI1NjAiIGZpbGw9IiNmZmZmZmYiPjwvcmVjdD48L21hc2s+PHBhdGggZD0iTS0xIDAgYTEgMSAwIDEgMCAyIDAgYTEgMSAwIDEgMCAtMiAweiIgaWQ9IlN2Z2pzUGF0aDEwODUiPjwvcGF0aD48cGF0aCBkPSJNLTMgMCBhMyAzIDAgMSAwIDYgMCBhMyAzIDAgMSAwIC02IDB6IiBpZD0iU3ZnanNQYXRoMTA4MyI+PC9wYXRoPjxwYXRoIGQ9Ik0tNSAwIGE1IDUgMCAxIDAgMTAgMCBhNSA1IDAgMSAwIC0xMCAweiIgaWQ9IlN2Z2pzUGF0aDEwODYiPjwvcGF0aD48cGF0aCBkPSJNMiAtMiBMLTIgMnoiIGlkPSJTdmdqc1BhdGgxMDg0Ij48L3BhdGg+PHBhdGggZD0iTTYgLTYgTC02IDZ6IiBpZD0iU3ZnanNQYXRoMTA4MSI+PC9wYXRoPjxwYXRoIGQ9Ik0zMCAtMzAgTC0zMCAzMHoiIGlkPSJTdmdqc1BhdGgxMDgyIj48L3BhdGg+PC9kZWZzPjxzeW1ib2wgaWQ9IlN2Z2pzU3ltYm9sMTA4NyI+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzAiIHk9IjMwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODIiIHg9IjMwIiB5PSI5MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIiBzdHJva2Utd2lkdGg9IjMiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjMwIiB5PSIxNTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgyIiB4PSIzMCIgeT0iMjcwIiBzdHJva2U9InJnYmEoMjA4LCAyMTcsIDIwOSwgMSkiIHN0cm9rZS13aWR0aD0iMyI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMzAiIHk9IjMzMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSIzMCIgeT0iMzkwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODUiIHg9IjMwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iMzAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSIzMCIgeT0iNTcwIiBzdHJva2U9InJnYmEoMjA4LCAyMTcsIDIwOSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODYiIHg9IjkwIiB5PSIzMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI5MCIgeT0iOTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iOTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI5MCIgeT0iMjEwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjkwIiB5PSIyNzAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iOTAiIHk9IjMzMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSI5MCIgeT0iMzkwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODYiIHg9IjkwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iOTAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI5MCIgeT0iNTcwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjE1MCIgeT0iMzAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iMTUwIiB5PSI5MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIxNTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIxNTAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSIxNTAiIHk9IjI3MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSIxNTAiIHk9IjMzMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSIxNTAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgyIiB4PSIxNTAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIiBzdHJva2Utd2lkdGg9IjMiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODMiIHg9IjE1MCIgeT0iNTEwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjE1MCIgeT0iNTcwIiBzdHJva2U9InJnYmEoMjA4LCAyMTcsIDIwOSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjIxMCIgeT0iMzAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iMjEwIiB5PSI5MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgyIiB4PSIyMTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIiBzdHJva2Utd2lkdGg9IjMiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjIxMCIgeT0iMjEwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODIiIHg9IjIxMCIgeT0iMjcwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiIHN0cm9rZS13aWR0aD0iMyI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NSIgeD0iMjEwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iMjEwIiB5PSIzOTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIyMTAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSIyMTAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSIyMTAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSIyNzAiIHk9IjMwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjI3MCIgeT0iOTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iMjcwIiB5PSIxNTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSIyNzAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIyNzAiIHk9IjI3MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSIyNzAiIHk9IjMzMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSIyNzAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSIyNzAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIyNzAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg0IiB4PSIyNzAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSIzMzAiIHk9IjMwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjMzMCIgeT0iOTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMzMwIiB5PSIxNTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iMzMwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iMzMwIiB5PSIyNzAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iMzMwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iMzMwIiB5PSIzOTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MyIgeD0iMzMwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NSIgeD0iMzMwIiB5PSI1MTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzMwIiB5PSI1NzAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NSIgeD0iMzkwIiB5PSIzMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSIzOTAiIHk9IjkwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjM5MCIgeT0iMTUwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODEiIHg9IjM5MCIgeT0iMjEwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODYiIHg9IjM5MCIgeT0iMjcwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODUiIHg9IjM5MCIgeT0iMzMwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODIiIHg9IjM5MCIgeT0iMzkwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiIHN0cm9rZS13aWR0aD0iMyI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzkwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iMzkwIiB5PSI1MTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iMzkwIiB5PSI1NzAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNDUwIiB5PSIzMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgyIiB4PSI0NTAiIHk9IjkwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiIHN0cm9rZS13aWR0aD0iMyI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iNDUwIiB5PSIxNTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iNDUwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI0NTAiIHk9IjI3MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI0NTAiIHk9IjMzMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI0NTAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI0NTAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI0NTAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI0NTAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI1MTAiIHk9IjMwIiBzdHJva2U9InJnYmEoMjA4LCAyMTcsIDIwOSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODQiIHg9IjUxMCIgeT0iOTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iNTEwIiB5PSIxNTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iNTEwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iNTEwIiB5PSIyNzAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNTEwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iNTEwIiB5PSIzOTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNTEwIiB5PSI0NTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iNTEwIiB5PSI1MTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI1MTAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI1NzAiIHk9IjMwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODYiIHg9IjU3MCIgeT0iOTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNTcwIiB5PSIxNTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NiIgeD0iNTcwIiB5PSIyMTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MSIgeD0iNTcwIiB5PSIyNzAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4NCIgeD0iNTcwIiB5PSIzMzAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSI+PC91c2U+PHVzZSB4bGluazpocmVmPSIjU3ZnanNQYXRoMTA4MiIgeD0iNTcwIiB5PSIzOTAiIHN0cm9rZT0icmdiYSgyMDgsIDIxNywgMjA5LCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI1NzAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI1NzAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSI1NzAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2MzAiIHk9IjMwIiBzdHJva2U9InJnYmEoMTYsIDUwLCA4MywgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODIiIHg9IjYzMCIgeT0iOTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2MzAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2MzAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI2MzAiIHk9IjI3MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI2MzAiIHk9IjMzMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2MzAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2MzAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2MzAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2MzAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSI2OTAiIHk9IjMwIiBzdHJva2U9InJnYmEoMjA4LCAyMTcsIDIwOSwgMSkiPjwvdXNlPjx1c2UgeGxpbms6aHJlZj0iI1N2Z2pzUGF0aDEwODIiIHg9IjY5MCIgeT0iOTAiIHN0cm9rZT0icmdiYSgxNiwgNTAsIDgzLCAxKSIgc3Ryb2tlLXdpZHRoPSIzIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSI2OTAiIHk9IjE1MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSI2OTAiIHk9IjIxMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2OTAiIHk9IjI3MCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSI2OTAiIHk9IjMzMCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgzIiB4PSI2OTAiIHk9IjM5MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg1IiB4PSI2OTAiIHk9IjQ1MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDgxIiB4PSI2OTAiIHk9IjUxMCIgc3Ryb2tlPSJyZ2JhKDIwOCwgMjE3LCAyMDksIDEpIj48L3VzZT48dXNlIHhsaW5rOmhyZWY9IiNTdmdqc1BhdGgxMDg2IiB4PSI2OTAiIHk9IjU3MCIgc3Ryb2tlPSJyZ2JhKDE2LCA1MCwgODMsIDEpIj48L3VzZT48L3N5bWJvbD48L3N2Zz4=",Aee=e=>{const{globalState:{memoListView:t,markMemoId:n,manifest:r,editMemoId:o},dailyNotesState:{app:i,settings:a}}=F.useContext(Ot),{thinos:u}=e,d=se.useRef(null),f=se.useRef(null),[m,g]=se.useState(!1),[v,w]=F.useState({}),[D,T]=F.useState((i==null?void 0:i.loadLocalStorage("dayMarkRange"))||"day"),[I,k]=se.useState(a==null?void 0:a.MomentsIcon);F.useEffect(()=>{if(!(a!=null&&a.MomentsIcon)||!i)return;const R=i.vault.adapter.getResourcePath(C.normalizePath(a.MomentsIcon));R&&!(a!=null&&a.MomentsIcon.startsWith("http"))?k(R):k(a==null?void 0:a.MomentsIcon)},[a==null?void 0:a.MomentsIcon,i]),F.useEffect(()=>{a!=null&&a.showDayMark&&w($m(u,(i==null?void 0:i.loadLocalStorage("dayMarkRange"))||"day"))},[u]),F.useEffect(()=>{d.current.closest(".workspace-window")&&g(!0)},[d.current]),F.useEffect(()=>{n&&g(!0)},[n]),F.useEffect(()=>{o?(g(!0),setTimeout(()=>{i.workspace.trigger("focus-on-textarea")},200)):g(!1)},[o]),F.useEffect(()=>{f.current&&(!m&&C.setIcon(f.current,"camera"),m&&C.setIcon(f.current,"camera-off"))},[f.current,m]);const A=F.useCallback(()=>{i.setting.open(),i.setting.openTabById(r.id||"obsidian-memos")},[i]);return y.jsxs("div",{ref:d,className:Kn("moments-view",m?"show-editor":""),children:[y.jsxs("div",{className:"moments-view-background-wrapper",children:[y.jsx(Fee,{}),y.jsx("div",{ref:f,className:"moments-show-editor-btn",onClick:()=>{o&&m||((m||o)&&g(!m),!m&&!o&&new UC(i).open())}}),y.jsxs("div",{className:"moments-view-background-overlay",children:[y.jsxs("div",{className:"moments-view-user-info",children:[y.jsx("div",{className:"moments-view-user-name",children:a==null?void 0:a.UserName}),y.jsx(Nee,{userIcon:I})]}),y.jsx("div",{className:"moments-view-user-idea",children:a.MomentsQuote||" "})]})]}),a!=null&&a.showDayMark?v&&Object.keys(v).length>0&&Object.keys(v).map((R,j)=>y.jsx(e1,{type:"list",thinos:v[R],dayMark:R,dayMarkRange:D,thinoWrapper:B=>y.jsx(DI,{thino:B.thino,handleOpenSettings:A},B.thino.createdAt+j)},R)):u.map((R,j)=>y.jsx(DI,{thino:R,handleOpenSettings:A},R.createdAt+j))]})},Fee=()=>{const{dailyNotesState:{app:e,view:t,settings:n}}=F.useContext(Ot),[r,o]=F.useState((n==null?void 0:n.MomentsBackgroundImage)||yv);return F.useEffect(()=>{if(!(n!=null&&n.MomentsBackgroundImage)||!e){o(document.body.hasClass("theme-dark")?w1:yv);return}const i=e.vault.adapter.getResourcePath(C.normalizePath(n.MomentsBackgroundImage));i&&!(n!=null&&n.MomentsBackgroundImage.startsWith("http"))?o(i):o(n==null?void 0:n.MomentsBackgroundImage)},[n==null?void 0:n.MomentsBackgroundImage,e]),F.useEffect(()=>{t&&t.registerEvent(t.app.workspace.on("css-change",()=>{o(document.body.hasClass("theme-dark")&&!(n!=null&&n.MomentsBackgroundImage)?w1:!document.body.hasClass("theme-dark")&&!(n!=null&&n.MomentsBackgroundImage)?yv:n==null?void 0:n.MomentsBackgroundImage)}))},[t]),y.jsx("div",{className:"moments-view-background",style:{backgroundImage:`url("${r}")`}})},Pee=e=>{const{icon:t}=e,n=F.useCallback(()=>{app.setting.open(),app.setting.openTabById(manifest.id||"obsidian-memos")},[]);return y.jsx("div",{className:"thino-moment-icon",ref:r=>{if(t){r==null||r.empty();return}t||r&&C.setIcon(r,"Memos")},style:{backgroundImage:`url("${t}")`},onClick:n})},DI=e=>{const{dailyNotesState:{settings:t,app:n}}=F.useContext(Ot),r=F.useRef(null),o=F.useRef(null),{thino:i}=e,[a,u]=F.useState("");return F.useEffect(()=>{if(!(t!=null&&t.MomentsIcon)||!n)return;const d=n.vault.adapter.getResourcePath(C.normalizePath(t.MomentsIcon));d&&!(t!=null&&t.MomentsIcon.startsWith("http"))?u(d):u(t==null?void 0:t.MomentsIcon)},[t==null?void 0:t.MomentsIcon,n]),F.useEffect(()=>{r.current&&C.setIcon(r.current,"more-horizontal")},[r.current]),y.jsxs("div",{className:"thino-moment-wrapper",children:[y.jsx(Pee,{icon:a}),y.jsxs("div",{ref:o,className:"thino-moment-container",children:[y.jsx("div",{className:"thino-moment-user-name",children:t==null?void 0:t.UserName}),y.jsx("div",{className:"thino-moment-user-content",children:y.jsx(Oi,{memo:i})})]})]})},Oee='<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" width="1146.31828" height="801.00361" viewBox="0 0 1146.31828 801.00361" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M1050.69918,514.5082a456.24913,456.24913,0,0,1-37.38013-261.87c3.6001-23.1,9.44006-46.85,24.43018-64.79,14.38989-17.23,39.34985-27.37,60.0299-19.29-13.56994-29.61-47.76-46.5-80.59-47.33-34.09-.86-66.92,12.5-97.25,28.1-30.33,15.6-59.65,33.81006-92.21,43.99-53.5,16.72-111.91,10.34-165.5-6.09-53.58-16.44-103.62-42.47-154.62-65.71-51.01-23.24-104.17-44.03-160.01-48.91-55.84-4.87-115.25,7.89-157.24,45.01s-61.87,101.28-38.27,152.11c14.25,30.7,42.22,54.32,52.04,86.7,12.32,40.65-7.08,83.96-30.41,119.45-23.34,35.49-51.8,69.58-60.47,111.16-8.01,38.38,2.72,78.02,24.05,111.38a197.34468,197.34468,0,0,0,35.74,41.61c43.09,37.91,98.77,58.15,154.17,73.13,200.27,54.17,416.13,49.29,613.75-13.88,34.99-11.18,69.95-24.43,99.32-46.48,19.16-14.38,35.83-33.02,46.39-54.35a114.10574,114.10574,0,0,0,11.13-36.18005C1104.43917,610.17819,1072.9692,562.05819,1050.69918,514.5082Z" transform="translate(-26.84086 -49.49819)" fill="#6c63ff"/><g opacity="0.17"><path d="M890.75032,246.45145c9.64171-4.20394-9.91163-6.65119-32.09585-7.45582s-49.02061-.76011-63.19756-3.04875c-13.71114-2.21343-12.7009-6.14907-13.85427-9.71489s-6.42446-7.222-27.81928-8.0147c-26.6607-.98774-70.62581,2.81434-90.75171.53173-18.78121-2.13011-7.61723-8.81182-35.00344-9.06755-15.63837-.146-35.7849,2.05682-53.18577,2.58844-16.33647.49909-28.42216-.53441-36.90357-1.924s-14.38875-3.15126-23.93413-4.37864c-25.06068-3.2224-74.09133-2.13925-117.853,1.99071s-81.27344,10.89816-102.42889,17.60175-27.00029,13.30376-22.07239,18.90071c3.14674,3.574,11.19915,6.91585,30.73235,8.352,36.53555,2.68621,101.58387-1.9375,139.33713.50645,21.0415,1.36213,30.3764,4.73924,48.83812,6.58716,19.83407,1.98528,48.86935,2.09051,77.39656,2.04341,59.39721-.09807,120.3137-.70829,182.42994-1.82747,25.94486-.46745,53.13-1.0752,80.73761-3.30289s55.76623-6.52591,61.59076-10.5553" transform="translate(-26.84086 -49.49819)" fill="#fff"/></g><path d="M1099.25911,172.04818c-.46-1.18-.96-2.35-1.48-3.49.84.33,1.68006.69,2.51,1.08Z" transform="translate(-26.84086 -49.49819)" fill="#6c63ff"/><path d="M648.74482,314.5843c-7.66935-12.68445-16.75721-26.22767-30.98955-30.36953-16.482-4.7965-33.41319,4.73193-47.77473,14.13453a1392.15692,1392.15692,0,0,0-123.89338,91.28311l.04331.49239q46.22556-3.18781,92.451-6.37555c22.26532-1.53546,45.29557-3.2827,64.97195-13.8156,7.46652-3.99683,14.74475-9.33579,23.20555-9.70782,10.51175-.46217,19.67733,6.87923,26.8802,14.54931,42.60732,45.371,54.937,114.7541,102.73817,154.61592A1516.99458,1516.99458,0,0,0,648.74482,314.5843Z" transform="translate(-26.84086 -49.49819)" fill="#f2f2f2"/><path d="M910.64576,699.4127c-4.71168-5.94958-6.63691-7.343-11.28457-13.34761Q842.5968,612.64872,792.65327,534.27272q-33.92353-53.23005-64.48275-108.50439-14.54863-26.27808-28.29961-52.96872-10.67043-20.6952-20.8646-41.63793c-1.94357-3.98781-3.83209-7.99393-5.71122-12.00922-4.42788-9.44232-8.7734-18.93047-13.43942-28.24449-5.31687-10.61571-11.78905-21.74485-21.55259-28.877a29.4049,29.4049,0,0,0-15.31855-5.89457c-7.948-.51337-15.28185,2.76854-22.17569,6.35294-50.43858,26.301-97.65921,59.27589-140.36959,96.79771A730.77781,730.77781,0,0,0,346.39748,485.87843c-1.008,1.43927-3.39163.06418-2.37419-1.38422q6.00935-8.49818,12.25681-16.81288A734.81742,734.81742,0,0,1,543.87972,292.6956q18.24825-11.82579,37.18269-22.54245c6.36206-3.60275,12.75188-7.15967,19.25136-10.49653,6.37147-3.27274,13.13684-6.21547,20.41563-6.32547,24.77011-.385,37.5954,27.667,46.40506,46.54248q4.15283,8.9106,8.40636,17.76626,16.07481,33.62106,33.38729,66.628,10.68453,20.379,21.83683,40.51955,34.7071,62.71816,73.77854,122.897c34.5059,53.1429,68.73651,100.08874,108.04586,149.78473C913.67124,698.84433,911.73706,700.80615,910.64576,699.4127Z" transform="translate(-26.84086 -49.49819)" fill="#e4e4e4"/><path d="M457.9912,345.4352c-1.43911-1.60428-2.86926-3.20856-4.31777-4.81284-11.42244-12.63259-23.6788-25.11847-39.3644-32.36067a57.11021,57.11021,0,0,0-23.92678-5.54622c-8.56213.02753-16.93178,2.27348-24.84307,5.41792-3.74034,1.49428-7.39831,3.19021-11.00078,4.99614-4.11634,2.07182-8.15927,4.28118-12.1834,6.50883q-11.33112,6.27044-22.36816,13.0909-21.9606,13.5722-42.54565,29.21623-10.67111,8.11311-20.90175,16.75788-9.51557,8.03052-18.64618,16.492c-1.30168,1.20091-3.24526-.74255-1.94358-1.94347,1.60428-1.49428,3.22692-2.97938,4.84955-4.44612q6.87549-6.21547,13.9712-12.19258,12.93921-10.91827,26.54851-20.99312,21.16295-15.67614,43.78289-29.2254,11.3036-6.76547,22.91829-12.9626c2.33793-1.24674,4.70317-2.466,7.09571-3.6211a113.11435,113.11435,0,0,1,16.86778-6.86631,60.00626,60.00626,0,0,1,25.476-2.50266,66.32725,66.32725,0,0,1,23.50512,8.1314c15.40091,8.60812,27.34573,21.919,38.97005,34.90916C461.10844,344.80265,459.17382,346.75529,457.9912,345.4352Z" transform="translate(-26.84086 -49.49819)" fill="#e4e4e4"/><path d="M773.55166,476.34216l36.90462-13.498,18.32327-6.70182c5.96758-2.18267,11.92082-4.66747,18.08989-6.23037a28.53868,28.53868,0,0,1,16.37355.20862,37.73731,37.73731,0,0,1,12.771,7.91667,103.63871,103.63871,0,0,1,10.47488,11.18642c3.98932,4.79426,7.9197,9.63878,11.86772,14.46706q24.44135,29.89093,48.56306,60.04134,24.12118,30.14991,47.91981,60.556,23.85681,30.48042,47.38548,61.21573,2.8823,3.76519,5.75967,7.53415c1.0598,1.38809,3.44948.01962,2.37471-1.38807q-23.70225-31.04441-47.73491-61.83464-24.09177-30.86383-48.51646-61.46586-24.42423-30.60142-49.17854-60.93744-6.167-7.5576-12.35444-15.09858c-3.47954-4.24072-6.91984-8.52718-10.73629-12.47426-7.00538-7.24516-15.75772-13.64794-26.23437-13.82167-6.15972-.10214-12.121,1.85248-17.844,3.92288-6.16967,2.232-12.32455,4.50571-18.48632,6.7594L782.11123,470.2921l-9.29068,3.39811c-1.64874.603-.9365,3.26189.73111,2.65195Z" transform="translate(-26.84086 -49.49819)" fill="#e4e4e4"/><path d="M409.45248,324.15733c-18.75411-9.63866-42.77137-7.75087-60.00507,4.29119A855.84532,855.84532,0,0,1,446.818,351.17434C433.53537,343.3904,423.14521,331.19475,409.45248,324.15733Z" transform="translate(-26.84086 -49.49819)" fill="#f2f2f2"/><path d="M349.26282,328.41534,345.6524,331.35c1.22123-1.02713,2.4908-1.99013,3.795-2.90144C349.3858,328.43789,349.32442,328.426,349.26282,328.41534Z" transform="translate(-26.84086 -49.49819)" fill="#f2f2f2"/><path d="M874.62436,476.477c-3.63279-4.42206-7.56046-9.05222-12.99421-10.84836l-5.07308.20009a575.43629,575.43629,0,0,0,153.26729,175.22056Q942.22437,558.76317,874.62436,476.477Z" transform="translate(-26.84086 -49.49819)" fill="#f2f2f2"/><path d="M1086.66915,698.4482c-10.56006,21.33-27.23,39.97-46.39,54.35-29.37,22.05-64.33,35.3-99.32,46.48-197.62,63.17-413.48,68.05-613.75,13.88-55.4-14.98-111.08-35.22-154.17-73.13a197.34468,197.34468,0,0,1-35.74-41.61c57.35-31.52,126.86-43.4,193.19-41.95,95.09,2.08,187.96,27.46,282.16,40.59a1102.669,1102.669,0,0,0,334.04-4.6c38.31994-6.43,77.98-14.84,115.49-4.66A95.14954,95.14954,0,0,1,1086.66915,698.4482Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><circle cx="179.31828" cy="51" r="51" fill="#ccc"/><path d="M362.30892,97.84042C348.81185,83.6816,333.13643,70.765,314.57961,63.93948a76.71521,76.71521,0,0,0-15.98633-4.01734c-.04388-.006-.08545.00287-.12909-.00067a2.35576,2.35576,0,0,0-.26965-.05292,61.5388,61.5388,0,0,0-22.84131,1.379,63.10735,63.10735,0,0,0-10.63519,3.7049,93.00467,93.00467,0,0,0-9.97943,5.65557A64.90832,64.90832,0,0,1,232.6863,78.8348a74.1877,74.1877,0,0,1-11.84406,1.16248c-3.44714.06915-6.698.1889-9.964,1.43426a23.91573,23.91573,0,0,0-14.56494,15.77051,1.55078,1.55078,0,0,0,.68933,1.694c.88349.63275,1.74476,1.35065,2.673,1.91437a8.33922,8.33922,0,0,0,2.611.71209q2.21366.46711,4.43292.90693,8.17584,1.61992,16.41962,2.86792,16.681,2.5252,33.54217,3.55755a373.48132,373.48132,0,0,0,67.51026-2.029A374.77144,374.77144,0,0,0,361.647,100.3475,1.5139,1.5139,0,0,0,362.30892,97.84042Z" transform="translate(-26.84086 -49.49819)" fill="#f0f0f0"/><path d="M208.57961,131.93948a76.71521,76.71521,0,0,0-15.98633-4.01734c-.04388-.006-.08545.00287-.12909-.00067a2.35576,2.35576,0,0,0-.26965-.05292,61.5388,61.5388,0,0,0-22.84131,1.379,63.10735,63.10735,0,0,0-10.63519,3.7049,93.00467,93.00467,0,0,0-9.97943,5.65557,64.90832,64.90832,0,0,1-22.05231,8.22681,74.1877,74.1877,0,0,1-11.84406,1.16248c-3.44714.06915-6.698.1889-9.964,1.43426a23.91573,23.91573,0,0,0-14.56494,15.77051,1.55078,1.55078,0,0,0,.68933,1.694c.88349.63275,1.74476,1.35065,2.673,1.91437a8.33922,8.33922,0,0,0,2.611.71209q2.21366.46712,4.43292.90693,8.17584,1.61992,16.41962,2.86792,16.681,2.5252,33.54217,3.55755a373.48132,373.48132,0,0,0,67.51026-2.029A374.77144,374.77144,0,0,0,255.647,168.3475a1.5139,1.5139,0,0,0,.66193-2.50708C242.81185,151.6816,227.13643,138.765,208.57961,131.93948Z" transform="translate(-26.84086 -49.49819)" fill="#f0f0f0"/><polygon points="1047.411 588.142 1074.576 567.518 1087.816 580.759 1043.563 611.042 1047.411 588.142" fill="#2f2e41"/><path d="M1048.91635,694.42781H955.99269l3.25907-10.55987,0,0c20.1993-7.31227,8.85333-23.02957,28.06751-32.63666,46.9968-23.4984,65.19118-93.62006,58.30932-121.33935l30.798-1.30221S1118.95877,649.37476,1048.91635,694.42781Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M1128.24653,644.78888a15.61893,15.61893,0,0,1-20.18272.37759l-.0604-.04961-.00207-.07767a14.96483,14.96483,0,0,0-.6-3.81936,10.69077,10.69077,0,0,1-.38818,2.64366l-.07784.28991-.20873-.21549c-.18027-.18589-.35474-.37472-.51859-.561a15.75088,15.75088,0,0,1-2.399-3.63269,45.91623,45.91623,0,0,0-12.74-15.87972,22.29237,22.29237,0,0,1-2.6727-2.57172,22.03415,22.03415,0,0,1,27.66955-33.56911l.13767.0806-.07148.1425a11.47756,11.47756,0,0,1-2.04788,2.954,14.96829,14.96829,0,0,0,3.15395-2.27865l.10006-.09436.11337.07818a22.12793,22.12793,0,0,1,4.0294,3.5867l.12844.14726a9.83643,9.83643,0,0,0,7.28375,3.36123,15.614,15.614,0,0,1,15.11947,18.29291l-.01769.10315-.10034.0304a13.39866,13.39866,0,0,1-5.45694.68088,15.22208,15.22208,0,0,0,4.86061,1.2174l.21654.01718-.06874.20619a15.6035,15.6035,0,0,1-4.50339,6.79l-.05928.05187-.06294.05509a15.3329,15.3329,0,0,0-5.297,10.64272A15.73345,15.73345,0,0,1,1128.24653,644.78888Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><path d="M1131.089,639.76934a15.57418,15.57418,0,0,1-.1756,1.67894,15.78521,15.78521,0,0,0,2.53772-7.82047c.02071-.42637.06546-.8511.12549-1.27393A14.8141,14.8141,0,0,0,1131.089,639.76934Z" transform="translate(-26.84086 -49.49819)" opacity="0.15"/><path d="M1136.00331,620.789a15.19815,15.19815,0,0,0,3.88418,1.09822,15.63,15.63,0,0,0,1.42322-1.73647A13.24363,13.24363,0,0,1,1136.00331,620.789Z" transform="translate(-26.84086 -49.49819)" opacity="0.15"/><path d="M1141.72736,615.66082a15.70907,15.70907,0,0,1-.11112,4.05194,15.52908,15.52908,0,0,0,1.75758-3.62455l.06874-.2062-.21655-.01718A15.09472,15.09472,0,0,1,1141.72736,615.66082Z" transform="translate(-26.84086 -49.49819)" opacity="0.15"/><path d="M1140.28241,600.83967a15.65079,15.65079,0,0,0-11.46149-5.29958,9.83649,9.83649,0,0,1-7.28378-3.36124l-.12843-.14726a22.12785,22.12785,0,0,0-4.02939-3.58669l-.11338-.07817-.10005.09434a14.9676,14.9676,0,0,1-3.154,2.27865,11.47832,11.47832,0,0,0,2.04794-2.954l.07146-.1425-.13766-.08059a22.01777,22.01777,0,0,0-32.62113,14.2542,22.02182,22.02182,0,0,1,30.259-8.11268l.13765.08059-.07145.1425a11.47814,11.47814,0,0,1-2.04794,2.954,14.96754,14.96754,0,0,0,3.154-2.27865l.10006-.09434.11338.07817a22.12857,22.12857,0,0,1,4.02939,3.5867l.12843.14725a9.83643,9.83643,0,0,0,7.28377,3.36124,15.61675,15.61675,0,0,1,15.10347,12.83488,18.92714,18.92714,0,0,0,2.26005-.55l.10034-.03039.01776-.10314A15.554,15.554,0,0,0,1140.28241,600.83967Z" transform="translate(-26.84086 -49.49819)" opacity="0.15"/><path d="M1173.15913,536.54065a50.29141,50.29141,0,0,1-42.007,49.59965l-.2484.04053-.19219-.16016a48.18565,48.18565,0,0,0-10.51008-6.67159,34.42316,34.42316,0,0,1,5.5662,6.56047l.53537.80469-.96485.04641c-.8328.04053-1.66038.0608-2.45919.0608a50.71554,50.71554,0,0,1-13.88445-1.92513c-20.51748-5.83748-42.55022-6.83567-65.48571-2.96711a71.77856,71.77856,0,0,1-11.90147.993A70.94787,70.94787,0,0,1,1009.287,444.63723l.48765-.16146.19251.47589a36.95659,36.95659,0,0,1,2.787,11.23306,48.19635,48.19635,0,0,0,1.19789-12.47116l-.01536-.44255.43013-.10786a71.24939,71.24939,0,0,1,17.24051-2.1147l.62918.00262a31.67228,31.67228,0,0,0,23.616-10.46237,50.27568,50.27568,0,0,1,76.38016,2.34611l.2118.26213-.1399.30723c-2.93769,6.47484-6.13818,11.19189-9.95836,14.64143a49.01343,49.01343,0,0,0,13.27978-9.16282l.502-.487.35234.60466A50.24214,50.24214,0,0,1,1143.32,464.4278l-.00065.25363c-.00065.08956-.00065.17977-.00065.26932,0,13.61317,5.26419,26.51577,14.46689,35.43934A50.66021,50.66021,0,0,1,1173.15913,536.54065Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><g opacity="0.15"><path d="M1111.68868,417.71713a35.519,35.519,0,0,1-6.33509,7.77159,48.88929,48.88929,0,0,0,9.89823-6.1865Q1113.50228,418.44038,1111.68868,417.71713Z" transform="translate(-26.84086 -49.49819)"/><path d="M1140.79293,477.73323a50.48191,50.48191,0,0,1,7.22981,8.80775,51.39288,51.39288,0,0,1-4.70405-21.59022c0-.08957,0-.17978.00065-.26932l.00064-.25364a50.24245,50.24245,0,0,0-6.83956-25.32735l-.35235-.60468-.50207.487a49.12616,49.12616,0,0,1-9.17043,6.983A48.97185,48.97185,0,0,0,1140.79293,477.73323Z" transform="translate(-26.84086 -49.49819)"/><path d="M1126.32733,441.77093l-.00065.25364c-.00064.08954-.00064.17975-.00064.26931,0,.49355.00894.98585.02272,1.47739a52.3648,52.3648,0,0,0,5.95587-10.26709l.13985-.30725-.21176-.26212a50.68811,50.68811,0,0,0-9.096-8.79733A50.35621,50.35621,0,0,1,1126.32733,441.77093Z" transform="translate(-26.84086 -49.49819)"/><path d="M1157.78559,500.3901a45.45934,45.45934,0,0,1-6.40838-7.79666,50.2297,50.2297,0,0,1-37.21772,70.89l-.24841.04054-.19217-.16016a48.188,48.188,0,0,0-10.5101-6.67159,34.42262,34.42262,0,0,1,5.56617,6.56046l.5354.80471-.96482.0464c-.83286.04054-1.66041.0608-2.4592.0608a50.71549,50.71549,0,0,1-13.88448-1.92514c-20.51749-5.83747-42.55022-6.83566-65.4857-2.9671a71.7793,71.7793,0,0,1-11.90145.993,70.62389,70.62389,0,0,1-47.12-17.969,71.01118,71.01118,0,0,0,64.1127,40.6259,71.77947,71.77947,0,0,0,11.90145-.99294c22.93547-3.86857,44.96821-2.87037,65.4857,2.96709a50.71543,50.71543,0,0,0,13.88448,1.92514c.79878,0,1.62634-.02026,2.45919-.0608l.96483-.0464-.5354-.80471a34.42263,34.42263,0,0,0-5.56618-6.56045,48.18774,48.18774,0,0,1,10.51011,6.67159l.19217.16016.24841-.04055a50.25392,50.25392,0,0,0,26.63344-85.75019Z" transform="translate(-26.84086 -49.49819)"/></g><polygon points="134.035 560.973 97.223 533.025 79.28 550.968 139.25 592.007 134.035 560.973" fill="#2f2e41"/><path d="M195.21,687.42781h125.9266L316.72,673.11747l0,0c-27.37332-9.9093-11.99769-31.20879-38.036-44.228-63.68827-31.84414-88.3446-126.87035-79.01856-164.43447l-41.73625-1.76471S100.29113,626.37364,195.21,687.42781Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M80.55365,605.25219a20.7786,20.7786,0,0,0-7.17833-14.42261c-.0283-.02489-.05681-.05-.08529-.07465l-.08034-.0703a21.14539,21.14539,0,0,1-6.10283-9.20148l-.09315-.27942.29345-.02329a20.6283,20.6283,0,0,0,6.58691-1.64977,18.15726,18.15726,0,0,1-7.395-.9227l-.136-.0412-.024-.13979a21.15953,21.15953,0,0,1,20.48932-24.78985,13.32987,13.32987,0,0,0,9.87066-4.555l.17406-.19956a29.9868,29.9868,0,0,1,5.46049-4.86055l.15364-.106.13559.12786a20.2845,20.2845,0,0,0,4.27411,3.088,15.554,15.554,0,0,1-2.77519-4.00312l-.09688-.19312.18657-.10923A29.85984,29.85984,0,0,1,141.70818,588.318a30.209,30.209,0,0,1-3.62195,3.48511,62.224,62.224,0,0,0-17.26483,21.51959,21.34447,21.34447,0,0,1-3.251,4.92289c-.222.25244-.45848.50834-.70277.76026l-.28286.292-.10549-.39287a14.48742,14.48742,0,0,1-.526-3.58259,20.27961,20.27961,0,0,0-.813,5.17585l-.00281.10525-.08185.06724a21.15037,21.15037,0,0,1-34.50192-15.41853Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><path d="M83.85266,613.35673a21.10374,21.10374,0,0,0,.238,2.27524,21.39156,21.39156,0,0,1-3.439-10.598c-.02806-.57781-.08871-1.15339-.17006-1.72639A20.07562,20.07562,0,0,1,83.85266,613.35673Z" transform="translate(-26.84086 -49.49819)" opacity="0.15"/><path d="M77.193,587.63524a20.59681,20.59681,0,0,1-5.2637,1.48826,21.18029,21.18029,0,0,1-1.92868-2.3532A17.94731,17.94731,0,0,0,77.193,587.63524Z" transform="translate(-26.84086 -49.49819)" opacity="0.15"/><path d="M69.436,580.68579a21.28893,21.28893,0,0,0,.1506,5.491,21.04389,21.04389,0,0,1-2.3818-4.91186l-.09316-.27943.29346-.02329A20.4517,20.4517,0,0,0,69.436,580.68579Z" transform="translate(-26.84086 -49.49819)" opacity="0.15"/><path d="M71.39415,560.60073a21.20931,21.20931,0,0,1,15.53218-7.18179,13.33,13.33,0,0,0,9.87069-4.555l.174-.19955a29.98717,29.98717,0,0,1,5.46048-4.86056l.15364-.10593.13559.12785a20.28377,20.28377,0,0,0,4.27415,3.08794,15.55474,15.55474,0,0,1-2.77529-4.00312l-.09683-.19312.18655-.10921A29.83764,29.83764,0,0,1,148.51627,561.925a29.84315,29.84315,0,0,0-41.00585-10.994l-.18655.10921.09683.19311a15.5548,15.5548,0,0,0,2.77529,4.00313,20.28412,20.28412,0,0,1-4.27415-3.08794l-.13559-.12786-.15364.10594a29.98711,29.98711,0,0,0-5.46048,4.86055l-.174.19956a13.33,13.33,0,0,1-9.87069,4.555A21.16316,21.16316,0,0,0,69.65975,579.135a25.64845,25.64845,0,0,1-3.06273-.74529l-.136-.04118-.02407-.13978A21.07824,21.07824,0,0,1,71.39415,560.60073Z" transform="translate(-26.84086 -49.49819)" opacity="0.15"/><path d="M47.67454,424.47529c12.47114-12.09289,19.605-29.578,19.605-48.026,0-.12136,0-.24361-.00089-.365l-.00088-.34372a68.08611,68.08611,0,0,1,9.26876-34.32266l.47748-.81942.68034.66a66.42122,66.42122,0,0,0,17.99625,12.41711c-5.177-4.67469-9.51414-11.06706-13.4952-19.8415l-.18957-.41636.287-.35523a68.13168,68.13168,0,0,1,103.50749-3.17935,42.9211,42.9211,0,0,0,32.00348,14.1782l.85264-.00355a96.55467,96.55467,0,0,1,23.36369,2.86576l.58289.14617-.02081.59973a65.31307,65.31307,0,0,0,1.62334,16.90044,50.08227,50.08227,0,0,1,3.77686-15.22262l.26089-.64491.66085.21881a96.14585,96.14585,0,0,1-30.24771,187.39848A97.27192,97.27192,0,0,1,202.538,534.974c-31.0813-5.24253-60.93923-3.88982-88.74374,4.02092a68.72787,68.72787,0,0,1-18.81567,2.60886c-1.08252,0-2.204-.02747-3.33261-.08239l-1.30753-.0629L91.064,540.368a46.64968,46.64968,0,0,1,7.5431-8.8905,65.29981,65.29981,0,0,0-14.24286,9.0411l-.26045.217-.33662-.05492A68.10219,68.10219,0,0,1,47.67454,424.47529Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><g opacity="0.15"><path d="M110.14328,312.44a48.13438,48.13438,0,0,0,8.58508,10.53176,66.25283,66.25283,0,0,1-13.4137-8.38371Q107.68556,313.42016,110.14328,312.44Z" transform="translate(-26.84086 -49.49819)"/><path d="M70.70231,393.77157a68.411,68.411,0,0,0-9.79756,11.93592,69.64577,69.64577,0,0,0,6.37475-29.25825c0-.12137,0-.24362-.00088-.365l-.00087-.34372a68.08661,68.08661,0,0,1,9.26871-34.32266l.4775-.81944.68039.66a66.5738,66.5738,0,0,0,12.42741,9.46305C88.97194,367.31049,82.046,382.77189,70.70231,393.77157Z" transform="translate(-26.84086 -49.49819)"/><path d="M90.30555,345.03683l.00087.34372c.00088.12134.00088.24359.00088.365,0,.66884-.01212,1.336-.0308,2.0021A70.9624,70.9624,0,0,1,82.20534,333.834l-.18953-.41637.287-.35522a68.69044,68.69044,0,0,1,12.32659-11.92181A68.24086,68.24086,0,0,0,90.30555,345.03683Z" transform="translate(-26.84086 -49.49819)"/><path d="M47.67451,424.4753a61.60525,61.60525,0,0,0,8.6844-10.56575,68.06938,68.06938,0,0,0,50.436,96.06741l.33664.05494.26042-.217a65.30253,65.30253,0,0,1,14.24289-9.04108,46.64767,46.64767,0,0,0-7.54306,8.89047l-.72556,1.09052,1.3075.06287c1.12865.05494,2.25012.08239,3.33261.08239a68.72762,68.72762,0,0,0,18.81572-2.60886c27.80451-7.91072,57.66244-9.26344,88.74372-4.0209a97.27262,97.27262,0,0,0,16.12839,1.3456,95.7069,95.7069,0,0,0,63.8553-24.35094,96.23165,96.23165,0,0,1-86.88309,55.05467A97.27245,97.27245,0,0,1,202.538,534.974c-31.08129-5.24254-60.93922-3.88982-88.74373,4.0209a68.72763,68.72763,0,0,1-18.81572,2.60887c-1.08249,0-2.204-.02746-3.33261-.0824l-1.30749-.06287L91.064,540.368a46.64834,46.64834,0,0,1,7.54306-8.89047,65.30253,65.30253,0,0,0-14.24289,9.04108l-.26042.217-.33663-.05494A68.10219,68.10219,0,0,1,47.67451,424.4753Z" transform="translate(-26.84086 -49.49819)"/></g><circle cx="460.31828" cy="185" r="5" fill="#fff"/><circle cx="834.31828" cy="305" r="3" fill="#fff"/><circle cx="892.31828" cy="170" r="3" fill="#fff"/><circle cx="355.31828" cy="80" r="3" fill="#fff"/><circle cx="325.31828" cy="201" r="3" fill="#fff"/><circle cx="179.31828" cy="170" r="3" fill="#fff"/><circle cx="696.31828" cy="195" r="3" fill="#fff"/><circle cx="1003.31828" cy="98" r="3" fill="#fff"/><path d="M328.95929,413.56327c-3.79958-7.035-4.33-16.25537.33531-22.74859a36.83843,36.83843,0,0,0,14.67507,20.5993c2.77181,1.88719,6.05124,3.69758,6.99947,6.914a8.23488,8.23488,0,0,1-.85864,6.04445,24.4571,24.4571,0,0,1-3.79505,4.95494l-.13433.50325C339.30268,425.75443,332.75886,420.59829,328.95929,413.56327Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><path d="M910.95929,612.56327c-3.79958-7.035-4.33-16.25537.33531-22.74859a36.83843,36.83843,0,0,0,14.67507,20.5993c2.77181,1.88719,6.05124,3.69758,6.99947,6.914a8.23488,8.23488,0,0,1-.85864,6.04445,24.4571,24.4571,0,0,1-3.795,4.95494l-.13433.50325C921.30268,624.75443,914.75886,619.59829,910.95929,612.56327Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><path d="M591.95929,449.56327c-3.79958-7.035-4.33-16.25537.33531-22.74859a36.83843,36.83843,0,0,0,14.67507,20.5993c2.77181,1.88719,6.05124,3.69758,6.99947,6.914a8.23488,8.23488,0,0,1-.85864,6.04445,24.4571,24.4571,0,0,1-3.795,4.95494l-.13433.50325C602.30268,461.75443,595.75886,456.59829,591.95929,449.56327Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><path d="M287.95929,565.56327c-3.79958-7.035-4.33-16.25537.33531-22.74859a36.83843,36.83843,0,0,0,14.67507,20.5993c2.77181,1.88719,6.05124,3.69758,6.99947,6.914a8.23488,8.23488,0,0,1-.85864,6.04445,24.4571,24.4571,0,0,1-3.79505,4.95494l-.13433.50325C298.30268,577.75443,291.75886,572.59829,287.95929,565.56327Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><path d="M249.95929,651.56327c-3.79958-7.035-4.33-16.25537.33531-22.74859a36.83843,36.83843,0,0,0,14.67507,20.5993c2.77181,1.88719,6.05124,3.69758,6.99947,6.914a8.23488,8.23488,0,0,1-.85864,6.04445,24.4571,24.4571,0,0,1-3.79505,4.95494l-.13433.50325C260.30268,663.75443,253.75886,658.59829,249.95929,651.56327Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/><rect x="843.31828" y="68" width="11" height="589" fill="#3f3d56"/><rect x="813.31828" y="20" width="72" height="72" rx="35.99996" fill="#ff6582"/><path d="M418.64263,424.1385c0,11.47771,12.51572,21.67823,23.99344,21.67823s17.571-10.20052,17.571-21.67823a20.78224,20.78224,0,0,0-41.56448,0Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><polygon points="398.471 484.489 437.067 483.005 439.294 442.925 394.76 442.925 398.471 484.489" fill="#ffb8b8"/><path d="M400.81364,561.4928a6.18231,6.18231,0,0,0-.36494-9.4728l7.00739-20.82235-11.03775,2.917-4.96213,19.32605a6.21581,6.21581,0,0,0,9.35743,8.05215Z" transform="translate(-26.84086 -49.49819)" fill="#ffb6b6"/><circle cx="415.75835" cy="381.62478" r="14.69804" fill="#ffb8b8"/><path d="M442.96047,429.64379l-10.73253-.28426a1.504,1.504,0,0,1-1.28014-.78738l-3.58787-6.65514a1.49783,1.49783,0,0,1,.39563-1.89138L441.79818,409.047a1.49679,1.49679,0,0,1,1.25618-.28037l11.34184,2.58422a1.499,1.499,0,0,1,1.1066,1.04314l4.4413,15.29492a1.49935,1.49935,0,0,1-1.51389,1.916l-5.5602-.27779a1.50724,1.50724,0,0,1-1.34747-1.0276l-.23052-.69867a.17342.17342,0,0,0-.338.05439,1.49974,1.49974,0,0,1-1.57346,1.4977l-1.84088-.09194a1.4954,1.4954,0,0,1-1.396-1.205l-.79385-3.99256a.1732.1732,0,0,0-.34188.01359l-.51866,4.442a1.492,1.492,0,0,1-1.48734,1.32546Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M432.2515,449.58079l19.00323.25331,6.18481,7.85346,9.95684,2.3481,2.5878,14.95427c1.29375,7.47624-.07979,12.21089-3.88076,18.77751l0,0-.45522,12.91771.503.91426a2.09364,2.09364,0,0,1-.63119,2.72267h0a4.27726,4.27726,0,0,1,.11752,2.81491l-.24528.81046s-.70783,5.66261-40.83239-.29293a3.95632,3.95632,0,0,1-3.34345-3.3986h0a2.95406,2.95406,0,0,1-.547-3.4038l.08175-.16348-.412-.48529a3.177,3.177,0,0,1-.1608-3.90659h0l-5.76652-41.25217,11.91192-3.71Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M419.16862,464.99288l-4.75684-3.94828s-4.22952,1.25013-7.18334,9.58077-13.08957,71.52656-13.08957,71.52656l11.87557-5.93778,16.8392-46.43085Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M524.81946,532.274a6.18228,6.18228,0,0,1-7.09116-6.29147l-20.54147-7.79242,9.257-6.682,18.08733,8.42424a6.21581,6.21581,0,0,1,.28831,12.34162Z" transform="translate(-26.84086 -49.49819)" fill="#ffb6b6"/><path d="M461.88061,464.63253l3.22471-5.27425s4.40655-.18456,9.89528,6.74353c2.81373,3.55161,21.04874,34.01719,21.04874,34.01719l16.86311,14.05546-13.80628,4.93081-16.27169-6.90314-18.244-30.078Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><polygon points="435.555 666.81 444.739 666.81 449.108 631.385 435.553 631.386 435.555 666.81" fill="#ffb6b6"/><polygon points="355.157 661.099 364.044 663.415 377.208 630.238 364.091 626.819 355.157 661.099" fill="#ffb6b6"/><path d="M460.11787,711.77763l14.51826-.86655v6.22026l13.80293,9.53279a3.88541,3.88541,0,0,1-2.20782,7.08274H468.9467l-2.97925-6.15279-1.16325,6.15279h-6.517Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M380.13111,705.42858l14.2674,2.8235-1.569,6.01913,10.95211,12.70615a3.88541,3.88541,0,0,1-3.923,6.29683L383.133,728.91441l-1.331-6.70531-2.67759,5.66043-6.30624-1.64381Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M383.1248,688.31931l26.92081-55.33021,2.11353-65.49091C406.33233,556.677,423.491,532.805,423.491,532.805v-9.24491l41.91852,7.90812v0a201.21489,201.21489,0,0,1,12.26151,73.06026L475.982,694.04734h.52987a3.31527,3.31527,0,1,1,0,6.63053H459.9355a3.31527,3.31527,0,1,1,0-6.63053h.4274L448.4631,580.16351l-13.83654,56.19881L401.189,688.1066a3.3069,3.3069,0,0,1-.26524,6.60379H384.34739a3.31182,3.31182,0,0,1-1.22259-6.39108Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M382.75841,426.29647c6.19395-6.05935,10.09279-14.02773,15.22255-21.01108,5.1296-6.98327,12.35472-13.3824,21.01083-13.77026a13.03786,13.03786,0,0,1,8.16579,2.129,8.30541,8.30541,0,0,1,3.60455,7.36741c.9138-2.56674,4.99718-3.1453,6.588-.93331,1.59062,2.21191-.25722,5.89893-2.98115,5.94838l-.2671-1.05666a18.24877,18.24877,0,0,1-11.80141,7.83613,2.9783,2.9783,0,0,1-3.35526-3.85425C409.59087,410.80666,412.56052,428.25234,407,436s-21.45259,6.99551-30.82907,8.7353c-9.05466,1.68-17.85857-3.34756-25.69931-8.178A38.2715,38.2715,0,0,0,382.75841,426.29647Z" transform="translate(-26.84086 -49.49819)" fill="#2f2e41"/><path d="M732.68989,636.90373,704.47275,624.455V613.75265l10.0561-.05651a7.46918,7.46918,0,0,0,7.044-5.10714l7.06437-21.19305a7.46924,7.46924,0,0,0-7.086-9.83122H704.47275v-9.959H725.913a7.46925,7.46925,0,0,0,7.27937-5.79584l4.865-21.16286a7.46923,7.46923,0,0,0-7.27937-9.14265H704.47275v-2.48975a4.97949,4.97949,0,0,0-9.959,0v2.48975H518.1566v-2.48975a4.9795,4.9795,0,0,0-9.959,0v2.48975H487.2868a7.46923,7.46923,0,0,0-7.27937,9.14265l4.865,21.16286a7.46925,7.46925,0,0,0,7.27937,5.79584H508.1976v9.959H496.51328a7.46923,7.46923,0,0,0-7.10927,9.76l7.21041,22.37711a7.46925,7.46925,0,0,0,7.15123,5.17837l4.432-.0249V624.455l-22.82269,12.44874a7.46922,7.46922,0,0,0-7.46924,7.46922v0a7.46925,7.46925,0,0,0,7.46924,7.46925H508.1976v54.77446a4.9795,4.9795,0,0,0,9.959,0V651.84222H694.51376v54.77446a4.97949,4.97949,0,0,0,9.959,0V651.84222h28.21714a7.46925,7.46925,0,0,0,7.46925-7.46925v0A7.46922,7.46922,0,0,0,732.68989,636.90373Zm-214.53329-69.298H694.51376v9.959H518.1566Zm0,56.84925v-9.65563l176.35716-.99076V624.455Z" transform="translate(-26.84086 -49.49819)" fill="#3f3d56"/></svg>',jee='<svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" width="855.93958" height="630.06608" viewBox="0 0 855.93958 630.06608" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M935.43234,472.55767c-3.73,43.08-22.51,84.71-49.3,119.14q-1.68,2.16-3.4,4.28-3.87,4.77-7.94,9.36-4.98,5.655-10.25,11.05005-4.29,4.43994-8.78,8.68994-3.465,3.315-7.01,6.5c-28.43,25.69-61.09,46.89-94.74,65.43005-65.67,36.17-137.65,63.56995-212.52,67.56-74.86,3.98-153.01-17.46-207.91-68.52-73.99-68.81-94.63995-183.58-64.6-280.05,19.98-64.18,60.76-122.24,116.26-160.16,55.02-37.59,124.43-54.51,190.12-43.44995,52.44-31.87006,121.09-32.48,178.1-8.89,30.42,12.59,57.72,31.31,81.67,53.93a339.34337,339.34337,0,0,1,30.72,33.23q1.455,1.785,2.88,3.6,5.97,7.545,11.55,15.4,8.01,11.265,15.21,23.03c1.32,2.16,2.63,4.33,3.91,6.52.86,1.47,1.73,2.95,2.58,4.44a.29776.29776,0,0,1,.04.1c13.31,23.41,24.19,48.39,29.86005,74.5,1,4.62,1.84,9.26,2.49,13.94v.01q.855,5.955,1.29,11.97A176.97711,176.97711,0,0,1,935.43234,472.55767Z" transform="translate(-172.03021 -134.96696)" fill="#3f3d56"/><path d="M740.07386,537.68412,591.61233,414.00627,735.84027,542.638a3.44161,3.44161,0,1,0,4.23359-4.95386Z" transform="translate(-172.03021 -134.96696)" fill="#f0f0f0" opacity="0.3"/><circle cx="227.58212" cy="250.78071" r="89" fill="#f2f2f2"/><path d="M478.61233,379.74767a80.99369,80.99369,0,0,1-81,81,81.57161,81.57161,0,0,1-27.8-4.9,81.05489,81.05489,0,1,1,108.8-76.1Z" transform="translate(-172.03021 -134.96696)" fill="#fff"/><circle cx="211.58212" cy="217.78071" r="25" fill="#e4e4e4"/><path d="M475.45236,357.27764a25.00115,25.00115,0,0,1-27.6-41.08A81.05279,81.05279,0,0,1,475.45236,357.27764Z" transform="translate(-172.03021 -134.96696)" fill="#f2f2f2"/><circle cx="252.58212" cy="271.78071" r="9" fill="#e4e4e4"/><path d="M387.61233,457.74767a9.04581,9.04581,0,0,1-.31,2.34,79.52774,79.52774,0,0,1-17.49-4.24,9.00157,9.00157,0,0,1,17.8,1.9Z" transform="translate(-172.03021 -134.96696)" fill="#f2f2f2"/><path d="M334.61233,375.74767a18.002,18.002,0,0,1-16.8,17.96,81.54773,81.54773,0,0,1,1.76-35.71A18.00026,18.00026,0,0,1,334.61233,375.74767Z" transform="translate(-172.03021 -134.96696)" fill="#f2f2f2"/><circle cx="606.45653" cy="208.48305" r="3.70234" fill="#6c63ff"/><circle cx="572.30231" cy="119.94851" r="2.16307" fill="#f0f0f0"/><circle cx="225.30231" cy="543.94851" r="2.16307" fill="#f0f0f0"/><circle cx="584.58144" cy="331.59402" r="2.16307" fill="#f0f0f0"/><circle cx="305.45653" cy="350.48305" r="3.70234" fill="#6c63ff"/><circle cx="171.45653" cy="416.48305" r="17.48305" fill="#6c63ff"/><circle cx="267.30231" cy="435.94851" r="2.16307" fill="#f0f0f0"/><circle cx="487.30231" cy="97.94851" r="2.16307" fill="#f0f0f0"/><circle cx="358.30231" cy="558.94851" r="2.16307" fill="#f0f0f0"/><circle cx="326.30231" cy="117.94851" r="2.16307" fill="#f0f0f0"/><circle cx="382.30231" cy="222.94851" r="2.16307" fill="#f0f0f0"/><circle cx="296.58144" cy="480.59402" r="2.16307" fill="#f0f0f0"/><circle cx="549.58144" cy="494.59402" r="2.16307" fill="#f0f0f0"/><circle cx="437.58144" cy="368.59402" r="2.16307" fill="#f0f0f0"/><circle cx="494.58144" cy="222.59402" r="2.16307" fill="#f0f0f0"/><circle cx="598.21204" cy="292.65473" r="4.28889" fill="#ff6584"/><circle cx="424.21204" cy="150.65473" r="4.28889" fill="#ff6584"/><circle cx="424.21204" cy="445.65473" r="4.28889" fill="#ff6584"/><path d="M863.45236,605.33764a7.694,7.694,0,0,0-7.39,5.58,7.3896,7.3896,0,0,0-.3,2.12v12.04q4.485-4.24494,8.78-8.68994,5.265-5.40006,10.25-11.05005Z" transform="translate(-172.03021 -134.96696)" fill="#6c63ff"/><path d="M890.68118,667.89806q-19.36816,0-42.45654-1.46386c-79.61377-5.05567-182.7378-22.63282-290.376-49.49219-107.6377-26.85938-206.93018-59.79395-279.58545-92.73438-35.39258-16.04687-62.55615-31.23632-80.73535-45.14746-19.24707-14.72705-27.666-27.564-25.02393-38.15283,5.148-20.62891,50.731-25.14209,88.064-25.29541l.01269,3c-51.26806.21045-81.51367,8.38672-85.16552,23.022-4.65186,18.64014,33.28662,47.74073,104.08691,79.84131,72.49561,32.86817,171.60547,65.73926,279.07324,92.55664,107.46729,26.81641,210.40137,44.36328,289.83985,49.40821,77.57861,4.92773,124.74316-2.9375,129.39453-21.57813,3.86181-15.47656-21.59815-38.27539-71.68946-64.19824l1.37891-2.66406c36.397,18.83593,78.64551,45.85156,73.22168,67.58886-2.64258,10.58887-16.10547,17.96485-40.01514,21.92285C927.0762,666.7672,910.33548,667.89806,890.68118,667.89806Z" transform="translate(-172.03021 -134.96696)" fill="#6c63ff"/><circle cx="714.58212" cy="208.78071" r="100.5" fill="#fff"/><path d="M886.61233,241.74767a102,102,0,1,0,102,102A101.635,101.635,0,0,0,886.61233,241.74767Zm0,201a99,99,0,1,1,99-99A98.61767,98.61767,0,0,1,886.61233,442.74767Z" transform="translate(-172.03021 -134.96696)" fill="#2f2e41"/><path d="M798.417,367.81847a2.00078,2.00078,0,0,1-1.957-1.59765,97.66924,97.66924,0,0,1,22.34082-83.13526,2,2,0,0,1,2.98633,2.66114A93.59682,93.59682,0,0,0,800.378,365.41515a2.00228,2.00228,0,0,1-1.96094,2.40332Z" transform="translate(-172.03021 -134.96696)" fill="#2f2e41"/><circle cx="714.51924" cy="238.27373" r="63.87702" fill="#6c63ff"/><path d="M866.24805,397.35666c-4.14062-.115-9.29385-.25869-13.26384-3.15874a10.18618,10.18618,0,0,1-4.00806-7.60607,6.85213,6.85213,0,0,1,2.33007-5.62763c2.07352-1.75216,5.10139-2.16313,8.36441-1.2042l-3.38076-24.7061,2.48174-.34,3.97444,29.04518-2.07245-.951c-2.4027-1.10205-5.70088-1.66285-7.7504.06911a4.40263,4.40263,0,0,0-1.44375,3.62659,7.69887,7.69887,0,0,0,2.98246,5.67107c3.08949,2.25668,7.19708,2.54779,11.85585,2.678Z" transform="translate(-172.03021 -134.96696)" fill="#2f2e41"/><rect x="658.49493" y="222.21767" width="13.49133" height="2.50498" fill="#2f2e41"/><rect x="701.07961" y="222.21765" width="13.49133" height="2.50498" fill="#2f2e41"/><path d="M889.23233,452.90765h-57.9a8.14716,8.14716,0,0,0-8.13995,8.14v128.33a47.66955,47.66955,0,0,0,25.56,42.19995q3.555-3.18,7.01-6.5,4.485-4.24494,8.78-8.68994,5.265-5.40006,10.25-11.05005,4.08006-4.59,7.94-9.36,1.725-2.115,3.4-4.28c26.79-34.43,45.57-76.06,49.3-119.14A64.04854,64.04854,0,0,0,889.23233,452.90765Z" transform="translate(-172.03021 -134.96696)" fill="#2f2e41"/><path d="M891.34231,479.68767a14.61136,14.61136,0,0,0-10.43-4.17,14.465,14.465,0,0,0-9.16,3.36005,13.12263,13.12263,0,0,0-1.17,1.07l-47.38995,48.6-34.37,35.25a6.80061,6.80061,0,0,0-1.28,1.8,7.29573,7.29573,0,0,0-.77,3.32,7.16751,7.16751,0,0,0,2.18006,5.07l1.35,1.32,9.8,9.55.01-.01a7.29073,7.29073,0,0,0,4.66,1.63,7.167,7.167,0,0,0,5.07-2.18l1.59-1.62,11.38-11.67.38-.39,68.41-70.16a14.69128,14.69128,0,0,0-.26-20.77Z" transform="translate(-172.03021 -134.96696)" fill="#6c63ff"/><path d="M890.86152,343.44c2.1124-4.46658-.05349-9.23761-3.76378-12.09072-4.67557-3.59539-10.7221-3.00085-16.04008-1.29905-5.82238,1.8632-11.51366,5.21608-17.80383,5.02337a11.13058,11.13058,0,0,1-10.24407-7.27764c-3.3687-8.639.43561-18.29488,6.29971-24.84681a34.26766,34.26766,0,0,1,26.544-11.586,34.64989,34.64989,0,0,1,28.068,16.9026,1.54079,1.54079,0,0,0,2.05229.53813,36.88225,36.88225,0,0,1,28.39377-.71432,36.28984,36.28984,0,0,1,22.58042,34.49188c-.05,1.93122,2.95005,1.9301,3,0a39.89155,39.89155,0,0,0-10.59928-27.81249,38.71871,38.71871,0,0,0-27.56681-12.16772,39.33641,39.33641,0,0,0-17.32226,3.61223l2.05229.53813a37.69886,37.69886,0,0,0-25.0988-17.728,36.48542,36.48542,0,0,0-29.42384,7.32772c-7.70165,6.02707-13.53849,15.38016-13.17519,25.41071.15721,4.34047,1.44713,8.796,4.4606,12.03051,3.85981,4.14287,9.62229,4.85944,14.94631,3.798,7.07554-1.41071,13.53533-6.06449,20.91133-5.92113a10.21164,10.21164,0,0,1,7.6417,3.4453c1.62455,1.83335,2.6042,4.47042,1.49716,6.81122-.82094,1.73585,1.76463,3.26026,2.59041,1.51416Z" transform="translate(-172.03021 -134.96696)" fill="#2f2e41"/><path d="M412.09426,704.32287c-35.59912.001-68.69433-1.22071-98.32226-3.68555-38.72656-3.22266-69.41455-8.40332-91.21045-15.39648-23.07666-7.40528-35.31934-16.667-36.38818-27.52832-2.083-21.15821,39.334-40.72461,74.44531-53.41309l1.01953,2.82227c-48.2168,17.42382-73.957,35.28613-72.47949,50.29785,1.88183,19.11914,47.39209,33.78125,124.86181,40.22754,79.3252,6.60058,183.71729,4.26172,293.94727-6.58985,110.23-10.84863,213.07568-28.90625,289.59131-50.8457,74.72607-21.42578,116.50488-44.67969,114.623-63.79883-1.5625-15.874-33.20264-28.793-89.0918-36.3789l.40332-2.97266c40.60986,5.51172,89.47949,16.76172,91.67383,39.05762,1.06933,10.86132-9.1333,22.332-30.32276,34.09375-20.01465,11.10937-49.10351,22.17285-86.45849,32.88281-76.68506,21.98828-179.71973,40.08105-290.12451,50.94824C539.00247,700.86,472.01663,704.32287,412.09426,704.32287Z" transform="translate(-172.03021 -134.96696)" fill="#6c63ff"/><circle cx="838.45653" cy="434.48305" r="17.48305" fill="#6c63ff"/><circle cx="331.45653" cy="17.48305" r="17.48305" fill="#e6e6e6"/><circle cx="19.45653" cy="433.48305" r="17.48305" fill="#e6e6e6"/><circle cx="127.45653" cy="108.48305" r="10.70234" fill="#ff6584"/><circle cx="77.45653" cy="514.48305" r="10.70234" fill="#ff6584"/><circle cx="807.45653" cy="339.48305" r="10.70234" fill="#ff6584"/><circle cx="645.45653" cy="598.48305" r="17.48305" fill="#e6e6e6"/></svg>',TI=(e,t)=>{const n=window.atob(e),r=new ArrayBuffer(n.length),o=new Uint8Array(r);for(let i=0;i<n.length;i++)o[i]=n.charCodeAt(i);return new Blob([r],{type:t})},II=async e=>{const{vault:t}=yt.getState().app,n=await t.adapter.readBinary(e),r=new Uint8Array(n),o=new Blob([r],{type:"image/png"});return new Promise(i=>{const a=new FileReader;a.onloadend=()=>{const u=a.result;i(u)},a.readAsDataURL(o)})},Lee=async e=>{var n,r;const t=e.find(".thino-user-icon");if(!(t&&!/(http|app|base64)/.test((n=t==null?void 0:t.style)==null?void 0:n.backgroundImage))&&t&&(r=t==null?void 0:t.style)!=null&&r.backgroundImage){const o=await gm(t);t.style.backgroundImage=`url("${o}")`}},BS=async e=>{const t=e.findAll("img");for(const n of t)if(n.src.startsWith("http://localhost")){const r=await Id(n.getAttribute("path")||C.normalizePath(n==null?void 0:n.parentElement.getAttribute("src")));n.src=r}else{const r=await yO(n);n.src=r}},Ree=async e=>{const{app:t,settings:n}=yt.getState();let r,o;const i=document.body.hasClass("theme-light"),a=i?e==="modern"?n==null?void 0:n.DefaultLightBackgroundImage:n==null?void 0:n.DefaultLightBackgroundImageForClean:e==="modern"?n==null?void 0:n.DefaultDarkBackgroundImage:n==null?void 0:n.DefaultDarkBackgroundImageForClean,u=await t.vault.adapter.exists(a)&&/\.(png|svg|jpg|jpeg)/g.test(a),d=a==null?void 0:a.startsWith("http");switch(e){case"clean":u||d?(o=a,r=d?await Id(a):await II(o)):r=i?yv:w1;break;case"minimal":break;case"modern":default:u||d?(o=a,r=d?await Id(a):await II(o)):r="data:image/svg+xml;base64,"+btoa(i?Oee:jee);break}switch(e){case"modern":{const f=document.querySelector(".dialog-wrapper .memo-background .property-image");f.style.backgroundImage="url('"+r+"')";break}case"clean":{const f=document.querySelector(".dialog-wrapper .memo-container.clean .memo-background .property-image");f&&(f.style.backgroundImage="url('"+r+"')");break}case"minimal":break;default:{const f=document.querySelector(".dialog-wrapper .memo-background .property-image");f.style.backgroundImage="url('"+r+"')"}}return r},_ee=e=>{const{memo:t,destroy:n}=e,{memos:r}=_e.getState().memoState,{view:o,app:i,settings:a}=_e.getState().dailyNotesState,u={...t,createdAtStr:ut.getDateTimeString(t.createdAt)},[d,f]=F.useState(!1),[m,g]=F.useState(u.content),[v,w]=F.useState(!1),D=F.useRef(null),T=F.useRef(null),I=F.useRef(null),[k,A]=F.useState(e.style||"modern"),[R,j]=F.useState(""),B=F.useRef(null),L=F.useRef(null),[Z,U]=se.useState(a==null?void 0:a.MomentsIcon);F.useEffect(()=>{if(!(a!=null&&a.MomentsIcon)||!i)return;const de=i.vault.adapter.getResourcePath(C.normalizePath(a.MomentsIcon));de&&!(a!=null&&a.MomentsIcon.startsWith("http"))?U(de):U(a==null?void 0:a.MomentsIcon)},[a==null?void 0:a.MomentsIcon,i]);let z,$;r.length&&(z=r.length>0?r[r.length-1]:null,z?$=r?Math.ceil((Date.now()-ut.getTimeStampByDate(z==null?void 0:z.createdAt))/1e3/3600/24)+1:0:$=0),a==null||a.ShareFooterEnd.replace("{UserName}",a==null?void 0:a.UserName);const te=a==null?void 0:a.ShareFooterStart.replace("{ThinoNum}",r.length.toString()).replace("{UsedDay}",$.toString());F.useEffect(()=>{!D.current||!T.current||(C.setIcon(D.current,"copy"),C.setIcon(T.current,"x"))},[D,T]),F.useEffect(()=>{I.current&&C.setIcon(I.current,"file-down")},[I]),F.useEffect(()=>{C.setIcon(D.current,v?"loader":"copy"),D.current.disabled=v,D.current.toggleClass("copying",v)},[v]),F.useEffect(()=>{if(!L.current||!o&&!e.view||d)return;g(t.content),L.current.hasChildNodes()&&L.current.empty();async function de(){var oe;(oe=L.current)==null||oe.toggleClass(["markdown-rendered"],!0),await C.MarkdownRenderer.render(i,t.content+`
|
|
|
`,L.current,t.path,o||e.view)}de(),setTimeout(async()=>{await Q()},Ex)},[B,L,u,k]);const Q=async()=>{B.current&&(await Lee(B.current),await BS(B.current),Ree(k).then(de=>{de&&setTimeout(()=>{m0(B.current).then(oe=>{j(oe),f(!0)}).catch(()=>{})},600)}))},ue=()=>{n()},ee=F.useCallback(de=>{w(de)},[v]),le=async()=>{const{vault:de}=_e.getState().dailyNotesState.app,oe=B.current.querySelector(".memo-shortcut-img");if(!oe)return;const he=oe==null?void 0:oe.getAttribute("src").split("base64,")[1],K=TI(he,"image/png");let re;K.arrayBuffer().then(async pe=>{const Ie="png",Oe=su();for(const Ne in Oe)if(Oe[Ne]instanceof C.TFile){re=Oe[Ne];break}if(re!==void 0){const Ne=await de.getAvailablePathForAttachments(`Pasted Image ${C.moment().format("YYYYMMDDHHmmss")}`,Ie,re);await de.createBinary(Ne,pe),new C.Notice(E("Save image successfully"))}})},W=async()=>{ee(!0);const de=B.current.querySelector(".memo-shortcut-img");if(!de)return;const oe=de==null?void 0:de.getAttribute("src").split("base64,")[1],he=TI(oe,"image/png");if(!he){new C.Notice(E("Copy to clipboard failed"));return}const K=new ClipboardItem({"image/png":he});window.navigator.clipboard.write([K]).then(()=>{setTimeout(()=>{ee(!1)},500)}),new C.Notice(E("Copy to clipboard successfully"))};return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:Kn("dialog-header-container"),children:[y.jsxs("p",{className:"title-text",children:[y.jsx("span",{className:"icon-text",children:"🥰"}),E("Share Memo Image")]}),y.jsxs("div",{className:"btn-group",children:[C.Platform.isMobile&&y.jsx("button",{ref:I,className:"btn download-btn",onClick:le}),y.jsx("button",{ref:D,className:"btn copy-btn",onClick:W}),y.jsx("button",{ref:T,className:"btn close-btn",onClick:ue})]})]}),y.jsxs("div",{className:Kn("dialog-content-container",k),children:[y.jsx("div",{className:`tip-words-container ${R?"finish":"loading"}`,children:y.jsx("p",{className:"tip-text",children:E(R?"↗Click the button to save":"Image is generating...")})}),y.jsxs("div",{className:"setting-item",children:[y.jsxs("div",{className:"setting-item-info",children:[y.jsx("div",{className:"setting-item-name",children:E("Default sharing style")}),y.jsx("div",{className:"setting-item-description",children:E("Set the default style for sharing thino, 'Modern' by default.")})]}),y.jsx("div",{className:"setting-item-control",children:y.jsxs("select",{className:"dropdown",defaultValue:k,onChange:async de=>{de.currentTarget.value!==k&&(f(!1),j(""),A(de.currentTarget.value),await Q())},children:[y.jsx("option",{value:"modern",children:E("Modern")}),y.jsx("option",{value:"clean",children:E("Clean")}),y.jsx("option",{value:"minimal",children:E("Minimal")}),y.jsx("option",{value:"gradient",children:E("Gradient")})]})})]}),y.jsxs("div",{className:Kn("memo-container",k),ref:B,children:[y.jsx(Aa,{when:R!=="",children:y.jsx("img",{className:"memo-shortcut-img",onClick:W,src:R})}),y.jsxs("div",{className:"memo-background",children:[y.jsx("div",{className:"property-image",style:{backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"}}),y.jsx("span",{className:"background-container"}),y.jsxs("div",{className:"thino-user-header",children:[y.jsx("div",{className:"thino-user-icon",ref:de=>{if(a!=null&&a.MomentsIcon){de==null||de.empty();return}a!=null&&a.MomentsIcon||de&&C.setIcon(de,"Memos")},style:{backgroundImage:`url("${Z}")`}}),y.jsxs("div",{className:"thino-user-info",children:[y.jsx("div",{className:"thino-user-name",children:a==null?void 0:a.UserName}),(a==null?void 0:a.MomentsQuote)&&y.jsx("div",{className:"thino-user-quote",children:a==null?void 0:a.MomentsQuote})]})]}),y.jsx("div",{ref:L,className:"memo-content-text",style:{minHeight:a.MinHeightForShare||"200px"}}),y.jsx("div",{className:"thino-time-footer",children:u.createdAt}),y.jsxs("div",{className:"watermark-container",children:[y.jsxs("span",{className:"normal-text footer-start",children:[y.jsx("div",{className:"property-social-icons"}),y.jsx("span",{className:"name-text",children:te})]}),y.jsx("span",{className:"normal-text footer-end",children:y.jsx("span",{className:"name-text",children:"THINO"})})]})]})]})]})]})};function md(e,t,n){l0({className:"share-memo-image-dialog"},_ee,{memo:e,style:t,view:n})}const rh=async()=>{var r;const{verifyState:e}=yt.getState(),t=!C.Platform.isDesktop&&await((r=window.Capacitor)==null?void 0:r.Plugins.Device.getId()),n=C.Platform.isDesktop?await Jn():t.identifier||t.uuid;return e&&(e==null?void 0:e.appId)===n},Bee=async(e,t)=>{if(!(t!=="chat"&&t!=="moments")){if(t==="moments"){const n=e.querySelectorAll(".thino-moment-icon"),r=e.find(".moments-view-user-icon"),o=e.find(".moments-view-background");for(const i of n){const a=await gm(i);i.style.backgroundImage=`url(${a})`}if(r){const i=await gm(r);r.style.backgroundImage=`url(${i})`}if(o){const i=await gm(o);o.style.backgroundImage=`url(${i})`}}else if(t==="chat"){const n=e.querySelectorAll(".icon-img");for(const r of n){const o=await gm(r);r.style.backgroundImage=`url(${o})`}}}};class fd extends C.Modal{constructor(t,n,r){super(t),this.title=n,this.cb=r}onOpen(){super.onOpen(),this.containerEl.toggleClass("thino-bulk-action-dialog",!0),this.titleEl.setText(this.title+E("Confirm?")),this.contentEl.createEl("button",{text:E("Confirm?").replace(/\?|?/,"")}).onclick=()=>{this.cb("confirm"),this.close()},this.contentEl.createEl("button",{text:E("Cancel")}).onclick=()=>{this.cb("cancel"),this.close()}}onClose(){super.onClose()}}class Hee extends C.Modal{constructor(n,r){super(n);De(this,"root");this.thinos=r}onOpen(){super.onOpen(),this.containerEl.toggleClass(["thino-bulk-action-dialog","tag-actions"],!0),this.root=Pa.createRoot(this.contentEl),this.root.render(y.jsx(Ra,{store:_e,context:Ot,children:y.jsx(mO,{app:this.app,closeDialog:this.close.bind(this),thinos:this.thinos})}))}onClose(){var n;super.onClose(),(n=this.root)==null||n.unmount()}}const xg=({thinosCount:e,thinos:t})=>{const{globalState:{memoListView:n},locationState:{query:r,pathname:o},dailyNotesState:{settings:i,app:a}}=F.useContext(Ot),{tag:u,duration:d,type:f,text:m,filter:g}=r,v=tn.getQueryById(g),w=!!(u||d&&d.from<d.to||f||m||v),D=F.useRef(null);F.useEffect(()=>{D&&C.setIcon(D.current,"more-horizontal")},[D]);const T=async()=>{if(!((t==null?void 0:t.length)>0))return;const U=iO(t),z=sO(U);await ut.copyTextToClipboard(z),new C.Notice(E("Copied to clipboard Successfully"))},I=async()=>{if(!((t==null?void 0:t.length)>0))return;if(!await rh()){Fn();return}const U=[...t],z=i.DeleteThinoDirectly;try{for(const $ of U)if(z)await je.deleteMemoById($.id);else{const te=await je.hideMemoById($.id);te&&je.editMemo(te)}st.clearQuery()}catch($){console.error("error",$),new C.Notice($.message)}},k=async()=>{if(!((t==null?void 0:t.length)>0))return;if(!await rh()){Fn();return}const U=[...t];try{for(const z of U)await je.deleteMemoById(z.id);st.clearQuery(),new C.Notice(E("DELETE SUCCEED"))}catch(z){console.error("error",z),new C.Notice(z.message)}},A=async()=>{if(!((t==null?void 0:t.length)>0))return;if(!await rh()){Fn();return}const U=[...t];try{const z=await je.unarchiveThinoBulk(U);for(const $ of z)$&&je.editMemo($);new C.Notice(E("RESTORE SUCCEED")),st.clearQuery()}catch(z){console.error("error",z),new C.Notice(z.message)}},R=async()=>{if(!((t==null?void 0:t.length)>0))return;if(!await rh()){Fn();return}const U=[...t],z=yt.getState().settings.startSync;try{for(const $ of U){const te=await je.restoreMemoById($.id),Q=yt.getState().app,ue=Q==null?void 0:Q.loadLocalStorage("tokenForSync");te&&te.webId&&ue&&z&&await Lx(te.webId),te&&je.editMemo(te)}st.clearQuery(),new C.Notice(E("RESTORE SUCCEED"))}catch($){new C.Notice($.message)}},j=async()=>{if(!((t==null?void 0:t.length)>0))return;if(!await rh()){Fn();return}const U=[...t];try{const z=await je.archiveThinoBulk(U);for(const $ of z)$&&je.editMemo($);st.clearQuery()}catch(z){console.error("error",z),new C.Notice(z.message)}},B=async()=>{if((t==null?void 0:t.length)>0){if(!await rh()){Fn();return}new Hee(a,t).open()}},L=async U=>{setTimeout(async()=>{if(new C.Notice(E("Image is generating...")),!U){new C.Notice(E("No content to generate."));return}await Bee(U,n),await BS(U),document.body.hasClass("theme-dark"),m0(U).then(z=>{if(i!=null&&i.AutoSaveWhenOnMobile&&C.Platform.isMobile){const $=z.split("base64,")[1];n0($,"image/png").arrayBuffer().then(async Q=>{let ue;const ee="png",le=su();for(const W in le)if(le[W]instanceof C.TFile){ue=le[W];break}ue!==void 0&&await a.vault.createBinary(await vault.getAvailablePathForAttachments(`Pasted Image ${C.moment().format("YYYYMMDDHHmmss")}`,ee,ue),Q)})}g0({imgUrl:z}),new C.Notice(E("Image generated successfully.")),U.hasClass("share-image")?U.toggleClass("share-image",!1):U.closest(".share-image").toggleClass("share-image",!1)}).catch(z=>{console.error(z)})},0)},Z=U=>{const z=new C.Menu;switch(z.addItem($=>{$.setTitle(E("Copy filtered thinos")).setIcon("copy").onClick(async()=>{await T()})}),z.addItem($=>{$.setTitle(E("Share filtered thinos as image")).setIcon("image").onClick(async()=>{const te=document.querySelector(".memolist-container");te.toggleClass("share-image",!0);try{if(n==="calendar"){if(te.find(".rbc-agenda-table")){const Q=te.find(".rbc-agenda-table");await L(Q)}if(te.find(".rbc-month-view")){const Q=te.find(".rbc-month-view");await L(Q)}}else if(n==="table"){if(te.find(".thino-table")){const Q=te.find(".thino-table");await L(Q)}}else await L(te)}catch(Q){console.error(Q),new C.Notice(E("Failed to generate image.")),te.toggleClass("share-image",!1)}})}),z.addItem($=>{$.setTitle(E("Merge thinos in to thino share image")).setIcon("image").onClick(async()=>{let te="";t.forEach((ue,ee)=>{te+=`> [!thino] ${ue.createdAt}
|
|
|
${ue.content.split(`
|
|
|
`).map(le=>le.trim()?`> ${le}
|
|
|
`:`>
|
|
|
`)}
|
|
|
|
|
|
`+(ee===t.length-1?`
|
|
|
|
|
|
`:`
|
|
|
|
|
|
------
|
|
|
|
|
|
`)});const Q={createdAt:C.moment().format("YYYY/MM/DD HH:mm:ss"),updatedAt:C.moment().format("YYYY/MM/DD HH:mm:ss"),content:te.replace(/(^|\n),>/g,`
|
|
|
>`),id:"temp-"+Math.random().toString(36).substr(2,9),thinoType:"JOURNAL",sourceType:"DAILY",rowStatus:"NORMAL",visibility:"PRIVATE",pinned:!1,creatorName:"thino",deletedAt:"",path:"",resourceList:[]};md(Q,"clean")})}),z.addSeparator(),o){case"/":z.addItem($=>{$.setTitle(E("Bulk tag operation")).setIcon("hash").onClick(async()=>{await B()})}).addItem($=>{$.setTitle(E("Bulk archive")).setIcon("archive").onClick(async()=>{new fd(a,E("ARCHIVE"),async te=>{te==="confirm"&&await j()}).open()})}).addItem($=>{$.setTitle(E("Bulk delete")).setIcon("trash").onClick(async()=>{new fd(a,E("DELETE"),async te=>{te==="confirm"&&await I()}).open()})});break;case"/archive":z.addItem($=>{$.setTitle(E("Bulk restore")).setIcon("archive").onClick(async()=>{new fd(a,E("RESTORE"),async te=>{te==="confirm"&&await A()}).open()})}).addItem($=>{$.setTitle(E("Bulk delete")).setIcon("trash").onClick(async()=>{new fd(a,E("DELETE"),async te=>{te==="confirm"&&await I()}).open()})});break;case"/recycle":z.addItem($=>{$.setTitle(E("Bulk restore")).setIcon("archive-restore").onClick(async()=>{new fd(a,E("RESTORE"),async te=>{te==="confirm"&&await R()}).open()})}).addItem($=>{$.setTitle(E("Bulk delete")).setIcon("trash").onClick(async()=>{new fd(a,E("DELETE"),async te=>{te==="confirm"&&await k()}).open()})});break}z.showAtMouseEvent(U.nativeEvent)};return y.jsxs("div",{className:`filter-query-container ${w?"":"hidden"}`,children:[y.jsxs("div",{className:"filter-query",children:[y.jsx("span",{className:"tip-text",children:E("FILTER")}),y.jsxs("div",{"data-filter-type":"query",className:"filter-item-container "+(v?"":"hidden"),onClick:()=>{st.setMemoFilter("")},children:[y.jsx("span",{className:"icon-text",children:"🔖"})," ",v==null?void 0:v.title]}),y.jsxs("div",{"data-filter-type":"tag",className:"filter-item-container "+(u?"":"hidden"),onClick:()=>{st.setTagQuery("")},children:[y.jsx("span",{className:"icon-text",children:"🏷️"})," ",u]}),y.jsxs("div",{"data-filter-type":"type",className:"filter-item-container "+(f?"":"hidden"),onClick:()=>{st.setMemoTypeQuery("")},children:[y.jsx("span",{className:"icon-text",children:"📦"})," ",XF(f)]}),d&&d.from<d.to&&y.jsxs("div",{"data-filter-type":"date",className:"filter-item-container",children:[y.jsxs("div",{className:"day-picker-component-group",children:[y.jsx("span",{className:"icon-text",children:"🗓️"})," ",y.jsx(Cv,{type:"text",startOrEnd:"start",defaultValue:C.moment(d.from,"x").valueOf(),handleValueChange:U=>{const z=C.moment(d.to,"x"),$=C.moment(U,"x"),te=$.isAfter(z)||$.isSame(z);st.setFromAndToQuery(te?z.startOf("day").valueOf():C.moment(U,"x").startOf("day").valueOf(),d.to)}}),y.jsx("span",{children:E("to")}),y.jsx(Cv,{type:"text",startOrEnd:"end",defaultValue:C.moment(d.to,"x").add(1,"days").valueOf(),handleValueChange:U=>{const z=C.moment(d.from,"x"),$=C.moment(U,"x"),te=$.isBefore(z)||$.isSame(z),Q=C.moment(U,"x").endOf("day").valueOf();st.setFromAndToQuery(d.from,te?z.endOf("day").valueOf():Q)}})]}),y.jsx("div",{ref:U=>U&&C.setIcon(U,"x"),className:"btn close-btn",onClick:()=>{st.setFromAndToQuery(0,0)}})]}),y.jsxs("div",{className:"filter-item-container "+(m?"":"hidden"),onClick:()=>{st.setTextQuery("")},children:[y.jsx("span",{className:"icon-text",children:"🔍"})," ",m]})]}),y.jsxs("div",{className:"thino-filter-items",children:[e&&y.jsx("div",{className:"thinos-count",children:`${e?`${e} Thinos `:""}`}),y.jsx("div",{ref:D,className:"btn memo-action-menu",onClick:Z})]})]})},gd=async e=>{const{app:t,settings:n}=yt.getState();if(!n.startSync||!(t!=null&&t.loadLocalStorage("tokenForSync")))return;const r=await G6(e);if(!r||r.length===0)return;r.sort((a,u)=>C.moment(a.createdAt,"YYYY/MM/DD HH:mm:ss").isAfter(C.moment(u.createdAt,"YYYY/MM/DD HH:mm:ss"))?1:-1);const o=r.filter(a=>!a.deleted),i=r.filter(a=>a.deleted);for(let a=0;a<o.length;a++){const u=o[a],d=await je.createOrPatchThinoFromWeb(u);d&&je.pushMemo(d)}for(let a=0;a<i.length;a++){const u=i[a],d=je.getMemoByWebId(u.id);d&&await je.deleteMemoById(d.id,"local")}je.updateTagsState(),zee(t)};function Yee(){const{settings:e,app:t,view:n}=yt.getState(),{globalState:{loaded:r,memoListView:o}}=F.useContext(Ot),i=C.Platform.isMobile&&e.DefaultEditorLocation==="Bottom",a=se.useRef(null),[u,d]=se.useState([]);F.useEffect(()=>{if(!t||!r||!n||!(t==null?void 0:t.loadLocalStorage("tokenForSync"))||!e.startSync)return;a.current=window.setInterval(async()=>{const v=b1(t);await gd(v)},3e4),n.registerInterval(a.current);const g=b1(t);return gd(g),()=>{a.current&&window.clearInterval(a.current)}},[n,t,r,e.startSync]);const f=[y.jsx(xg,{thinosCount:u.length,thinos:u},"filter"),y.jsx(Cee,{updateThinos:m=>{d(m)}},"list")];return y.jsx(y.Fragment,{children:o==="chat"?y.jsx(y.Fragment,{children:[y.jsx(vv,{syncThino:gd},"header"),...f.reverse(),y.jsx(Sd,{className:"mod-editor-bottom",editorType:"inline"},"editor")]}):y.jsx(y.Fragment,{children:i?[y.jsx(vv,{syncThino:gd},"header"),...f,y.jsx(Sd,{className:"mod-editor-bottom",editorType:"block"},"editor")]:[y.jsx(vv,{syncThino:gd},"header"),y.jsx(Sd,{editorType:"block"},"editor"),...f]})})}function Uee(e){try{e!=null&&e.saveLocalStorage&&(e==null||e.saveLocalStorage("thinoLastUpdated",C.moment("2000-01-01 00:01:00","YYYY-MM-DD HH:mm:ss").format("x")))}catch(t){console.error(t)}}function b1(e){try{const t=(e==null?void 0:e.loadLocalStorage)&&(e==null?void 0:e.loadLocalStorage("thinoLastUpdated"));return t||C.moment("2000-01-01 00:01:00","YYYY-MM-DD HH:mm:ss").format("x")}catch(t){return console.error(t),C.moment().format("x")}}function zee(e){try{e!=null&&e.saveLocalStorage&&(e==null||e.saveLocalStorage("thinoLastUpdated",C.moment().format("x")))}catch(t){console.error(t)}}function $h(e=!0){const[t,n]=F.useState({isLoading:e,isFailed:!1,isSucceed:!1,isPending:!1});return{...t,setLoading:()=>{n({...t,isLoading:!0,isFailed:!1,isPending:!1,isSucceed:!1})},setFinish:()=>{n({...t,isLoading:!1,isFailed:!1,isPending:!1,isSucceed:!0})},setError:()=>{n({...t,isLoading:!1,isFailed:!0,isPending:!1,isSucceed:!1})},setPending:()=>{n({...t,isLoading:!1,isFailed:!1,isPending:!0,isSucceed:!1})}}}const Vee={text:E("SELECT"),value:""},Wee=e=>{const{className:t,dataSource:n,handleValueChanged:r,value:o}=e,[i,a]=ml(!1),u=F.useRef(null);let d=Vee;for(const g of n)if(g.value===o){d=g;break}F.useEffect(()=>{if(i){const g=v=>{var w;(w=u.current)!=null&&w.contains(v.target)||a(!1)};window.addEventListener("click",g,{capture:!0,once:!0})}},[i]);const f=g=>{r&&r(g.value),a(!1)},m=g=>{g.stopPropagation(),a()};return y.jsxs("div",{className:`selector-wrapper ${t||""}`,ref:u,children:[y.jsxs("div",{className:`current-value-container ${i?"active":""}`,onClick:m,children:[y.jsx("span",{className:"value-text",children:d.text}),y.jsx("span",{ref:g=>{g&&C.setIcon(g,"chevron-right")},className:"btn arrow-text"})]}),y.jsx("div",{className:`items-wrapper ${i?"":"hidden"}`,children:n.map(g=>y.jsx("div",{className:`item-container ${g.value===o?"selected":""}`,onClick:()=>{f(g)},children:g.text},g.value))})]})},oh=F.memo(Wee),HS=e=>{const{destroy:t,queryId:n,type:r="dialog"}=e,[o,i]=F.useState(""),[a,u]=F.useState(r!=="dialog"?[sT()]:[]),d=$h(!1),[f,m]=F.useState(!1),[g,v]=ml(!1),w=je.getState().memos.filter(L=>!(L.deletedAt!==""&&L.deletedAt)).filter(L=>jh(L,a)).length;F.useEffect(()=>{D()},[n]);const D=()=>{const L=tn.getQueryById(n??"");if(L){i(L.title);const Z=JSON.parse(L.querystring);return Array.isArray(Z)&&u(Z),L}},T=L=>{const Z=L.target.value;i(Z)},I=async()=>{if(!o)return new C.Notice(E("TITLE CANNOT BE NULL!")),null;if(a.length===0)return new C.Notice(E("FILTER CANNOT BE NULL!")),null;if(a.length===1&&a[a.length-1].value.value==="")return new C.Notice(E("Please finish the last filter setting first")),null;let L;try{n&&!n.startsWith("Filter [Temp] ")?(L=await tn.updateQuery(n,o,JSON.stringify(a)),tn.editQuery(L),await tn.getMyAllQueries()):(L=await tn.createQuery(o,JSON.stringify(a)),tn.pushQuery(L),await tn.getMyAllQueries())}catch(Z){new C.Notice(Z.message)}return L},k=async()=>{switch(r){case"modal":case"inline":if(a.length===0){new C.Notice(E("FILTER CANNOT BE NULL!"));return}if(a.length===1&&a[a.length-1].value.value===""){new C.Notice(E("Please finish the last filter setting first"));return}try{const L=tn.getQueryById(n??"");if(L&&JSON.stringify(a)===L.querystring){st.setMemoFilter(L.id),t();return}const Z=tn.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify(a));tn.pushQuery(Z),st.setMemoFilter(Z.id)}catch(L){new C.Notice(L.message)}t();break;case"dialog":try{if(!await I())return}catch(L){console.error(L),new C.Notice(L.message)}t();break}},A=()=>{if(a.length===0){new C.Notice(E("FILTER CANNOT BE NULL!"));return}if(f){st.setMemoFilter(""),m(!1);return}const L=tn.getQueryById(n??"");if(L&&JSON.stringify(a)===L.querystring){st.setMemoFilter(L.id);return}const Z=tn.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify(a));tn.pushQuery(Z),st.setMemoFilter(Z.id),e.setPreview&&e.setPreview(Z.id),m(!0)},R=()=>{if(a.length>0&&a[a.length-1].value.value===""){new C.Notice(E("Please finish the last filter setting first"));return}u([...a,sT()])},j=F.useCallback((L,Z)=>{u(U=>{const z=[...U];return z[L]=Z,z})},[]),B=F.useCallback(L=>{u(Z=>Z.filter((z,$)=>$!==L))},[]);return y.jsxs(y.Fragment,{children:[r==="dialog"&&y.jsxs("div",{className:"dialog-header-container",children:[y.jsxs("span",{className:"title-text",children:[y.jsx("span",{className:"icon-text",children:"🔖"}),E(n?"EDIT QUERY":"CREATE QUERY")]}),y.jsx("button",{ref:L=>{L&&C.setIcon(L,"x")},className:"btn close-btn",onClick:t})]}),y.jsxs("div",{className:"dialog-content-container",children:[(r==="dialog"||g)&&y.jsxs("div",{className:"form-item-container input-form-container",children:[y.jsx("span",{className:"normal-text",children:E("TITLE")}),y.jsx("input",{className:"title-input",type:"text",value:o,onChange:T})]}),y.jsxs("div",{className:"form-item-container filter-form-container",children:[y.jsx("span",{className:"normal-text",children:E("FILTER")}),y.jsxs("div",{className:"filters-wrapper",children:[a.map((L,Z)=>y.jsx($ee,{index:Z,filter:L,handleFilterChange:j,handleFilterRemove:B},Z)),y.jsx("div",{className:"create-filter-btn",onClick:R,children:E("ADD FILTER TERMS")})]})]})]}),y.jsx("div",{className:"dialog-footer-container",children:y.jsxs("div",{className:"btns-container",children:[(r==="inline"||r==="modal")&&y.jsx("button",{className:`btn ${g?"mod-cta":"save-btn"}`,onClick:async()=>{if(!g)v();else{const L=await I();v(!1),t(),L&&st.setMemoFilter(L.id)}},children:E(g?"Set and save":"Save")}),y.jsxs("div",{className:"btns-group-container",children:[y.jsxs("span",{className:`tip-text ${a.length===0&&"hidden"}`,children:[E("MATCH")," Thino ",y.jsx("strong",{children:w})," ",E("TIMES")]}),y.jsx(y.Fragment,{children:r==="inline"&&y.jsx("button",{className:"btn mod-cta",onClick:A,children:E("Preview")})}),y.jsx("button",{className:`btn save-btn ${d.isLoading?"requesting":""}`,onClick:k,children:E(r==="inline"||r==="modal"?"Filter":n?"EDIT":"Save")})]})]})})]})},Zee=e=>{const{index:t,filter:n,handleFilterChange:r,handleFilterRemove:o}=e,{type:i}=n,a=F.useRef(null),u=F.useRef(null),d=F.useRef(n),f=F.useRef(i);F.useEffect(()=>{d.current=e.filter},[n]),F.useEffect(()=>{if(a.current)return i==="TAG"&&!u.current&&(f.current=i,u.current=new Pm(a.current,w)),()=>{u.current&&(u.current.destroy(),u.current=null)}},[a,i]);const m=F.useCallback(I=>{["AND","OR"].includes(I)&&r(t,{...n,relation:I})},[n]),g=F.useCallback(async I=>{var k;if(n.type!==I){const{verifyState:A}=yt.getState(),R=!C.Platform.isDesktop&&await((k=window.Capacitor)==null?void 0:k.Plugins.Device.getId()),j=C.Platform.isDesktop?await Jn():R.identifier||R.uuid,B=A&&(A==null?void 0:A.appId)===j;if(I==="SOURCE"&&!B){Fn();return}const L=Object.values(ec[I].operators);r(t,{...n,type:I,value:{operator:L[0].value,value:""}})}},[n]),v=F.useCallback(I=>{r(t,{...n,value:{...n.value,operator:I}})},[n]),w=F.useCallback(I=>{r(t,{...d.current,value:{...d.current.value,value:I}})},[n]),D=()=>{o(t)},T={TYPE:y.jsx(oh,{className:"value-selector",dataSource:ec.TYPE.values,value:n.value.value,handleValueChanged:w}),LIST:y.jsx(oh,{className:"value-selector",dataSource:ec.LIST.values,value:n.value.value,handleValueChanged:w}),SOURCE:y.jsx(oh,{className:"value-selector",dataSource:ec.SOURCE.values,value:n.value.value,handleValueChanged:w}),TAG:y.jsx("input",{type:"text",id:Math.random().toString(36).substring(7),className:"value-inputer",ref:a,value:n.value.value,onChange:I=>{w(I.target.value)}}),TEXT:y.jsx("input",{type:"text",className:"value-inputer",value:n.value.value,onChange:I=>{w(I.target.value)}}),DATE:y.jsxs("div",{className:"date-inputer",children:[y.jsx(Cv,{type:"icon",handleValueChange:w}),y.jsx("input",{type:"text",className:"value-inputer",value:n.value.value,onChange:I=>{w(I.target.value)}})]})};return y.jsxs("div",{className:"memo-filter-input-wrapper",children:[t>0&&y.jsx(oh,{className:"relation-selector",dataSource:QF,value:n.relation,handleValueChanged:m}),y.jsx(oh,{className:"type-selector",dataSource:Object.values(ec),value:n.type,handleValueChanged:g}),y.jsxs(y.Fragment,{children:[Object.keys(ec).includes(i)&&y.jsx(oh,{className:"operator-selector",dataSource:Object.values(ec[i].operators),value:n.value.operator,handleValueChanged:v}),T[i]]}),y.jsx("div",{ref:I=>{I&&C.setIcon(I,"x")},className:"btn remove-btn",onClick:D})]})},$ee=F.memo(Zee);function S1(e){l0({className:"create-query-dialog"},HS,{queryId:e})}const YS=e=>{var w,D;const{dailyNotesState:{app:t,verifyState:n},locationState:{query:r}}=F.useContext(Ot),o=se.useRef(null),[i,a]=se.useState(!1),u=se.useRef(null),[d,f]=se.useState(""),m=p0(o.current,u.current,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,10]}}]});F.useEffect(()=>{i&&m.update&&(m==null||m.update())},[i]),F.useEffect(()=>{o&&C.setIcon(o.current,"filter")},[o]);const g=async()=>{var k;const T=!C.Platform.isDesktop&&await((k=window.Capacitor)==null?void 0:k.Plugins.Device.getId()),I=C.Platform.isDesktop?await Jn():T.identifier||T.uuid;return!n||(n==null?void 0:n.appId)!==I?(Fn(),!1):!0};return cg(u,()=>{a(!1),d&&st.getState().query.filter===d&&st.setMemoFilter("")}),y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"thino-inline-filter-wrapper pro",ref:o,onClick:async()=>{await g()&&(C.Platform.isDesktop?(a(!i),await(m==null?void 0:m.update())):new qee(yt.getState().app,r.filter,I=>{f(I)}).open())}}),y.jsx("div",{ref:u,className:`thino-inline-filter-container ${i?"":"hidden"}`,style:m.styles.popper,children:i&&y.jsx(HS,{type:"inline",queryId:(w=r.filter)!=null&&w.startsWith("Filter [Temp] ")&&!((D=r.filter)!=null&&D.includes("Filter [Temp]"))?"":r.filter,destroy:()=>{a(!1)},setPreview:T=>{f(T)}})})]})};class qee extends C.Modal{constructor(n,r,o){super(n);De(this,"root");De(this,"setPreview");this.filter=r,this.setPreview=o}onOpen(){var r,o;const{contentEl:n}=this;this.root=sg(n),this.root.render(y.jsx(Ra,{store:_e,context:Ot,children:y.jsx("div",{className:"thino-inline-filter-container",children:y.jsx(HS,{type:"modal",queryId:(r=this.filter)!=null&&r.startsWith("Filter [Temp] ")&&!((o=this.filter)!=null&&o.includes("Filter [Temp]"))?"":this.filter,destroy:()=>{this.close()},setPreview:i=>{this.setPreview(i)}})})}))}onClose(){var n;(n=this.root)==null||n.unmount()}}const P3=()=>{const{dailyNotesState:{app:e},globalState:{isMobileView:t,showSiderbarInMobileView:n}}=F.useContext(Ot),[r]=F.useState(se.createRef());F.useEffect(()=>{if(!r.current)return;const i=r.current;C.setIcon(i,"refresh-cw")},[r.current]);const o=F.useCallback(async()=>{if(!(t&&n)){if(gd){const i=b1(e);await gd(i)}await je.fetchAllMemos()}},[]);return y.jsx("span",{className:"refresh-icon",ref:r,onClick:()=>{o(),r&&r.current.firstElementChild.toggleClass("rotate-hidden",!0),setTimeout(()=>{r&&r.current.firstElementChild.toggleClass("rotate-hidden",!1)},1e3)}})},vv=()=>{const{locationState:{query:{filter:e}},globalState:{isMobileView:t},queryState:{queries:n}}=F.useContext(Ot),[r,o]=F.useState("THINO");F.useEffect(()=>{const a=tn.getQueryById(e);o(a?a.title:"THINO")},[e,n]);const i=F.useCallback(a=>{a.stopPropagation(),dt.setShowSiderbarInMobileView(!0)},[]);return y.jsxs("div",{className:"section-header-container memos-header-container",children:[y.jsxs("div",{className:"title-text",children:[y.jsx(Aa,{when:t,children:y.jsx("button",{ref:a=>{a&&C.setIcon(a,"menu")},className:"btn action-btn clickable-icon",onClick:i})}),y.jsx("span",{className:"normal-text",children:r}),y.jsx(P3,{})]}),y.jsxs("div",{className:"memos-header-search-section",children:[y.jsx(c5,{}),y.jsx(u5,{}),y.jsx(YS,{}),y.jsx(lg,{})]})]})},Gee=()=>{const{dailyNotesState:{settings:e,app:t,verifyState:n},globalState:{manifest:r,showSiderbarInMobileView:o,isMobileView:i}}=F.useContext(Ot),[a,u]=F.useState("Memos"),[d,f]=F.useState(!1),[m,g]=F.useState("");F.useEffect(()=>{if(!(e!=null&&e.MomentsIcon)||!t)return;const D=t.vault.adapter.getResourcePath(C.normalizePath(e.MomentsIcon));D&&!(e!=null&&e.MomentsIcon.startsWith("http"))?g(D):g(e==null?void 0:e.MomentsIcon)},[e==null?void 0:e.MomentsIcon,t]),F.useEffect(()=>{e&&u(e.UserName)},[e]);const v=F.useCallback(()=>{st.pushHistory("/"),st.clearQuery()},[]),w=()=>{const D=document.querySelector(".memos-sidebar-wrapper"),T=document.querySelector(".menu-btns-popup");T.style.top=70-D.scrollTop+"px",f(!0)};return y.jsxs("div",{className:"user-banner-container",children:[y.jsxs("div",{className:"userinfo-header-container",children:[y.jsxs("div",{className:"userinfo-container",onClick:()=>{t.setting.open(),t.setting.openTabById(r.id||"obsidian-memos")},children:[y.jsx("div",{ref:D=>{if(m){D==null||D.empty();return}m||D&&C.setIcon(D,"Memos")},className:"thino-user-icon",style:{backgroundImage:`url("${m}")`}}),y.jsxs("div",{className:"thino-user-info",children:[y.jsxs("span",{className:"username-container",children:[y.jsx("span",{"aria-label":a==="MEMO 😉"?"THINO 😉":a||"THINO",className:"username-text",onClick:v,children:a==="MEMO 😉"?"THINO 😉":a||"THINO"}),y.jsx("span",{className:`user-pro-badge ${n?"activated":""}`,onClick:()=>{t.setting.open(),t.setting.openTabById(r.id||"obsidian-memos")},children:"PRO"})]}),(e==null?void 0:e.MomentsQuote)&&y.jsx("span",{className:"thino-user-quote",children:e==null?void 0:e.MomentsQuote})]})]}),y.jsxs("span",{className:"btn-group",children:[(e==null?void 0:e.DefaultThemeForThino)==="modern"&&!i&&y.jsx(P3,{}),y.jsx("span",{ref:D=>{D&&D.hasChildNodes()||D&&C.setIcon(D,"more-horizontal")},className:"btn action-btn menu-popup-btn",onClick:w}),o&&y.jsx("span",{ref:D=>{D&&D.hasChildNodes()||D&&C.setIcon(D,"x")},className:"btn action-btn",onClick:()=>{dt.setShowSiderbarInMobileView(!1)}})]}),y.jsx($F,{shownStatus:d,setShownStatus:f})]}),y.jsx($1,{statusType:"banner"})]})},xI=()=>{const{queryState:{queries:e},dailyNotesState:{app:t},locationState:{query:{filter:n}}}=F.useContext(Ot),r=$h(),[o,i]=F.useState([]);return F.useEffect(()=>{const a=e.filter(u=>{var d,f;return!((d=u.id)!=null&&d.toString().startsWith("Filter [Temp]"))&&!((f=u.id)!=null&&f.toString().includes("Filter [Temp]"))}).sort((u,d)=>{if(d.pinnedAt&&!u.pinnedAt)return 1;if(u.pinnedAt&&!d.pinnedAt)return-1;const f=ut.getTimeStampByDate(u.pinnedAt||u.createdAt);return ut.getTimeStampByDate(d.pinnedAt||d.createdAt)-f});i(a)},[e]),F.useEffect(()=>{tn.getMyAllQueries().catch(()=>{}).finally(()=>{r.setFinish()})},[t]),y.jsxs("div",{className:"queries-wrapper",children:[y.jsxs("span",{className:"title-text",children:[y.jsx("span",{className:"normal-text",children:E("QUERY")}),y.jsx("span",{ref:a=>{a&&C.setIcon(a,"plus")},className:"btn create-query-btn",onClick:()=>S1()})]}),y.jsx(Aa,{when:r.isSucceed&&o.length===0,children:y.jsx("div",{className:"create-query-btn-container",children:y.jsx("span",{className:"btn",onClick:()=>S1(),children:E("CREATE FILTER")})})}),y.jsx("div",{className:"queries-container",children:o.map(a=>y.jsx(Jee,{query:a,isActive:a.id===n},`${a.id}-${C.moment(a.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}`))})]})},Jee=e=>{const{query:t,isActive:n}=e,[r,o]=ml(!1),[i,a]=ml(!1),u=()=>{st.setMemoFilter(n?"":t.id)},d=T=>{T.stopPropagation(),o()},f=()=>{o(!1)},m=async T=>{if(T.stopPropagation(),i)try{await tn.deleteQuery(t.id)}catch(I){new C.Notice(I.message)}else a()},g=T=>{T.stopPropagation(),S1(t.id)},v=async T=>{T.stopPropagation();try{t.pinnedAt?await tn.unpinQuery(t.id):await tn.pinQuery(t.id),tn.editQuery({...t,pinnedAt:t.pinnedAt?"":ut.getDateTimeString(Date.now())})}catch(I){console.error(I)}},w=()=>{a(!1)},D=F.useMemo(()=>y.jsxs("div",{className:"action-btns-container",children:[y.jsxs("span",{className:"btn",onClick:v,children:[y.jsx("span",{ref:T=>{T&&C.setIcon(T,t.pinnedAt?"pin-off":"pin")},className:"icon-text"}),y.jsx("span",{className:"normal-text",children:t.pinnedAt?E("UNPIN"):E("PIN")})]}),y.jsxs("span",{className:"btn",onClick:g,children:[y.jsx("span",{ref:T=>{T&&!T.hasChildNodes()&&C.setIcon(T,"edit")},className:"icon-text"}),y.jsx("span",{className:"normal-text",children:E("EDIT")})]}),y.jsxs("span",{className:`btn delete-btn ${i?"final-confirm":""}`,onClick:m,onMouseLeave:w,children:[y.jsx("span",{ref:T=>{T&&!T.hasChildNodes()&&C.setIcon(T,"trash-2")},className:"icon-text"}),y.jsx("span",{className:"normal-text",children:E(i?"CONFIRM!":"DELETE")})]})]}),[t.pinnedAt,i]);return y.jsx(y.Fragment,{children:y.jsxs("div",{className:`query-item-container ${n?"active":""}`,onClick:u,children:[y.jsxs("div",{className:"query-text-container",children:[y.jsx("span",{ref:T=>{T&&!T.hasChildNodes()&&C.setIcon(T,"filter")},className:"icon-text"}),y.jsxs("span",{className:"query-text",children:[t.title,t.pinnedAt&&" 📌"]})]}),y.jsxs("div",{className:"btns-container",children:[y.jsx("span",{ref:T=>{T&&!T.hasChildNodes()&&C.setIcon(T,"more-horizontal")},className:"btn action-btn toggle-btn",onClick:d}),y.jsx("div",{className:`action-btns-wrapper ${r?"":"hidden"}`,onMouseLeave:f,children:D})]})]})})},EI=()=>{var v,w;const{locationState:{query:{tag:e,filter:t}},dailyNotesState:{app:n},memoState:{tags:r,tagsNum:o,memos:i}}=F.useContext(Ot),a=t&&((v=t==null?void 0:t.toString())==null?void 0:v.startsWith("Filter [Temp] "))&&tn.getQueryById(t),[u,d]=F.useState([]),[f,m]=F.useState(((w=n||app)==null?void 0:w.loadLocalStorage("thino-tag-sort-order"))||"alphabetical");F.useEffect(()=>{var T;const D=(T=n||app)==null?void 0:T.loadLocalStorage("thino-temp-tags");d(D||[])},[]),F.useEffect(()=>{je.updateTagsState()},[i]),F.useEffect(()=>{const D=Array.from(r).sort(),T={subTags:[]};for(const I of D){const k=I.split("/");let A=T,R="";for(let j=0;j<k.length;j++){const B=k[j];R+=j===0?B:"/"+B;let L=A.subTags.find(Z=>Z.text===R);if(L||(L={key:B,text:R,count:o[R]||0,subTags:[],parent:A},A.subTags.push(L)),j===k.length-1){let Z=L.parent;for(;Z;)Z.count||(Z.count=0),Z.count+=o[R]||0,Z=Z.parent}A=L}}d(T.subTags)},[r]),F.useEffect(()=>{var D;je.initialized&&((D=n||app)==null||D.saveLocalStorage("thino-temp-tags",u))},[u]);const g=D=>{D.stopPropagation();const T=new C.Menu;for(const I of["alphabetical","alphabeticalReverse","byCount","byCountReverse"])T.addItem(k=>{k.setTitle(E(I)).onClick(()=>{m(I),n==null||n.saveLocalStorage("thino-tag-sort-order",I)}).setChecked(f===I)}),I==="alphabeticalReverse"&&T.addSeparator();T.showAtMouseEvent(D.nativeEvent)};return y.jsxs("div",{className:"tags-wrapper",children:[y.jsxs("div",{className:"tags-header title-text",children:[y.jsx("span",{className:"normal-text",children:E("Frequently Used Tags")}),y.jsx("span",{ref:D=>{D&&C.setIcon(D,"arrow-down-narrow-wide")},className:"tags-sort-btn",onClick:g})]}),y.jsxs("div",{className:"tags-container",children:[u.sort(Kee(f)).map((D,T)=>y.jsx(O3,{tag:D,tagQuery:e,filterQuery:a},D.text+"-"+T)),y.jsx(Aa,{when:u.length<5&&je.initialized,children:y.jsxs("span",{className:"tag-tip-container",children:[E("Input")," ",y.jsxs("span",{className:"code-text",children:[E("#Tag")," "]}),E("to create tag"),"..."]})})]})]})},O3=e=>{const{tag:t,tagQuery:n,filterQuery:r}=e,o=n===t.text||r&&JSON.parse(r.querystring).find(m=>m.type==="TAG"&&m.value.value===t.text),i=t.subTags.length>0,[a,u]=ml(!1),d=async m=>{var g;if(m.ctrlKey||m.metaKey){const{verifyState:v}=yt.getState(),w=!C.Platform.isDesktop&&await((g=window.Capacitor)==null?void 0:g.Plugins.Device.getId()),D=C.Platform.isDesktop?await Jn():w.identifier||w.uuid;if(!(v&&(v==null?void 0:v.appId)===D)){Fn();return}const I=st.getState().query.filter;if(I&&(I!=null&&I.startsWith("Filter [Temp] "))){const A=tn.getQueryById(I).querystring,R=JSON.parse(A);let j;if(R.some(B=>B.type==="TAG"&&B.value.value===t.text)){if(j=R.filter(L=>L.value.value!==t.text),j.length===0){st.setMemoFilter("");return}const B=tn.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([{...j[0],relation:"AND"},...j.slice(1)]));tn.pushQuery(B),st.setMemoFilter(B.id)}else{j=[...R,{type:"TAG",value:{value:t.text,operator:"CONTAIN"},relation:"OR"}];const B=tn.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify(j));tn.pushQuery(B),st.setMemoFilter(B.id)}}else if(n){st.setTagQuery("");const k=tn.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([{type:"TAG",value:{value:n,operator:"CONTAIN"},relation:"AND"},{type:"TAG",value:{value:t.text,operator:"CONTAIN"},relation:"OR"}]));tn.pushQuery(k),st.setMemoFilter(k.id)}else if(!n){const k=tn.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([{type:"TAG",value:{value:t.text,operator:"CONTAIN"},relation:"AND"}]));tn.pushQuery(k),st.setMemoFilter(k.id)}ut.copyTextToClipboard(`#${t.text} `),["/","/recycle","/archive","/daily"].includes(st.getState().pathname)||st.setPathname("/");return}if(o){if(st.setTagQuery(""),r){const w=JSON.parse(r.querystring).filter(T=>T.value.value!==t.text);if(w.length===0){st.setMemoFilter("");return}const D=tn.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([{...w[0],relation:"AND"},...w.slice(1)]));tn.pushQuery(D),st.setMemoFilter(D.id)}}else await ut.copyTextToClipboard(`#${t.text} `),["/","/recycle","/archive","/daily"].includes(st.getState().pathname)||st.setPathname("/"),st.setTagQuery(t.text)},f=m=>{m.stopPropagation(),u()};return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:`tag-item-container ${o?"active":""}`,onClick:d,children:[y.jsxs("div",{className:"tag-text-container",children:[y.jsx("span",{ref:m=>{m&&C.setIcon(m,"hash")},className:"btn tag-btn"}),y.jsx("span",{className:"tag-text",children:t.key})]}),y.jsxs("div",{className:"btns-container",children:[y.jsx("span",{className:"tag-count",children:t.count}),i?y.jsx("span",{ref:m=>{m&&C.setIcon(m,"chevron-right")},className:`btn action-btn toggle-btn ${a?"shown":""}`,onClick:f}):null]})]}),i?y.jsx("div",{className:`subtags-container ${a?"":"hidden"}`,children:t.subTags.map((m,g)=>y.jsx(O3,{tag:m,tagQuery:n},m.text+"-"+g))}):null]})},CI=new Intl.Collator(void 0,{usage:"sort",sensitivity:"base",numeric:!0}).compare,Sb={alphabetical:(e,t)=>CI(e.text,t.text),alphabeticalReverse:(e,t)=>-CI(e.text,t.text),byCount:(e,t)=>t.count-e.count,byCountReverse:(e,t)=>e.count-t.count},Kee=(e="byCount")=>Sb.hasOwnProperty(e)?Sb[e]:Sb.alphabetical,MI=()=>{const{dailyNotesState:{app:e,settings:t,verifyState:n}}=F.useContext(Ot),r=[{name:E("Random Review"),path:"/review",iconID:"star"},{name:E("ARCHIVE"),path:"/archive",iconID:"archive"},{name:E("Recycle bin"),path:"/recycle",iconID:"recycle"}],o=F.useRef([]);return F.useEffect(()=>{o.current.forEach((i,a)=>{i&&C.setIcon(i,r[a].iconID)})},[t,o]),y.jsx(y.Fragment,{children:y.jsx("div",{className:"path-entry-wrapper",children:r.map((i,a)=>y.jsx(y.Fragment,{children:y.jsxs("div",{className:`path-entry-container ${st.getState().pathname===i.path?"active":""} ${t.DeleteThinoDirectly&&i.path==="/recycle"?"hidden":""} ${i.path==="/review"&&"pro"}`,onClick:async()=>{var f;const u=!C.Platform.isDesktop&&await((f=window.Capacitor)==null?void 0:f.Plugins.Device.getId()),d=C.Platform.isDesktop?await Jn():u.identifier||u.uuid;if(!n&&(n==null?void 0:n.appId)!==d&&i.path==="/review"){Fn();return}if(st.setPathname(i.path),i.path==="/review"&&st.getState().pathname==="/review"){e.workspace.trigger("refresh-review-memos");return}st.clearQuery()},children:[y.jsx("span",{ref:u=>o.current[a]=u,className:"path-entry-icon"}),y.jsx("span",{className:"path-entry-text",children:i.name})]},a)}))})})},kI=e=>{const{dailyNotesState:{settings:t},locationState:n,globalState:{isMobileView:r,showSiderbarInMobileView:o}}=F.useContext(Ot),i=F.useRef(null),a=F.useMemo(()=>u=>{var f,m,g;const d=dt.getState().showSiderbarInMobileView;if(!d){window.removeEventListener("click",a,{capture:!0});return}(f=i.current)!=null&&f.contains(u.target)||(g=(m=i.current)==null?void 0:m.parentNode)!=null&&g.contains(u.target)&&(d&&u.stopPropagation(),dt.setShowSiderbarInMobileView(!1),window.removeEventListener("click",a,{capture:!0}))},[]);return F.useEffect(()=>{dt.setShowSiderbarInMobileView(!1)},[n]),F.useEffect(()=>{o?document.body.classList.add(DD):document.body.classList.remove(DD)},[o]),F.useEffect(()=>{r&&o&&window.addEventListener("click",a,{capture:!0})},[r,o]),y.jsxs("aside",{className:Kn("memos-sidebar-wrapper",e.className),ref:i,children:[e.children,y.jsx(Gee,{}),(t==null?void 0:t.DefaultThemeForThino)==="modern"&&!r?(e==null?void 0:e.sidebarPosition)==="right"?y.jsx(jm,{}):null:y.jsx(jm,{}),(t==null?void 0:t.DefaultThemeForThino)==="modern"&&!r?(e==null?void 0:e.sidebarPosition)==="left"?y.jsxs(y.Fragment,{children:[y.jsx(MI,{}),y.jsx(xI,{}),y.jsx($1,{statusType:"sidebar"})]}):null:y.jsxs(y.Fragment,{children:[y.jsx(MI,{}),y.jsx(xI,{})]}),(t==null?void 0:t.DefaultThemeForThino)==="modern"&&!r?(e==null?void 0:e.sidebarPosition)==="right"?y.jsx(y.Fragment,{children:y.jsx(EI,{})}):null:y.jsx(y.Fragment,{children:y.jsx(EI,{})})]})},Qee=()=>{const{dailyNotesState:{settings:e}}=F.useContext(Ot),[t,n]=se.useState(""),r=o=>{n(o.target.value)};return y.jsx("div",{className:"locked-screen-wrapper",children:y.jsxs("div",{className:"locked-screen-content",children:[y.jsx("div",{className:"locked-screen-header",children:y.jsx("div",{className:"locked-screen-header-title",children:E("Locked")})}),y.jsx("div",{className:"locked-screen-body",children:y.jsxs("div",{className:"locked-screen-body-content",children:[y.jsxs("div",{className:"locked-screen-body-content-text",children:[y.jsx("div",{className:"locked-screen-body-content-text-title",children:E("Thino is locked")}),y.jsx("div",{className:"locked-screen-body-content-text-desc",children:E("Please unlock Thino by input password")})]}),y.jsxs("div",{className:"locked-screen-body-content-inputer",children:[y.jsx("input",{onKeyDown:o=>{o.key==="Enter"&&((e==null?void 0:e.password)===t?dt.setLocked(!1):new C.Notice(E("Password is incorrect")))},onChange:r,value:t,type:"password",className:"locked-screen-body-content-input"}),y.jsx("button",{className:"locked-screen-body-content-btn",onClick:()=>{(e==null?void 0:e.password)===t?dt.setLocked(!1):new C.Notice(E("Password is incorrect"))},children:E("Unlock")})]})]})})]})})};class hd extends gC{fuzzySearchItemsOptimized(t,n){const r=C.prepareFuzzySearch(t);return n.map(o=>{const i=r(o.path);return i?{item:o,match:i,score:i.score}:null}).sort((o,i)=>(i==null?void 0:i.score)-(o==null?void 0:o.score)).filter(Boolean)}getSuggestions(t){const r=app.vault.getFiles().filter(i=>["png","jpg","jpeg","gif"].includes(i.extension)),o=t.toLowerCase();return this.fuzzySearchItemsOptimized(o,r).map(i=>i.item)}renderSuggestion(t,n){var i;const r=t.basename,o=((i=t.parent)==null?void 0:i.path)||"";n.toggleClass("thino-image-suggest-item",!0),n.createSpan({cls:"suggestion-name",text:r}),n.createSpan({cls:"suggestion-path",text:o})}selectSuggestion(t){this.inputEl.value=t.path,this.inputEl.trigger("input"),this.close()}}const Xee=e=>{const{dailyNotesState:{settings:t,app:n,plugin:r},globalState:{manifest:o}}=F.useContext(Ot),[i,a]=se.useState(0),[u,d]=se.useState(""),f=se.useRef(null),m=se.useRef(null),[g,v]=se.useState({enabled:!1,path:"",format:""});F.useEffect(()=>{if(i===2&&(t!=null&&t.EnabledLocationList.find(I=>I.value==="DAILY")))if(!Mm())v({enabled:!1,path:"",format:""});else{const I=oc().folder,k=oc().format;v({enabled:!0,path:I,format:k})}},[i]),F.useEffect(()=>{if(!(t!=null&&t.MomentsIcon)||!n){d("");return}const I=n.vault.adapter.getResourcePath(C.normalizePath(t.MomentsIcon));I&&!(t!=null&&t.MomentsIcon.startsWith("http"))?d(I):d(t==null?void 0:t.MomentsIcon)},[t==null?void 0:t.MomentsIcon,n]),F.useEffect(()=>{m&&(m.current=null)},[i]),F.useEffect(()=>{f.current&&(m.current||(m.current=new hd(f.current)))},[f.current]);const w=(I,k)=>{let A=r;A||(A=n.plugins.getPlugin("obsidian-memos")),A.settingTab.updateSettings(I,k)},D=F.useMemo(()=>{switch(i){case 0:return y.jsxs(y.Fragment,{children:[y.jsx("h1",{children:E("Get started with Thino")}),y.jsx("p",{children:E("Set up your user info for Thino.")})]});case 1:return y.jsxs(y.Fragment,{children:[y.jsx("h1",{children:E("Set theme for Thino")}),y.jsx("p",{children:E("Choose a theme for Thino.")})]});case 2:return y.jsxs(y.Fragment,{children:[y.jsx("h1",{children:E("Go with daily note plugin")}),y.jsx("p",{children:E("If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.")})]});case 3:return y.jsxs(y.Fragment,{children:[y.jsx("h1",{children:E("Set preferences for using Thino")}),y.jsx("p",{children:E("Adjust settings that influence your user experience with Thino.")})]});case 4:return y.jsxs(y.Fragment,{children:[y.jsx("h1",{children:E("Congrats! All settings done")}),y.jsx("p",{children:E("Go and enjoy Thino")})]})}},[i]),T=()=>{switch(i){case 0:return y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"thino-user-preview-wrapper",children:y.jsxs("div",{className:"userinfo-container",onClick:()=>{n.setting.open(),n.setting.openTabById(o.id||"obsidian-memos")},children:[y.jsx("div",{ref:I=>{if(t!=null&&t.MomentsIcon){I==null||I.empty();return}t!=null&&t.MomentsIcon||I&&C.setIcon(I,"Memos")},className:"thino-user-icon",style:{backgroundImage:`url("${u}")`}}),y.jsxs("div",{className:"thino-user-info",children:[y.jsx("span",{className:"username-container",children:y.jsx("span",{"aria-label":(t==null?void 0:t.UserName)==="MEMO 😉"?"THINO 😉":(t==null?void 0:t.UserName)||"THINO",className:"username-text",children:(t==null?void 0:t.UserName)==="MEMO 😉"?"THINO 😉":(t==null?void 0:t.UserName)||"THINO"})}),(t==null?void 0:t.MomentsQuote)&&y.jsx("span",{className:"thino-user-quote",children:t==null?void 0:t.MomentsQuote})]})]})}),y.jsxs("div",{className:"thino-user-info-wrapper",children:[y.jsxs("div",{className:"setting-item",children:[y.jsxs("div",{className:"setting-item-info",children:[y.jsx("div",{className:"setting-item-name",children:E("User name")}),y.jsx("div",{className:"setting-item-description",children:E("Set your user name here. 'Memos 😏' By default")})]}),y.jsx("div",{className:"setting-item-control",children:y.jsx("input",{type:"text",placeholder:"Thino 😏",defaultValue:t==null?void 0:t.UserName,onInput:I=>w("UserName",I.currentTarget.value)})})]}),y.jsxs("div",{className:"setting-item",children:[y.jsxs("div",{className:"setting-item-info",children:[y.jsx("div",{className:"setting-item-name",children:E("User quote")}),y.jsx("div",{className:"setting-item-description",children:E("Set user quote for thino")})]}),y.jsx("div",{className:"setting-item-control",children:y.jsx("input",{type:"text",placeholder:"Share thino with the world",defaultValue:t==null?void 0:t.MomentsQuote,onInput:I=>w("MomentsQuote",I.currentTarget.value)})})]}),y.jsxs("div",{className:"setting-item",children:[y.jsxs("div",{className:"setting-item-info",children:[y.jsx("div",{className:"setting-item-name",children:E("User icon")}),y.jsx("div",{className:"setting-item-description",children:E("Set user icon for thino. You can input http/https link or file path in vault.")})]}),y.jsx("div",{className:"setting-item-control",children:y.jsx("input",{type:"text",ref:f,placeholder:"Input url or file path",defaultValue:t==null?void 0:t.MomentsIcon,onInput:I=>w("MomentsIcon",I.currentTarget.value)})})]})]})]});case 1:return y.jsx(y.Fragment,{children:y.jsxs("div",{className:Kn("theme-selector-group","selected"),children:[y.jsxs("div",{className:Kn("theme-selector",(t==null?void 0:t.DefaultThemeForThino)==="modern"?"selected":""),onClick:()=>w("DefaultThemeForThino","modern"),children:[y.jsxs("div",{className:"theme-selector-header-component",children:[y.jsx("div",{className:"theme-selector-header",children:E("Modern")}),y.jsx("div",{className:"theme-selector-description",children:E("A modern theme for Thino with a three-column layout and some unique features.")})]}),y.jsxs("div",{className:"theme-selector-content",children:[y.jsx("div",{className:"left-column column-component"}),y.jsx("div",{className:"center-column column-component"}),y.jsx("div",{className:"right-column column-component"})]}),y.jsx("div",{className:"theme-selector-footer",children:y.jsx("button",{className:"mod-cta",disabled:(t==null?void 0:t.DefaultThemeForThino)==="modern",onClick:()=>w("DefaultThemeForThino","modern"),children:(t==null?void 0:t.DefaultThemeForThino)==="modern"?E("Selected"):E("Select")})})]}),y.jsxs("div",{className:Kn("theme-selector",(t==null?void 0:t.DefaultThemeForThino)==="classic"?"selected":""),onClick:()=>w("DefaultThemeForThino","classic"),children:[y.jsxs("div",{className:"theme-selector-header-component",children:[y.jsx("div",{className:"theme-selector-header",children:E("Classic")}),y.jsx("div",{className:"theme-selector-description",children:E("A classic theme for Thino with a two-column layout")})]}),y.jsxs("div",{className:"theme-selector-content",children:[y.jsx("div",{className:"left-column column-component"}),y.jsx("div",{className:"center-column column-component"})]}),y.jsx("div",{className:"theme-selector-footer",children:y.jsx("button",{className:"mod-cta",disabled:(t==null?void 0:t.DefaultThemeForThino)==="classic",onClick:()=>w("DefaultThemeForThino","classic"),children:(t==null?void 0:t.DefaultThemeForThino)==="classic"?E("Selected"):E("Select")})})]})]})});case 2:return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"daily-note-plugin-status",children:[y.jsxs("div",{className:"daily-note-plugin-status-header",children:[y.jsx("div",{className:"plugin-status-header",children:E("Daily note plugin")}),y.jsx("div",{className:"plugin-status-description",children:E("Enable daily note plugin")})]}),y.jsx("div",{className:"daily-note-plugin-status-content",children:g.enabled&&y.jsx(y.Fragment,{children:y.jsxs("div",{className:"daily-note-format",children:[y.jsxs("div",{className:"setting-item",children:[y.jsxs("div",{className:"setting-item-info",children:[y.jsx("div",{className:"setting-item-name",children:E("Daily note name format")}),y.jsx("div",{className:"setting-item-description",children:E("Set daily note name format")})]}),y.jsx("div",{className:"setting-item-control",children:y.jsx("input",{type:"text",placeholder:"YYYY-MM-DD",defaultValue:g.format,onInput:I=>{v({...g,format:I.currentTarget.value.trim()});try{const k=n.internalPlugins.getPluginById("daily-notes");k.instance.options={...k.instance.options,format:I.currentTarget.value.trim()},k.saveData({...k.instance.options,format:I.currentTarget.value.trim()})}catch(k){console.error(k)}}})})]}),y.jsxs("div",{className:"setting-item",children:[y.jsxs("div",{className:"setting-item-info",children:[y.jsx("div",{className:"setting-item-name",children:E("Daily notes folder")}),y.jsx("div",{className:"setting-item-description",children:E("Set daily notes folder")})]}),y.jsx("div",{className:"setting-item-control",children:y.jsx("input",{type:"text",placeholder:"YYYY-MM-DD",defaultValue:g.path,onInput:I=>{v({...g,path:I.currentTarget.value.trim()});try{const k=n.internalPlugins.getPluginById("daily-notes");k.instance.options={...k.instance.options,folder:I.currentTarget.value.trim()},k.saveData({...k.instance.options,folder:I.currentTarget.value.trim()})}catch(k){console.error(k)}}})})]})]})})}),y.jsxs("div",{className:"daily-note-plugin-status-footer",children:[!g.enabled&&y.jsx("div",{className:"notice-click",children:E("Click to enable =>")}),y.jsx("button",{className:"mod-cta",disabled:g.enabled,onClick:()=>{if(!g.enabled){n.internalPlugins.getPluginById("daily-notes").enable();const I=oc().folder,k=oc().format;v({enabled:!0,format:k,path:I})}},children:g.enabled?E("Enabled"):E("Enable")})]})]}),y.jsxs("div",{className:"thino-daily-settings-wrapper",children:[y.jsxs("div",{className:"setting-item",children:[y.jsxs("div",{className:"setting-item-info",children:[y.jsx("div",{className:"setting-item-name",children:E("Default time prefix")}),y.jsx("div",{className:"setting-item-description",children:E("Set default time prefix for thino in daily notes.")})]}),y.jsx("div",{className:"setting-item-control",children:y.jsxs("select",{className:"dropdown",defaultValue:t==null?void 0:t.DefaultTimePrefix,onChange:I=>w("DefaultTimePrefix",I.currentTarget.value),children:[y.jsx("option",{value:"HH:mm",children:"HH:mm"}),y.jsx("option",{value:"HH:mm:ss",children:"HH:mm:ss"})]})})]}),y.jsxs("div",{className:"setting-item",children:[y.jsxs("div",{className:"setting-item-info",children:[y.jsx("div",{className:"setting-item-name",children:E("Set thino insert place")}),y.jsx("div",{className:"setting-item-description",children:E("Set where to insert thino content")})]}),y.jsx("div",{className:"setting-item-control",children:y.jsxs("select",{className:"dropdown",defaultValue:t==null?void 0:t.InsertType,onChange:I=>w("InsertType",I.currentTarget.value),children:[y.jsx("option",{value:"end",children:E("End of the diary")}),y.jsx("option",{value:"custom",children:E("Custom location")})]})})]}),(t==null?void 0:t.InsertType)==="custom"&&y.jsxs("div",{className:"setting-item",children:[y.jsxs("div",{className:"setting-item-info",children:[y.jsx("div",{className:"setting-item-name",children:E("Insert after heading")}),y.jsx("div",{className:"setting-item-description",children:E("If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.")})]}),y.jsx("div",{className:"setting-item-control",children:y.jsx("input",{type:"text",placeholder:"# Heading",defaultValue:t==null?void 0:t.InsertAfter,onInput:I=>w("InsertAfter",I.currentTarget.value)})})]}),y.jsxs("div",{className:"setting-item",children:[y.jsxs("div",{className:"setting-item-info",children:[y.jsx("div",{className:"setting-item-name",children:E("Set process target")}),y.jsx("div",{className:"setting-item-description",children:E("You can set whole diary or only part of it")})]}),y.jsx("div",{className:"setting-item-control",children:y.jsxs("select",{className:"dropdown",defaultValue:t==null?void 0:t.ProcessContentTarget,onChange:I=>w("ProcessContentTarget",I.currentTarget.value),children:[y.jsx("option",{value:"custom",children:E("Custom")}),y.jsx("option",{value:"whole",children:E("Whole diary")})]})})]}),(t==null?void 0:t.ProcessContentTarget)==="custom"&&y.jsxs("div",{className:"setting-item",children:[y.jsxs("div",{className:"setting-item-info",children:[y.jsx("div",{className:"setting-item-name",children:E("Process Memos below")}),y.jsx("div",{className:"setting-item-description",children:E("If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.")})]}),y.jsx("div",{className:"setting-item-control",children:y.jsx("input",{type:"text",placeholder:"# Heading",defaultValue:t==null?void 0:t.ProcessEntriesBelow,onInput:I=>w("ProcessEntriesBelow",I.currentTarget.value)})})]})]})]});case 3:return y.jsx(y.Fragment,{children:y.jsxs("div",{className:"thino-custom-settings-wrapper",children:[y.jsxs("div",{className:"setting-item",children:[y.jsxs("div",{className:"setting-item-info",children:[y.jsx("div",{className:"setting-item-name",children:E("Default prefix when save thino")}),y.jsx("div",{className:"setting-item-description",children:E("Set the default prefix when create memo, 'List' by default.")})]}),y.jsx("div",{className:"setting-item-control",children:y.jsxs("select",{className:"dropdown",defaultValue:t==null?void 0:t.DefaultPrefix,onChange:I=>w("DefaultPrefix",I.currentTarget.value),children:[y.jsx("option",{value:"List",children:E("List")}),y.jsx("option",{value:"Task",children:E("Task")})]})})]}),y.jsxs("div",{className:"setting-item",children:[y.jsxs("div",{className:"setting-item-info",children:[y.jsx("div",{className:"setting-item-name",children:E("Use Tags In Vault")}),y.jsx("div",{className:"setting-item-description",children:E("Use tags in vault rather than only in Memos. False by default.")})]}),y.jsx("div",{className:"setting-item-control",ref:I=>{I&&(I.hasChildNodes()||new C.ToggleComponent(I).setValue((t==null?void 0:t.UseVaultTags)===void 0?!1:t==null?void 0:t.UseVaultTags).onChange(k=>{w("UseVaultTags",k)}))}})]}),y.jsxs("div",{className:"setting-item",children:[y.jsxs("div",{className:"setting-item-info",children:[y.jsx("div",{className:"setting-item-name",children:E("Delete Thino Directly")}),y.jsx("div",{className:"setting-item-description",children:E("When delete thino directly, it will not be moved to trash. False by default.")})]}),y.jsx("div",{className:"setting-item-control",ref:I=>{I&&(I.hasChildNodes()||new C.ToggleComponent(I).setValue((t==null?void 0:t.DeleteThinoDirectly)===void 0?!1:t==null?void 0:t.DeleteThinoDirectly).onChange(k=>{w("DeleteThinoDirectly",k)}))}})]})]})});case 4:return y.jsx(y.Fragment,{children:y.jsxs("div",{className:"thino-congrats",children:[y.jsxs("div",{className:"final-congrats-text",children:[y.jsx("p",{className:"ready-use",children:E("Thino is ready to use. ")}),y.jsx("p",{className:"start-to-use",children:E("You can start using Thino now. If you want to know more about Thino Pro, click the button below.")})]}),y.jsxs("div",{className:"next-btns-group",children:[y.jsx("button",{onClick:()=>{const I=localStorage.getItem("language");I&&(I==="zh"||I==="zh-TW")?window.open("https://pkmer.cn/products/thino"):window.open("https://thino.pkmer.net/en/#price")},children:E("About Thino Pro")}),y.jsx("button",{className:"mod-cta",onClick:()=>{w("FirstLoaded",!1),dt.getState().isMobileView?(setTimeout(()=>{dt.setShowSiderbarInMobileView(!0)},500),setTimeout(()=>{dt.setExitSteps(!0)},1e3)):setTimeout(()=>{dt.setExitSteps(!0)},800)},children:E("Start Thino")})]})]})})}};return y.jsx(y.Fragment,{children:y.jsx("div",{className:"onboarding-view-container",children:y.jsx("div",{className:"onboarding-view-wrapper",children:y.jsxs("div",{"data-onboarding-step":i,className:"onboarding-view-content",children:[y.jsxs("div",{className:"onboarding-step-count",children:[i+1,"/5"]}),y.jsxs("div",{className:"onboarding-view-details",children:[y.jsxs("div",{className:"details-content",children:[y.jsx("div",{className:"onboarding-header-group",children:D}),y.jsx(y.Fragment,{children:y.jsx("div",{className:"onboarding-form",children:T()})})]}),y.jsxs("div",{className:"details-footer",children:[y.jsx("div",{className:"skip-btn",children:i!==4&&y.jsx("button",{onClick:()=>{w("FirstLoaded",!1)},children:E("Skip and start Thino")})}),y.jsxs("div",{className:"navigate-btns-group",children:[i!==0&&y.jsx("button",{onClick:()=>a(i-1),children:E("Back to previous step")}),i!==4&&y.jsx("button",{className:"mod-cta",onClick:()=>a(i+1),children:E("Next step")}),i===4&&y.jsx("button",{className:"details-settings-btn",onClick:()=>{n.setting.open(),n.setting.openTabById(o.id||"obsidian-memos")},children:E("Details settings")})]})]})]})]})})})})};function $v(e){return $v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$v(e)}function Pn(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(f){try{d(r.next(f))}catch(m){i(m)}}function u(f){try{d(r.throw(f))}catch(m){i(m)}}function d(f){var m;f.done?o(f.value):(m=f.value,m instanceof n?m:new n(function(g){g(m)})).then(a,u)}d((r=r.apply(e,t||[])).next())})}function On(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(d){return function(f){return function(m){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,m[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&m[0]?r.return:m[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,m[1])).done)return o;switch(r=0,o&&(m=[2&m[0],o.value]),m[0]){case 0:case 1:o=m;break;case 4:return a.label++,{value:m[1],done:!1};case 5:a.label++,r=m[1],m=[0];continue;case 7:m=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!((o=o.length>0&&o[o.length-1])||m[0]!==6&&m[0]!==2)){a=0;continue}if(m[0]===3&&(!o||m[1]>o[0]&&m[1]<o[3])){a.label=m[1];break}if(m[0]===6&&a.label<o[1]){a.label=o[1],o=m;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(m);break}o[2]&&a.ops.pop(),a.trys.pop();continue}m=t.call(e,a)}catch(g){m=[6,g],r=0}finally{n=o=0}if(5&m[0])throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}([d,f])}}}function NI(e,t,n){var r,o=((r={})[e]=t,r.path="/",r.expires=void 0,r);if(n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),o.expires=i.toUTCString()}var a=[];for(var u in o)a.push("".concat(u,"=").concat(o[u]));return document.cookie=a.join("; "),j3(e)}function j3(e){return(t={},document.cookie.split(";").forEach(function(n){var r=n.split("="),o=r[0],i=r[1];t[o.trim()]=i}),t)[e];var t}function ete(e,t){t?NI(e._options.dontShowAgainCookie,"true",e._options.dontShowAgainCookieDays):NI(e._options.dontShowAgainCookie,"",-1)}var $y,D1=($y={},function(e,t){return t===void 0&&(t="introjs-stamp"),$y[t]=$y[t]||0,e[t]===void 0&&(e[t]=$y[t]++),e[t]}),pl=new(function(){function e(){this.events_key="introjs_event"}return e.prototype._id=function(t,n,r){return t+D1(n)+(r?"_".concat(D1(r)):"")},e.prototype.on=function(t,n,r,o,i){var a=this._id(n,r,o),u=function(d){return r(o||t,d||window.event)};"addEventListener"in t?t.addEventListener(n,u,i):"attachEvent"in t&&t.attachEvent("on".concat(n),u),t[this.events_key]=t[this.events_key]||{},t[this.events_key][a]=u},e.prototype.off=function(t,n,r,o,i){var a=this._id(n,r,o),u=t[this.events_key]&&t[this.events_key][a];u&&("removeEventListener"in t?t.removeEventListener(n,u,i):"detachEvent"in t&&t.detachEvent("on".concat(n),u),t[this.events_key][a]=null)},e}()),qn=function(e){return typeof e=="function"};function dl(e,t){if(e instanceof SVGElement){var n=e.getAttribute("class")||"";n.match(t)||e.setAttribute("class","".concat(n," ").concat(t))}else if(e.classList!==void 0)for(var r=0,o=t.split(" ");r<o.length;r++){var i=o[r];e.classList.add(i)}else e.className.match(t)||(e.className+=" ".concat(t))}function US(e,t){var n="";return"currentStyle"in e?n=e.currentStyle[t]:document.defaultView&&document.defaultView.getComputedStyle&&(n=document.defaultView.getComputedStyle(e,null).getPropertyValue(t)),n&&n.toLowerCase?n.toLowerCase():n}function AI(e,t){if(e){var n=function(r){var o=window.getComputedStyle(r),i=o.position==="absolute",a=/(auto|scroll)/;if(o.position==="fixed")return document.body;for(var u=r;u=u.parentElement;)if(o=window.getComputedStyle(u),(!i||o.position!=="static")&&a.test(o.overflow+o.overflowY+o.overflowX))return u;return document.body}(t);n!==document.body&&(n.scrollTop=t.offsetTop-n.offsetTop)}}function zS(){if(window.innerWidth!==void 0)return{width:window.innerWidth,height:window.innerHeight};var e=document.documentElement;return{width:e.clientWidth,height:e.clientHeight}}function FI(e,t,n,r,o){var i;if(t!=="off"&&e&&(i=t==="tooltip"?o.getBoundingClientRect():r.getBoundingClientRect(),!function(u){var d=u.getBoundingClientRect();return d.top>=0&&d.left>=0&&d.bottom+80<=window.innerHeight&&d.right<=window.innerWidth}(r))){var a=zS().height;i.bottom-(i.bottom-i.top)<0||r.clientHeight>a?window.scrollBy(0,i.top-(a/2-i.height/2)-n):window.scrollBy(0,i.top-(a/2-i.height/2)+n)}}function xm(e){e.setAttribute("role","button"),e.tabIndex=0}function Y0(e){var t=e.parentElement;return!(!t||t.nodeName==="HTML")&&(US(e,"position")==="fixed"||Y0(t))}function Ih(e,t){var n=document.body,r=document.documentElement,o=window.pageYOffset||r.scrollTop||n.scrollTop,i=window.pageXOffset||r.scrollLeft||n.scrollLeft;t=t||n;var a=e.getBoundingClientRect(),u=t.getBoundingClientRect(),d=US(t,"position"),f={width:a.width,height:a.height};return t.tagName.toLowerCase()!=="body"&&d==="relative"||d==="sticky"?Object.assign(f,{top:a.top-u.top,left:a.left-u.left}):Y0(e)?Object.assign(f,{top:a.top,left:a.left}):Object.assign(f,{top:a.top+o,left:a.left+i})}function VS(e,t){if(e instanceof SVGElement){var n=e.getAttribute("class")||"";e.setAttribute("class",n.replace(t,"").replace(/^\s+|\s+$/g,""))}else e.className=e.className.replace(t,"").replace(/^\s+|\s+$/g,"")}function fc(e,t){var n="";if(e.style.cssText&&(n+=e.style.cssText),typeof t=="string")n+=t;else for(var r in t)n+="".concat(r,":").concat(t[r],";");e.style.cssText=n}function Xl(e,t,n){if(n&&t){var r=Ih(t.element,e._targetElement),o=e._options.helperElementPadding;t.element instanceof Element&&Y0(t.element)?dl(n,"introjs-fixedTooltip"):VS(n,"introjs-fixedTooltip"),t.position==="floating"&&(o=0),fc(n,{width:"".concat(r.width+o,"px"),height:"".concat(r.height+o,"px"),top:"".concat(r.top-o/2,"px"),left:"".concat(r.left-o/2,"px")})}}function qy(e,t,n,r,o){return e.left+t+n.width>r.width?(o.style.left="".concat(r.width-n.width-e.left,"px"),!1):(o.style.left="".concat(t,"px"),!0)}function Gy(e,t,n,r){return e.left+e.width-t-n.width<0?(r.style.left="".concat(-e.left,"px"),!1):(r.style.right="".concat(t,"px"),!0)}function nl(e,t){e.includes(t)&&e.splice(e.indexOf(t),1)}function tte(e,t,n,r){var o=e.slice(),i=zS(),a=Ih(n).height+10,u=Ih(n).width+20,d=t.getBoundingClientRect(),f="floating";if(d.bottom+a>i.height&&nl(o,"bottom"),d.top-a<0&&nl(o,"top"),d.right+u>i.width&&nl(o,"right"),d.left-u<0&&nl(o,"left"),r&&(r=r.split("-")[0]),o.length&&(f=o[0],o.includes(r)&&(f=r)),f==="top"||f==="bottom"){var m=void 0,g=[];f==="top"?(m="top-middle-aligned",g=["top-left-aligned","top-middle-aligned","top-right-aligned"]):(m="bottom-middle-aligned",g=["bottom-left-aligned","bottom-middle-aligned","bottom-right-aligned"]),f=function(v,w,D,T){var I=w/2,k=Math.min(D,window.screen.width);return k-v<w&&(nl(T,"top-left-aligned"),nl(T,"bottom-left-aligned")),(v<I||k-v<I)&&(nl(T,"top-middle-aligned"),nl(T,"bottom-middle-aligned")),v<w&&(nl(T,"top-right-aligned"),nl(T,"bottom-right-aligned")),T.length?T[0]:null}(d.left,u,i.width,g)||m}return f}function qv(e,t,n,r,o){if(o===void 0&&(o=!1),t){var i,a,u,d,f="";n.style.top="",n.style.right="",n.style.bottom="",n.style.left="",n.style.marginLeft="",n.style.marginTop="",r.style.display="inherit",f=typeof t.tooltipClass=="string"?t.tooltipClass:e._options.tooltipClass,n.className=["introjs-tooltip",f].filter(Boolean).join(" "),n.setAttribute("role","dialog"),(d=t.position)!=="floating"&&e._options.autoPosition&&(d=tte(e._options.positionPrecedence,t.element,n,d)),a=Ih(t.element),i=Ih(n),u=zS(),dl(n,"introjs-".concat(d));var m=a.width/2-i.width/2;switch(d){case"top-right-aligned":r.className="introjs-arrow bottom-right";var g=0;Gy(a,g,i,n),n.style.bottom="".concat(a.height+20,"px");break;case"top-middle-aligned":r.className="introjs-arrow bottom-middle",o&&(m+=5),Gy(a,m,i,n)&&(n.style.right="",qy(a,m,i,u,n)),n.style.bottom="".concat(a.height+20,"px");break;case"top-left-aligned":case"top":r.className="introjs-arrow bottom",qy(a,o?0:15,i,u,n),n.style.bottom="".concat(a.height+20,"px");break;case"right":n.style.left="".concat(a.width+20,"px"),a.top+i.height>u.height?(r.className="introjs-arrow left-bottom",n.style.top="-".concat(i.height-a.height-20,"px")):r.className="introjs-arrow left";break;case"left":o||e._options.showStepNumbers!==!0||(n.style.top="15px"),a.top+i.height>u.height?(n.style.top="-".concat(i.height-a.height-20,"px"),r.className="introjs-arrow right-bottom"):r.className="introjs-arrow right",n.style.right="".concat(a.width+20,"px");break;case"floating":r.style.display="none",n.style.left="50%",n.style.top="50%",n.style.marginLeft="-".concat(i.width/2,"px"),n.style.marginTop="-".concat(i.height/2,"px");break;case"bottom-right-aligned":r.className="introjs-arrow top-right",Gy(a,g=0,i,n),n.style.top="".concat(a.height+20,"px");break;case"bottom-middle-aligned":r.className="introjs-arrow top-middle",o&&(m+=5),Gy(a,m,i,n)&&(n.style.right="",qy(a,m,i,u,n)),n.style.top="".concat(a.height+20,"px");break;default:r.className="introjs-arrow top",qy(a,0,i,u,n),n.style.top="".concat(a.height+20,"px")}}}function L3(){for(var e=0,t=Array.from(document.querySelectorAll(".introjs-showElement"));e<t.length;e++)VS(t[e],/introjs-[a-zA-Z]+/g)}function vn(e,t){var n=document.createElement(e);t=t||{};var r=/^(?:role|data-|aria-)/;for(var o in t){var i=t[o];o==="style"&&typeof i!="function"?fc(n,i):typeof i=="string"&&o.match(r)?n.setAttribute(o,i):n[o]=i}return n}function PI(e,t,n){if(n===void 0&&(n=!1),n){var r=t.style.opacity||"1";fc(t,{opacity:"0"}),window.setTimeout(function(){fc(t,{opacity:r})},10)}e.appendChild(t)}function R3(e,t){return(e+1)/t*100}function _3(e,t){var n=vn("div",{className:"introjs-bullets"});e._options.showBullets===!1&&(n.style.display="none");var r=vn("ul");r.setAttribute("role","tablist");for(var o=function(){var f=this.getAttribute("data-step-number");f!=null&&e.goToStep(parseInt(f,10))},i=0;i<e._introItems.length;i++){var a=e._introItems[i].step,u=vn("li"),d=vn("a");u.setAttribute("role","presentation"),d.setAttribute("role","tab"),d.onclick=o,i===t.step-1&&(d.className="active"),xm(d),d.innerHTML=" ",d.setAttribute("data-step-number",a.toString()),u.appendChild(d),r.appendChild(u)}return n.appendChild(r),n}function B3(e,t,n){var r=e.querySelector(".introjs-progress .introjs-progressbar");if(r){var o=R3(t,n);r.style.cssText="width:".concat(o,"%;"),r.setAttribute("aria-valuenow",o.toString())}}function H3(e,t){return Pn(this,void 0,void 0,function(){var n,r,o,i,a,u,d,f,m,g,v,w,D,T,I,k,A,R,j,B,L,Z,U,z,$=this;return On(this,function(te){switch(te.label){case 0:return qn(e._introChangeCallback)?[4,e._introChangeCallback.call(e,t.element)]:[3,2];case 1:te.sent(),te.label=2;case 2:return n=document.querySelector(".introjs-helperLayer"),r=document.querySelector(".introjs-tooltipReferenceLayer"),o="introjs-helperLayer",typeof t.highlightClass=="string"&&(o+=" ".concat(t.highlightClass)),typeof e._options.highlightClass=="string"&&(o+=" ".concat(e._options.highlightClass)),n!==null&&r!==null?(d=r.querySelector(".introjs-helperNumberLayer"),f=r.querySelector(".introjs-tooltiptext"),m=r.querySelector(".introjs-tooltip-title"),g=r.querySelector(".introjs-arrow"),v=r.querySelector(".introjs-tooltip"),u=r.querySelector(".introjs-skipbutton"),a=r.querySelector(".introjs-prevbutton"),i=r.querySelector(".introjs-nextbutton"),n.className=o,v.style.opacity="0",v.style.display="none",AI(e._options.scrollToElement,t.element),Xl(e,t,n),Xl(e,t,r),L3(),e._lastShowElementTimer&&window.clearTimeout(e._lastShowElementTimer),e._lastShowElementTimer=window.setTimeout(function(){d!==null&&(d.innerHTML="".concat(t.step," ").concat(e._options.stepNumbersOfLabel," ").concat(e._introItems.length)),f.innerHTML=t.intro||"",m.innerHTML=t.title||"",v.style.display="block",qv(e,t,v,g),function(Q,ue,ee){if(Q){var le=ue.querySelector(".introjs-bullets li > a.active"),W=ue.querySelector('.introjs-bullets li > a[data-step-number="'.concat(ee.step,'"]'));le&&W&&(le.className="",W.className="active")}}(e._options.showBullets,r,t),B3(r,e._currentStep,e._introItems.length),v.style.opacity="1",(i!=null&&/introjs-donebutton/gi.test(i.className)||i!=null)&&i.focus(),FI(e._options.scrollToElement,t.scrollTo,e._options.scrollPadding,t.element,f)},350)):(w=vn("div",{className:o}),D=vn("div",{className:"introjs-tooltipReferenceLayer"}),T=vn("div",{className:"introjs-arrow"}),I=vn("div",{className:"introjs-tooltip"}),k=vn("div",{className:"introjs-tooltiptext"}),A=vn("div",{className:"introjs-tooltip-header"}),R=vn("h1",{className:"introjs-tooltip-title"}),j=vn("div"),fc(w,{"box-shadow":"0 0 1px 2px rgba(33, 33, 33, 0.8), rgba(33, 33, 33, ".concat(e._options.overlayOpacity.toString(),") 0 0 0 5000px")}),AI(e._options.scrollToElement,t.element),Xl(e,t,w),Xl(e,t,D),PI(e._targetElement,w,!0),PI(e._targetElement,D),k.innerHTML=t.intro,R.innerHTML=t.title,j.className="introjs-tooltipbuttons",e._options.showButtons===!1&&(j.style.display="none"),A.appendChild(R),I.appendChild(A),I.appendChild(k),e._options.dontShowAgain&&(B=vn("div",{className:"introjs-dontShowAgain"}),(L=vn("input",{type:"checkbox",id:"introjs-dontShowAgain",name:"introjs-dontShowAgain"})).onchange=function(Q){e.setDontShowAgain(Q.target.checked)},(Z=vn("label",{htmlFor:"introjs-dontShowAgain"})).innerText=e._options.dontShowAgainLabel,B.appendChild(L),B.appendChild(Z),I.appendChild(B)),I.appendChild(_3(e,t)),I.appendChild(function(Q){var ue=vn("div");ue.className="introjs-progress",Q._options.showProgress===!1&&(ue.style.display="none");var ee=vn("div",{className:"introjs-progressbar"});Q._options.progressBarAdditionalClass&&(ee.className+=" "+Q._options.progressBarAdditionalClass);var le=R3(Q._currentStep,Q._introItems.length);return ee.setAttribute("role","progress"),ee.setAttribute("aria-valuemin","0"),ee.setAttribute("aria-valuemax","100"),ee.setAttribute("aria-valuenow",le.toString()),ee.style.cssText="width:".concat(le,"%;"),ue.appendChild(ee),ue}(e)),U=vn("div"),e._options.showStepNumbers===!0&&(U.className="introjs-helperNumberLayer",U.innerHTML="".concat(t.step," ").concat(e._options.stepNumbersOfLabel," ").concat(e._introItems.length),I.appendChild(U)),I.appendChild(T),D.appendChild(I),(i=vn("a")).onclick=function(){return Pn($,void 0,void 0,function(){return On(this,function(Q){switch(Q.label){case 0:return e._introItems.length-1===e._currentStep?[3,2]:[4,Fd(e)];case 1:return Q.sent(),[3,6];case 2:return/introjs-donebutton/gi.test(i.className)?qn(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"done")]:[3,4]:[3,6];case 3:Q.sent(),Q.label=4;case 4:return[4,Pd(e,e._targetElement)];case 5:Q.sent(),Q.label=6;case 6:return[2]}})})},xm(i),i.innerHTML=e._options.nextLabel,(a=vn("a")).onclick=function(){return Pn($,void 0,void 0,function(){return On(this,function(Q){switch(Q.label){case 0:return e._currentStep>0?[4,Gv(e)]:[3,2];case 1:Q.sent(),Q.label=2;case 2:return[2]}})})},xm(a),a.innerHTML=e._options.prevLabel,xm(u=vn("a",{className:"introjs-skipbutton"})),u.innerHTML=e._options.skipLabel,u.onclick=function(){return Pn($,void 0,void 0,function(){return On(this,function(Q){switch(Q.label){case 0:return e._introItems.length-1===e._currentStep&&qn(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"skip")]:[3,2];case 1:Q.sent(),Q.label=2;case 2:return qn(e._introSkipCallback)?[4,e._introSkipCallback.call(e,e._currentStep)]:[3,4];case 3:Q.sent(),Q.label=4;case 4:return[4,Pd(e,e._targetElement)];case 5:return Q.sent(),[2]}})})},A.appendChild(u),e._introItems.length>1&&j.appendChild(a),j.appendChild(i),I.appendChild(j),qv(e,t,I,T),FI(e._options.scrollToElement,t.scrollTo,e._options.scrollPadding,t.element,I)),(z=e._targetElement.querySelector(".introjs-disableInteraction"))&&z.parentNode&&z.parentNode.removeChild(z),t.disableInteraction&&function(Q,ue){var ee=document.querySelector(".introjs-disableInteraction");ee===null&&(ee=vn("div",{className:"introjs-disableInteraction"}),Q._targetElement.appendChild(ee)),Xl(Q,ue,ee)}(e,t),e._currentStep===0&&e._introItems.length>1?(i!=null&&(i.className="".concat(e._options.buttonClass," introjs-nextbutton"),i.innerHTML=e._options.nextLabel),e._options.hidePrev===!0?(a!=null&&(a.className="".concat(e._options.buttonClass," introjs-prevbutton introjs-hidden")),i!=null&&dl(i,"introjs-fullbutton")):a!=null&&(a.className="".concat(e._options.buttonClass," introjs-prevbutton introjs-disabled"))):e._introItems.length-1===e._currentStep||e._introItems.length===1?(a!=null&&(a.className="".concat(e._options.buttonClass," introjs-prevbutton")),e._options.hideNext===!0?(i!=null&&(i.className="".concat(e._options.buttonClass," introjs-nextbutton introjs-hidden")),a!=null&&dl(a,"introjs-fullbutton")):i!=null&&(e._options.nextToDone===!0?(i.innerHTML=e._options.doneLabel,dl(i,"".concat(e._options.buttonClass," introjs-nextbutton introjs-donebutton"))):i.className="".concat(e._options.buttonClass," introjs-nextbutton introjs-disabled"))):(a!=null&&(a.className="".concat(e._options.buttonClass," introjs-prevbutton")),i!=null&&(i.className="".concat(e._options.buttonClass," introjs-nextbutton"),i.innerHTML=e._options.nextLabel)),a!=null&&a.setAttribute("role","button"),i!=null&&i.setAttribute("role","button"),u!=null&&u.setAttribute("role","button"),i!=null&&i.focus(),function(Q){dl(Q,"introjs-showElement");var ue=US(Q,"position");ue!=="absolute"&&ue!=="relative"&&ue!=="sticky"&&ue!=="fixed"&&dl(Q,"introjs-relativePosition")}(t.element),qn(e._introAfterChangeCallback)?[4,e._introAfterChangeCallback.call(e,t.element)]:[3,4];case 3:te.sent(),te.label=4;case 4:return[2]}})})}function nte(e,t){return Pn(this,void 0,void 0,function(){return On(this,function(n){switch(n.label){case 0:return e._currentStep=t-2,e._introItems===void 0?[3,2]:[4,Fd(e)];case 1:n.sent(),n.label=2;case 2:return[2]}})})}function rte(e,t){return Pn(this,void 0,void 0,function(){return On(this,function(n){switch(n.label){case 0:return e._currentStepNumber=t,e._introItems===void 0?[3,2]:[4,Fd(e)];case 1:n.sent(),n.label=2;case 2:return[2]}})})}function Fd(e){return Pn(this,void 0,void 0,function(){var t,n,r;return On(this,function(o){switch(o.label){case 0:if(e._direction="forward",e._currentStepNumber!==void 0)for(t=0;t<e._introItems.length;t++)e._introItems[t].step===e._currentStepNumber&&(e._currentStep=t-1,e._currentStepNumber=void 0);return e._currentStep===-1?e._currentStep=0:++e._currentStep,n=e._introItems[e._currentStep],r=!0,qn(e._introBeforeChangeCallback)?[4,e._introBeforeChangeCallback.call(e,n&&n.element,e._currentStep,e._direction)]:[3,2];case 1:r=o.sent(),o.label=2;case 2:return r===!1?(--e._currentStep,[2,!1]):e._introItems.length<=e._currentStep?qn(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"end")]:[3,4]:[3,6];case 3:o.sent(),o.label=4;case 4:return[4,Pd(e,e._targetElement)];case 5:return o.sent(),[2,!1];case 6:return[4,H3(e,n)];case 7:return o.sent(),[2,!0]}})})}function Gv(e){return Pn(this,void 0,void 0,function(){var t,n;return On(this,function(r){switch(r.label){case 0:return e._direction="backward",e._currentStep<=0?[2,!1]:(--e._currentStep,t=e._introItems[e._currentStep],n=!0,qn(e._introBeforeChangeCallback)?[4,e._introBeforeChangeCallback.call(e,t&&t.element,e._currentStep,e._direction)]:[3,2]);case 1:n=r.sent(),r.label=2;case 2:return n===!1?(++e._currentStep,[2,!1]):[4,H3(e,t)];case 3:return r.sent(),[2,!0]}})})}function Y3(e,t){return Pn(this,void 0,void 0,function(){var n,r;return On(this,function(o){switch(o.label){case 0:return(n=t.code===void 0?t.which:t.code)===null&&(n=t.charCode===null?t.keyCode:t.charCode),n!=="Escape"&&n!==27||e._options.exitOnEsc!==!0?[3,2]:[4,Pd(e,e._targetElement)];case 1:return o.sent(),[3,16];case 2:return n!=="ArrowLeft"&&n!==37?[3,4]:[4,Gv(e)];case 3:return o.sent(),[3,16];case 4:return n!=="ArrowRight"&&n!==39?[3,6]:[4,Fd(e)];case 5:return o.sent(),[3,16];case 6:return n!=="Enter"&&n!=="NumpadEnter"&&n!==13?[3,16]:(r=t.target||t.srcElement)&&r.className.match("introjs-prevbutton")?[4,Gv(e)]:[3,8];case 7:return o.sent(),[3,15];case 8:return r&&r.className.match("introjs-skipbutton")?e._introItems.length-1===e._currentStep&&qn(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"skip")]:[3,10]:[3,12];case 9:o.sent(),o.label=10;case 10:return[4,Pd(e,e._targetElement)];case 11:return o.sent(),[3,15];case 12:return r&&r.getAttribute("data-step-number")?(r.click(),[3,15]):[3,13];case 13:return[4,Fd(e)];case 14:o.sent(),o.label=15;case 15:t.preventDefault?t.preventDefault():t.returnValue=!1,o.label=16;case 16:return[2]}})})}function WS(e){if(e===null||$v(e)!=="object"||"nodeType"in e)return e;var t={};for(var n in e)"jQuery"in window&&e[n]instanceof window.jQuery?t[n]=e[n]:t[n]=WS(e[n]);return t}function qh(e){var t=document.querySelector(".introjs-hints");return t?Array.from(t.querySelectorAll(e)):[]}function ZS(e,t){return Pn(this,void 0,void 0,function(){var n;return On(this,function(r){switch(r.label){case 0:return n=qh('.introjs-hint[data-step="'.concat(t,'"]'))[0],U0(),n&&dl(n,"introjs-hidehint"),qn(e._hintCloseCallback)?[4,e._hintCloseCallback.call(e,t)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})}function ote(e){return Pn(this,void 0,void 0,function(){var t,n,r,o,i;return On(this,function(a){switch(a.label){case 0:t=qh(".introjs-hint"),n=0,r=t,a.label=1;case 1:return n<r.length?(o=r[n],(i=o.getAttribute("data-step"))?[4,ZS(e,parseInt(i,10))]:[3,3]):[3,4];case 2:a.sent(),a.label=3;case 3:return n++,[3,1];case 4:return[2]}})})}function ite(e){return Pn(this,void 0,void 0,function(){var t,n,r,o,i;return On(this,function(a){switch(a.label){case 0:if(!(t=qh(".introjs-hint"))||!t.length)return[3,1];for(n=0,r=t;n<r.length;n++)o=r[n],(i=o.getAttribute("data-step"))&&U3(parseInt(i,10));return[3,3];case 1:return[4,W3(e,e._targetElement)];case 2:a.sent(),a.label=3;case 3:return[2]}})})}function U3(e){var t=qh('.introjs-hint[data-step="'.concat(e,'"]'))[0];t&&VS(t,/introjs-hidehint/g)}function OI(e){var t=qh('.introjs-hint[data-step="'.concat(e,'"]'))[0];t&&t.parentNode&&t.parentNode.removeChild(t)}function ate(e){return Pn(this,void 0,void 0,function(){var t,n,r,o,i,a,u;return On(this,function(d){switch(d.label){case 0:for((t=document.querySelector(".introjs-hints"))===null&&(t=vn("div",{className:"introjs-hints"})),n=function(v){return function(w){var D=w||window.event;D&&D.stopPropagation&&D.stopPropagation(),D&&D.cancelBubble!==null&&(D.cancelBubble=!0),V3(e,v)}},r=0;r<e._hintItems.length;r++){if(o=e._hintItems[r],document.querySelector('.introjs-hint[data-step="'.concat(r,'"]')))return[2];xm(i=vn("a",{className:"introjs-hint"})),i.onclick=n(r),o.hintAnimation||dl(i,"introjs-hint-no-anim"),Y0(o.element)&&dl(i,"introjs-fixedhint"),a=vn("div",{className:"introjs-hint-dot"}),u=vn("div",{className:"introjs-hint-pulse"}),i.appendChild(a),i.appendChild(u),i.setAttribute("data-step",r.toString()),o.hintTargetElement=o.element,o.element=i,z3(o.hintPosition,i,o.hintTargetElement),t.appendChild(i)}return document.body.appendChild(t),qn(e._hintsAddedCallback)?[4,e._hintsAddedCallback.call(e)]:[3,2];case 1:d.sent(),d.label=2;case 2:return e._options.hintAutoRefreshInterval>=0&&(e._hintsAutoRefreshFunction=(f=function(){return z0(e)},m=e._options.hintAutoRefreshInterval,function(){for(var v=[],w=0;w<arguments.length;w++)v[w]=arguments[w];window.clearTimeout(g),g=window.setTimeout(function(){f(v)},m)}),pl.on(window,"scroll",e._hintsAutoRefreshFunction,e,!0)),[2]}var f,m,g})})}function z3(e,t,n){if(n!==void 0){var r=Ih(n),o=20,i=20;switch(e){default:case"top-left":t.style.left="".concat(r.left,"px"),t.style.top="".concat(r.top,"px");break;case"top-right":t.style.left="".concat(r.left+r.width-o,"px"),t.style.top="".concat(r.top,"px");break;case"bottom-left":t.style.left="".concat(r.left,"px"),t.style.top="".concat(r.top+r.height-i,"px");break;case"bottom-right":t.style.left="".concat(r.left+r.width-o,"px"),t.style.top="".concat(r.top+r.height-i,"px");break;case"middle-left":t.style.left="".concat(r.left,"px"),t.style.top="".concat(r.top+(r.height-i)/2,"px");break;case"middle-right":t.style.left="".concat(r.left+r.width-o,"px"),t.style.top="".concat(r.top+(r.height-i)/2,"px");break;case"middle-middle":t.style.left="".concat(r.left+(r.width-o)/2,"px"),t.style.top="".concat(r.top+(r.height-i)/2,"px");break;case"bottom-middle":t.style.left="".concat(r.left+(r.width-o)/2,"px"),t.style.top="".concat(r.top+r.height-i,"px");break;case"top-middle":t.style.left="".concat(r.left+(r.width-o)/2,"px"),t.style.top="".concat(r.top,"px")}}}function V3(e,t){return Pn(this,void 0,void 0,function(){var n,r,o,i,a,u,d,f,m,g,v;return On(this,function(w){switch(w.label){case 0:return n=document.querySelector('.introjs-hint[data-step="'.concat(t,'"]')),r=e._hintItems[t],qn(e._hintClickCallback)?[4,e._hintClickCallback.call(e,n,r,t)]:[3,2];case 1:w.sent(),w.label=2;case 2:return(o=U0())!==void 0&&parseInt(o,10)===t||(i=vn("div",{className:"introjs-tooltip"}),a=vn("div"),u=vn("div"),d=vn("div"),i.onclick=function(D){D.stopPropagation?D.stopPropagation():D.cancelBubble=!0},a.className="introjs-tooltiptext",(f=vn("p")).innerHTML=r.hint||"",a.appendChild(f),e._options.hintShowButton&&((m=vn("a")).className=e._options.buttonClass,m.setAttribute("role","button"),m.innerHTML=e._options.hintButtonLabel,m.onclick=function(){return ZS(e,t)},a.appendChild(m)),u.className="introjs-arrow",i.appendChild(u),i.appendChild(a),g=n.getAttribute("data-step")||"",e._currentStep=parseInt(g,10),v=e._hintItems[e._currentStep],d.className="introjs-tooltipReferenceLayer introjs-hintReference",d.setAttribute("data-step",g),Xl(e,v,d),d.appendChild(i),document.body.appendChild(d),qv(e,v,i,u,!0)),[2]}})})}function U0(){var e=document.querySelector(".introjs-hintReference");if(e&&e.parentNode){var t=e.getAttribute("data-step");return t?(e.parentNode.removeChild(e),t):void 0}}function W3(e,t){return Pn(this,void 0,void 0,function(){var n,r,o,i,a,u,d,f,m,g;return On(this,function(v){switch(v.label){case 0:if(e._hintItems=[],e._options.hints&&e._options.hints.length>0)for(n=0,r=e._options.hints;n<r.length;n++)o=r[n],typeof(i=WS(o)).element=="string"&&(i.element=document.querySelector(i.element)),i.hintPosition=i.hintPosition||e._options.hintPosition,i.hintAnimation=i.hintAnimation||e._options.hintAnimation,i.element!==null&&e._hintItems.push(i);else{if(!(a=Array.from(t.querySelectorAll("*[data-hint]")))||!a.length)return[2,!1];for(u=0,d=a;u<d.length;u++)f=d[u],m=f.getAttribute("data-hint-animation"),g=e._options.hintAnimation,m&&(g=m==="true"),e._hintItems.push({element:f,hint:f.getAttribute("data-hint")||"",hintPosition:f.getAttribute("data-hint-position")||e._options.hintPosition,hintAnimation:g,tooltipClass:f.getAttribute("data-tooltip-class")||void 0,position:f.getAttribute("data-position")||e._options.tooltipPosition})}return[4,ate(e)];case 1:return v.sent(),pl.on(document,"click",U0,e,!1),pl.on(window,"resize",z0,e,!0),[2,!0]}})})}function z0(e){for(var t=0,n=e._hintItems;t<n.length;t++){var r=n[t],o=r.hintTargetElement;z3(r.hintPosition,r.element,o)}}function Z3(e,t){var n=Array.from(t.querySelectorAll("*[data-intro]")),r=[];if(e._options.steps&&e._options.steps.length)for(var o=0,i=e._options.steps;o<i.length;o++){var a=WS(v=i[o]);if(a.step=r.length+1,a.title=a.title||"",typeof a.element=="string"&&(a.element=document.querySelector(a.element)||void 0),a.element===void 0||a.element===null){var u=document.querySelector(".introjsFloatingElement");u===null&&(u=vn("div",{className:"introjsFloatingElement"}),document.body.appendChild(u)),a.element=u,a.position="floating"}a.position=a.position||e._options.tooltipPosition,a.scrollTo=a.scrollTo||e._options.scrollTo,a.disableInteraction===void 0&&(a.disableInteraction=e._options.disableInteraction),a.element!==null&&r.push(a)}else{var d=void 0;if(n.length<1)return[];for(var f=0,m=n;f<m.length;f++){var g=m[f];if((!e._options.group||g.getAttribute("data-intro-group")===e._options.group)&&g.style.display!=="none"){var v=parseInt(g.getAttribute("data-step")||"",10);d=e._options.disableInteraction,g.hasAttribute("data-disable-interaction")&&(d=!!g.getAttribute("data-disable-interaction")),v>0&&(r[v-1]={step:v,element:g,title:g.getAttribute("data-title")||"",intro:g.getAttribute("data-intro")||"",tooltipClass:g.getAttribute("data-tooltip-class")||void 0,highlightClass:g.getAttribute("data-highlight-class")||void 0,position:g.getAttribute("data-position")||e._options.tooltipPosition,scrollTo:g.getAttribute("data-scroll-to")||e._options.scrollTo,disableInteraction:d})}}for(var w=0,D=0,T=n;D<T.length;D++)if(g=T[D],(!e._options.group||g.getAttribute("data-intro-group")===e._options.group)&&g.getAttribute("data-step")===null){for(;r[w]!==void 0;)w++;d=g.hasAttribute("data-disable-interaction")?!!g.getAttribute("data-disable-interaction"):e._options.disableInteraction,r[w]={element:g,title:g.getAttribute("data-title")||"",intro:g.getAttribute("data-intro")||"",step:w+1,tooltipClass:g.getAttribute("data-tooltip-class")||void 0,highlightClass:g.getAttribute("data-highlight-class")||void 0,position:g.getAttribute("data-position")||e._options.tooltipPosition,scrollTo:g.getAttribute("data-scroll-to")||e._options.scrollTo,disableInteraction:d}}}for(var I=[],k=0;k<r.length;k++)r[k]&&I.push(r[k]);return(r=I).sort(function(A,R){return A.step-R.step}),r}function $3(e,t){var n=e._currentStep;if(n!=null&&n!=-1){var r=e._introItems[n],o=document.querySelector(".introjs-tooltipReferenceLayer"),i=document.querySelector(".introjs-helperLayer"),a=document.querySelector(".introjs-disableInteraction");Xl(e,r,i),Xl(e,r,o),Xl(e,r,a),t&&(e._introItems=Z3(e,e._targetElement),function(f,m){if(f._options.showBullets){var g=document.querySelector(".introjs-bullets");g&&g.parentNode&&g.parentNode.replaceChild(_3(f,m),g)}}(e,r),B3(o,n,e._introItems.length));var u=document.querySelector(".introjs-arrow"),d=document.querySelector(".introjs-tooltip");return d&&u&&qv(e,e._introItems[n],d,u),z0(e),e}}function q3(e){$3(e)}function dm(e,t){if(t===void 0&&(t=!1),e&&e.parentElement){var n=e.parentElement;t?(fc(e,{opacity:"0"}),window.setTimeout(function(){try{n.removeChild(e)}catch{}},500)):n.removeChild(e)}}function Pd(e,t,n){return n===void 0&&(n=!1),Pn(this,void 0,void 0,function(){var r,o,i,a;return On(this,function(u){switch(u.label){case 0:return r=!0,e._introBeforeExitCallback===void 0?[3,2]:[4,e._introBeforeExitCallback.call(e,t)];case 1:r=u.sent(),u.label=2;case 2:if(!n&&r===!1)return[2];if((o=Array.from(t.querySelectorAll(".introjs-overlay")))&&o.length)for(i=0,a=o;i<a.length;i++)dm(a[i]);return dm(t.querySelector(".introjs-helperLayer"),!0),dm(t.querySelector(".introjs-tooltipReferenceLayer")),dm(t.querySelector(".introjs-disableInteraction")),dm(document.querySelector(".introjsFloatingElement")),L3(),pl.off(window,"keydown",Y3,e,!0),pl.off(window,"resize",q3,e,!0),qn(e._introExitCallback)?[4,e._introExitCallback.call(e)]:[3,4];case 3:u.sent(),u.label=4;case 4:return e._currentStep=-1,[2]}})})}function ste(e,t){return Pn(this,void 0,void 0,function(){var n;return On(this,function(r){switch(r.label){case 0:return e.isActive()?qn(e._introStartCallback)?[4,e._introStartCallback.call(e,t)]:[3,2]:[2,!1];case 1:r.sent(),r.label=2;case 2:return(n=Z3(e,t)).length===0?[2,!1]:(e._introItems=n,function(o,i){var a=this,u=vn("div",{className:"introjs-overlay"});fc(u,{top:0,bottom:0,left:0,right:0,position:"fixed"}),i.appendChild(u),o._options.exitOnOverlayClick===!0&&(fc(u,{cursor:"pointer"}),u.onclick=function(){return Pn(a,void 0,void 0,function(){return On(this,function(d){switch(d.label){case 0:return[4,Pd(o,i)];case 1:return d.sent(),[2]}})})})}(e,t),[4,Fd(e)]);case 3:r.sent(),t.addEventListener,e._options.keyboardNavigation&&pl.on(window,"keydown",Y3,e,!0),pl.on(window,"resize",q3,e,!0),r.label=4;case 4:return[2,!1]}})})}function jI(e,t,n){return e[t]=n,e}var Db=function(){function e(t){this._currentStep=-1,this._introItems=[],this._hintItems=[],this._targetElement=t,this._options={steps:[],hints:[],isActive:!0,nextLabel:"Next",prevLabel:"Back",skipLabel:"×",doneLabel:"Done",hidePrev:!1,hideNext:!1,nextToDone:!0,tooltipPosition:"bottom",tooltipClass:"",group:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!1,stepNumbersOfLabel:"of",keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.5,autoPosition:!0,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,dontShowAgain:!1,dontShowAgainLabel:"Don't show this again",dontShowAgainCookie:"introjs-dontShowAgain",dontShowAgainCookieDays:365,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintShowButton:!0,hintAutoRefreshInterval:10,hintAnimation:!0,buttonClass:"introjs-button",progressBarAdditionalClass:!1}}return e.prototype.isActive=function(){return(!this._options.dontShowAgain||(t=j3(this._options.dontShowAgainCookie))===""||t!=="true")&&this._options.isActive;var t},e.prototype.clone=function(){return new e(this._targetElement)},e.prototype.setOption=function(t,n){return this._options=jI(this._options,t,n),this},e.prototype.setOptions=function(t){return this._options=function(n,r){for(var o=0,i=Object.entries(r);o<i.length;o++){var a=i[o];n=jI(n,a[0],a[1])}return n}(this._options,t),this},e.prototype.start=function(){return Pn(this,void 0,void 0,function(){return On(this,function(t){switch(t.label){case 0:return[4,ste(this,this._targetElement)];case 1:return t.sent(),[2,this]}})})},e.prototype.goToStep=function(t){return Pn(this,void 0,void 0,function(){return On(this,function(n){switch(n.label){case 0:return[4,nte(this,t)];case 1:return n.sent(),[2,this]}})})},e.prototype.addStep=function(t){return this._options.steps||(this._options.steps=[]),this._options.steps.push(t),this},e.prototype.addSteps=function(t){if(!t.length)return this;for(var n=0;n<t.length;n++)this.addStep(t[n]);return this},e.prototype.goToStepNumber=function(t){return Pn(this,void 0,void 0,function(){return On(this,function(n){switch(n.label){case 0:return[4,rte(this,t)];case 1:return n.sent(),[2,this]}})})},e.prototype.nextStep=function(){return Pn(this,void 0,void 0,function(){return On(this,function(t){switch(t.label){case 0:return[4,Fd(this)];case 1:return t.sent(),[2,this]}})})},e.prototype.previousStep=function(){return Pn(this,void 0,void 0,function(){return On(this,function(t){switch(t.label){case 0:return[4,Gv(this)];case 1:return t.sent(),[2,this]}})})},e.prototype.currentStep=function(){return this._currentStep},e.prototype.exit=function(t){return Pn(this,void 0,void 0,function(){return On(this,function(n){switch(n.label){case 0:return[4,Pd(this,this._targetElement,t)];case 1:return n.sent(),[2,this]}})})},e.prototype.refresh=function(t){return $3(this,t),this},e.prototype.setDontShowAgain=function(t){return ete(this,t),this},e.prototype.onbeforechange=function(t){if(!qn(t))throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=t,this},e.prototype.onchange=function(t){if(!qn(t))throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=t,this},e.prototype.onafterchange=function(t){if(!qn(t))throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=t,this},e.prototype.oncomplete=function(t){if(!qn(t))throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=t,this},e.prototype.onhintsadded=function(t){if(!qn(t))throw new Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=t,this},e.prototype.onhintclick=function(t){if(!qn(t))throw new Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=t,this},e.prototype.onhintclose=function(t){if(!qn(t))throw new Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=t,this},e.prototype.onstart=function(t){if(!qn(t))throw new Error("Provided callback for onstart was not a function.");return this._introStartCallback=t,this},e.prototype.onexit=function(t){if(!qn(t))throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=t,this},e.prototype.onskip=function(t){if(!qn(t))throw new Error("Provided callback for onskip was not a function.");return this._introSkipCallback=t,this},e.prototype.onbeforeexit=function(t){if(!qn(t))throw new Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=t,this},e.prototype.addHints=function(){return Pn(this,void 0,void 0,function(){return On(this,function(t){switch(t.label){case 0:return[4,W3(this,this._targetElement)];case 1:return t.sent(),[2,this]}})})},e.prototype.hideHint=function(t){return Pn(this,void 0,void 0,function(){return On(this,function(n){switch(n.label){case 0:return[4,ZS(this,t)];case 1:return n.sent(),[2,this]}})})},e.prototype.hideHints=function(){return Pn(this,void 0,void 0,function(){return On(this,function(t){switch(t.label){case 0:return[4,ote(this)];case 1:return t.sent(),[2,this]}})})},e.prototype.showHint=function(t){return U3(t),this},e.prototype.showHints=function(){return Pn(this,void 0,void 0,function(){return On(this,function(t){switch(t.label){case 0:return[4,ite(this)];case 1:return t.sent(),[2,this]}})})},e.prototype.removeHints=function(){return function(t){for(var n=0,r=qh(".introjs-hint");n<r.length;n++){var o=r[n].getAttribute("data-step");o&&OI(parseInt(o,10))}pl.off(document,"click",U0,t,!1),pl.off(window,"resize",z0,t,!0),t._hintsAutoRefreshFunction&&pl.off(window,"scroll",t._hintsAutoRefreshFunction,t,!0)}(this),this},e.prototype.removeHint=function(t){return OI(t),this},e.prototype.showHintDialog=function(t){return Pn(this,void 0,void 0,function(){return On(this,function(n){switch(n.label){case 0:return[4,V3(this,t)];case 1:return n.sent(),[2,this]}})})},e}(),Jv=function e(t){var n;if($v(t)==="object")n=new Db(t);else if(typeof t=="string"){var r=document.querySelector(t);if(!r)throw new Error("There is no element with given selector.");n=new Db(r)}else n=new Db(document.body);return e.instances[D1(n,"introjs-instance")]=n,n};Jv.version="7.2.0",Jv.instances={};var ud={},LI;function lte(){if(LI)return ud;LI=1;var e=F;function t(M){for(var H="https://reactjs.org/docs/error-decoder.html?invariant="+M,J=1;J<arguments.length;J++)H+="&args[]="+encodeURIComponent(arguments[J]);return"Minified React error #"+M+"; visit "+H+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=Object.prototype.hasOwnProperty,r=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,o={},i={};function a(M){return n.call(i,M)?!0:n.call(o,M)?!1:r.test(M)?i[M]=!0:(o[M]=!0,!1)}function u(M,H,J,ae,ke,Te,Ue){this.acceptsBooleans=H===2||H===3||H===4,this.attributeName=ae,this.attributeNamespace=ke,this.mustUseProperty=J,this.propertyName=M,this.type=H,this.sanitizeURL=Te,this.removeEmptyString=Ue}var d={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(M){d[M]=new u(M,0,!1,M,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(M){var H=M[0];d[H]=new u(H,1,!1,M[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(M){d[M]=new u(M,2,!1,M.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(M){d[M]=new u(M,2,!1,M,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(M){d[M]=new u(M,3,!1,M.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(M){d[M]=new u(M,3,!0,M,null,!1,!1)}),["capture","download"].forEach(function(M){d[M]=new u(M,4,!1,M,null,!1,!1)}),["cols","rows","size","span"].forEach(function(M){d[M]=new u(M,6,!1,M,null,!1,!1)}),["rowSpan","start"].forEach(function(M){d[M]=new u(M,5,!1,M.toLowerCase(),null,!1,!1)});var f=/[\-:]([a-z])/g;function m(M){return M[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(M){var H=M.replace(f,m);d[H]=new u(H,1,!1,M,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(M){var H=M.replace(f,m);d[H]=new u(H,1,!1,M,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(M){var H=M.replace(f,m);d[H]=new u(H,1,!1,M,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(M){d[M]=new u(M,1,!1,M.toLowerCase(),null,!1,!1)}),d.xlinkHref=new u("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(M){d[M]=new u(M,1,!1,M.toLowerCase(),null,!0,!0)});var g={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},v=["Webkit","ms","Moz","O"];Object.keys(g).forEach(function(M){v.forEach(function(H){H=H+M.charAt(0).toUpperCase()+M.substring(1),g[H]=g[M]})});var w=/["'&<>]/;function D(M){if(typeof M=="boolean"||typeof M=="number")return""+M;M=""+M;var H=w.exec(M);if(H){var J="",ae,ke=0;for(ae=H.index;ae<M.length;ae++){switch(M.charCodeAt(ae)){case 34:H=""";break;case 38:H="&";break;case 39:H="'";break;case 60:H="<";break;case 62:H=">";break;default:continue}ke!==ae&&(J+=M.substring(ke,ae)),ke=ae+1,J+=H}M=ke!==ae?J+M.substring(ke,ae):J}return M}var T=/([A-Z])/g,I=/^ms-/,k=Array.isArray;function A(M,H){return{insertionMode:M,selectedValue:H}}function R(M,H,J){switch(H){case"select":return A(1,J.value!=null?J.value:J.defaultValue);case"svg":return A(2,null);case"math":return A(3,null);case"foreignObject":return A(1,null);case"table":return A(4,null);case"thead":case"tbody":case"tfoot":return A(5,null);case"colgroup":return A(7,null);case"tr":return A(6,null)}return 4<=M.insertionMode||M.insertionMode===0?A(1,null):M}var j=new Map;function B(M,H,J){if(typeof J!="object")throw Error(t(62));H=!0;for(var ae in J)if(n.call(J,ae)){var ke=J[ae];if(ke!=null&&typeof ke!="boolean"&&ke!==""){if(ae.indexOf("--")===0){var Te=D(ae);ke=D((""+ke).trim())}else{Te=ae;var Ue=j.get(Te);Ue!==void 0||(Ue=D(Te.replace(T,"-$1").toLowerCase().replace(I,"-ms-")),j.set(Te,Ue)),Te=Ue,ke=typeof ke=="number"?ke===0||n.call(g,ae)?""+ke:ke+"px":D((""+ke).trim())}H?(H=!1,M.push(' style="',Te,":",ke)):M.push(";",Te,":",ke)}}H||M.push('"')}function L(M,H,J,ae){switch(J){case"style":B(M,H,ae);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<J.length)||J[0]!=="o"&&J[0]!=="O"||J[1]!=="n"&&J[1]!=="N"){if(H=d.hasOwnProperty(J)?d[J]:null,H!==null){switch(typeof ae){case"function":case"symbol":return;case"boolean":if(!H.acceptsBooleans)return}switch(J=H.attributeName,H.type){case 3:ae&&M.push(" ",J,'=""');break;case 4:ae===!0?M.push(" ",J,'=""'):ae!==!1&&M.push(" ",J,'="',D(ae),'"');break;case 5:isNaN(ae)||M.push(" ",J,'="',D(ae),'"');break;case 6:!isNaN(ae)&&1<=ae&&M.push(" ",J,'="',D(ae),'"');break;default:H.sanitizeURL&&(ae=""+ae),M.push(" ",J,'="',D(ae),'"')}}else if(a(J)){switch(typeof ae){case"function":case"symbol":return;case"boolean":if(H=J.toLowerCase().slice(0,5),H!=="data-"&&H!=="aria-")return}M.push(" ",J,'="',D(ae),'"')}}}function Z(M,H,J){if(H!=null){if(J!=null)throw Error(t(60));if(typeof H!="object"||!("__html"in H))throw Error(t(61));H=H.__html,H!=null&&M.push(""+H)}}function U(M){var H="";return e.Children.forEach(M,function(J){J!=null&&(H+=J)}),H}function z(M,H,J,ae){M.push(Q(J));var ke=J=null,Te;for(Te in H)if(n.call(H,Te)){var Ue=H[Te];if(Ue!=null)switch(Te){case"children":J=Ue;break;case"dangerouslySetInnerHTML":ke=Ue;break;default:L(M,ae,Te,Ue)}}return M.push(">"),Z(M,ke,J),typeof J=="string"?(M.push(D(J)),null):J}var $=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,te=new Map;function Q(M){var H=te.get(M);if(H===void 0){if(!$.test(M))throw Error(t(65,M));H="<"+M,te.set(M,H)}return H}function ue(M,H,J,ae,ke){switch(H){case"select":M.push(Q("select"));var Te=null,Ue=null;for(Yt in J)if(n.call(J,Yt)){var ot=J[Yt];if(ot!=null)switch(Yt){case"children":Te=ot;break;case"dangerouslySetInnerHTML":Ue=ot;break;case"defaultValue":case"value":break;default:L(M,ae,Yt,ot)}}return M.push(">"),Z(M,Ue,Te),Te;case"option":Ue=ke.selectedValue,M.push(Q("option"));var ct=ot=null,Nt=null,Yt=null;for(Te in J)if(n.call(J,Te)){var Tn=J[Te];if(Tn!=null)switch(Te){case"children":ot=Tn;break;case"selected":Nt=Tn;break;case"dangerouslySetInnerHTML":Yt=Tn;break;case"value":ct=Tn;default:L(M,ae,Te,Tn)}}if(Ue!=null)if(J=ct!==null?""+ct:U(ot),k(Ue)){for(ae=0;ae<Ue.length;ae++)if(""+Ue[ae]===J){M.push(' selected=""');break}}else""+Ue===J&&M.push(' selected=""');else Nt&&M.push(' selected=""');return M.push(">"),Z(M,Yt,ot),ot;case"textarea":M.push(Q("textarea")),Yt=Ue=Te=null;for(ot in J)if(n.call(J,ot)&&(ct=J[ot],ct!=null))switch(ot){case"children":Yt=ct;break;case"value":Te=ct;break;case"defaultValue":Ue=ct;break;case"dangerouslySetInnerHTML":throw Error(t(91));default:L(M,ae,ot,ct)}if(Te===null&&Ue!==null&&(Te=Ue),M.push(">"),Yt!=null){if(Te!=null)throw Error(t(92));if(k(Yt)&&1<Yt.length)throw Error(t(93));Te=""+Yt}return typeof Te=="string"&&Te[0]===`
|
|
|
`&&M.push(`
|
|
|
`),Te!==null&&M.push(D(""+Te)),null;case"input":M.push(Q("input")),ct=Yt=ot=Te=null;for(Ue in J)if(n.call(J,Ue)&&(Nt=J[Ue],Nt!=null))switch(Ue){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,"input"));case"defaultChecked":ct=Nt;break;case"defaultValue":ot=Nt;break;case"checked":Yt=Nt;break;case"value":Te=Nt;break;default:L(M,ae,Ue,Nt)}return Yt!==null?L(M,ae,"checked",Yt):ct!==null&&L(M,ae,"checked",ct),Te!==null?L(M,ae,"value",Te):ot!==null&&L(M,ae,"value",ot),M.push("/>"),null;case"menuitem":M.push(Q("menuitem"));for(var Co in J)if(n.call(J,Co)&&(Te=J[Co],Te!=null))switch(Co){case"children":case"dangerouslySetInnerHTML":throw Error(t(400));default:L(M,ae,Co,Te)}return M.push(">"),null;case"title":M.push(Q("title")),Te=null;for(Tn in J)if(n.call(J,Tn)&&(Ue=J[Tn],Ue!=null))switch(Tn){case"children":Te=Ue;break;case"dangerouslySetInnerHTML":throw Error(t(434));default:L(M,ae,Tn,Ue)}return M.push(">"),Te;case"listing":case"pre":M.push(Q(H)),Ue=Te=null;for(ct in J)if(n.call(J,ct)&&(ot=J[ct],ot!=null))switch(ct){case"children":Te=ot;break;case"dangerouslySetInnerHTML":Ue=ot;break;default:L(M,ae,ct,ot)}if(M.push(">"),Ue!=null){if(Te!=null)throw Error(t(60));if(typeof Ue!="object"||!("__html"in Ue))throw Error(t(61));J=Ue.__html,J!=null&&(typeof J=="string"&&0<J.length&&J[0]===`
|
|
|
`?M.push(`
|
|
|
`,J):M.push(""+J))}return typeof Te=="string"&&Te[0]===`
|
|
|
`&&M.push(`
|
|
|
`),Te;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":M.push(Q(H));for(var mo in J)if(n.call(J,mo)&&(Te=J[mo],Te!=null))switch(mo){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,H));default:L(M,ae,mo,Te)}return M.push("/>"),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return z(M,J,H,ae);case"html":return ke.insertionMode===0&&M.push("<!DOCTYPE html>"),z(M,J,H,ae);default:if(H.indexOf("-")===-1&&typeof J.is!="string")return z(M,J,H,ae);M.push(Q(H)),Ue=Te=null;for(Nt in J)if(n.call(J,Nt)&&(ot=J[Nt],ot!=null))switch(Nt){case"children":Te=ot;break;case"dangerouslySetInnerHTML":Ue=ot;break;case"style":B(M,ae,ot);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:a(Nt)&&typeof ot!="function"&&typeof ot!="symbol"&&M.push(" ",Nt,'="',D(ot),'"')}return M.push(">"),Z(M,Ue,Te),Te}}function ee(M,H,J){if(M.push('<!--$?--><template id="'),J===null)throw Error(t(395));return M.push(J),M.push('"></template>')}function le(M,H,J,ae){switch(J.insertionMode){case 0:case 1:return M.push('<div hidden id="'),M.push(H.segmentPrefix),H=ae.toString(16),M.push(H),M.push('">');case 2:return M.push('<svg aria-hidden="true" style="display:none" id="'),M.push(H.segmentPrefix),H=ae.toString(16),M.push(H),M.push('">');case 3:return M.push('<math aria-hidden="true" style="display:none" id="'),M.push(H.segmentPrefix),H=ae.toString(16),M.push(H),M.push('">');case 4:return M.push('<table hidden id="'),M.push(H.segmentPrefix),H=ae.toString(16),M.push(H),M.push('">');case 5:return M.push('<table hidden><tbody id="'),M.push(H.segmentPrefix),H=ae.toString(16),M.push(H),M.push('">');case 6:return M.push('<table hidden><tr id="'),M.push(H.segmentPrefix),H=ae.toString(16),M.push(H),M.push('">');case 7:return M.push('<table hidden><colgroup id="'),M.push(H.segmentPrefix),H=ae.toString(16),M.push(H),M.push('">');default:throw Error(t(397))}}function W(M,H){switch(H.insertionMode){case 0:case 1:return M.push("</div>");case 2:return M.push("</svg>");case 3:return M.push("</math>");case 4:return M.push("</table>");case 5:return M.push("</tbody></table>");case 6:return M.push("</tr></table>");case 7:return M.push("</colgroup></table>");default:throw Error(t(397))}}var de=/[<\u2028\u2029]/g;function oe(M){return JSON.stringify(M).replace(de,function(H){switch(H){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}function he(M,H){return H=H===void 0?"":H,{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:H+"P:",segmentPrefix:H+"S:",boundaryPrefix:H+"B:",idPrefix:H,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:M}}function K(M,H,J,ae){return J.generateStaticMarkup?(M.push(D(H)),!1):(H===""?M=ae:(ae&&M.push("<!-- -->"),M.push(D(H)),M=!0),M)}var re=Object.assign,pe=Symbol.for("react.element"),Ie=Symbol.for("react.portal"),Oe=Symbol.for("react.fragment"),Ne=Symbol.for("react.strict_mode"),Be=Symbol.for("react.profiler"),Je=Symbol.for("react.provider"),ze=Symbol.for("react.context"),Qe=Symbol.for("react.forward_ref"),It=Symbol.for("react.suspense"),Zt=Symbol.for("react.suspense_list"),Re=Symbol.for("react.memo"),tt=Symbol.for("react.lazy"),at=Symbol.for("react.scope"),gt=Symbol.for("react.debug_trace_mode"),Et=Symbol.for("react.legacy_hidden"),Tt=Symbol.for("react.default_value"),qt=Symbol.iterator;function zt(M){if(M==null)return null;if(typeof M=="function")return M.displayName||M.name||null;if(typeof M=="string")return M;switch(M){case Oe:return"Fragment";case Ie:return"Portal";case Be:return"Profiler";case Ne:return"StrictMode";case It:return"Suspense";case Zt:return"SuspenseList"}if(typeof M=="object")switch(M.$$typeof){case ze:return(M.displayName||"Context")+".Consumer";case Je:return(M._context.displayName||"Context")+".Provider";case Qe:var H=M.render;return M=M.displayName,M||(M=H.displayName||H.name||"",M=M!==""?"ForwardRef("+M+")":"ForwardRef"),M;case Re:return H=M.displayName||null,H!==null?H:zt(M.type)||"Memo";case tt:H=M._payload,M=M._init;try{return zt(M(H))}catch{}}return null}var $t={};function Gt(M,H){if(M=M.contextTypes,!M)return $t;var J={},ae;for(ae in M)J[ae]=H[ae];return J}var cn=null;function Xt(M,H){if(M!==H){M.context._currentValue2=M.parentValue,M=M.parent;var J=H.parent;if(M===null){if(J!==null)throw Error(t(401))}else{if(J===null)throw Error(t(401));Xt(M,J)}H.context._currentValue2=H.value}}function Qn(M){M.context._currentValue2=M.parentValue,M=M.parent,M!==null&&Qn(M)}function En(M){var H=M.parent;H!==null&&En(H),M.context._currentValue2=M.value}function Cr(M,H){if(M.context._currentValue2=M.parentValue,M=M.parent,M===null)throw Error(t(402));M.depth===H.depth?Xt(M,H):Cr(M,H)}function yr(M,H){var J=H.parent;if(J===null)throw Error(t(402));M.depth===J.depth?Xt(M,J):yr(M,J),H.context._currentValue2=H.value}function Rn(M){var H=cn;H!==M&&(H===null?En(M):M===null?Qn(H):H.depth===M.depth?Xt(H,M):H.depth>M.depth?Cr(H,M):yr(H,M),cn=M)}var ji={isMounted:function(){return!1},enqueueSetState:function(M,H){M=M._reactInternals,M.queue!==null&&M.queue.push(H)},enqueueReplaceState:function(M,H){M=M._reactInternals,M.replace=!0,M.queue=[H]},enqueueForceUpdate:function(){}};function xo(M,H,J,ae){var ke=M.state!==void 0?M.state:null;M.updater=ji,M.props=J,M.state=ke;var Te={queue:[],replace:!1};M._reactInternals=Te;var Ue=H.contextType;if(M.context=typeof Ue=="object"&&Ue!==null?Ue._currentValue2:ae,Ue=H.getDerivedStateFromProps,typeof Ue=="function"&&(Ue=Ue(J,ke),ke=Ue==null?ke:re({},ke,Ue),M.state=ke),typeof H.getDerivedStateFromProps!="function"&&typeof M.getSnapshotBeforeUpdate!="function"&&(typeof M.UNSAFE_componentWillMount=="function"||typeof M.componentWillMount=="function"))if(H=M.state,typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount(),H!==M.state&&ji.enqueueReplaceState(M,M.state,null),Te.queue!==null&&0<Te.queue.length)if(H=Te.queue,Ue=Te.replace,Te.queue=null,Te.replace=!1,Ue&&H.length===1)M.state=H[0];else{for(Te=Ue?H[0]:M.state,ke=!0,Ue=Ue?1:0;Ue<H.length;Ue++){var ot=H[Ue];ot=typeof ot=="function"?ot.call(M,Te,J,ae):ot,ot!=null&&(ke?(ke=!1,Te=re({},Te,ot)):re(Te,ot))}M.state=Te}else Te.queue=null}var Uo={id:1,overflow:""};function Li(M,H,J){var ae=M.id;M=M.overflow;var ke=32-Eo(ae)-1;ae&=~(1<<ke),J+=1;var Te=32-Eo(H)+ke;if(30<Te){var Ue=ke-ke%5;return Te=(ae&(1<<Ue)-1).toString(32),ae>>=Ue,ke-=Ue,{id:1<<32-Eo(H)+ke|J<<ke|ae,overflow:Te+M}}return{id:1<<Te|J<<ke|ae,overflow:M}}var Eo=Math.clz32?Math.clz32:ui,Ri=Math.log,ua=Math.LN2;function ui(M){return M>>>=0,M===0?32:31-(Ri(M)/ua|0)|0}function _i(M,H){return M===H&&(M!==0||1/M===1/H)||M!==M&&H!==H}var ne=typeof Object.is=="function"?Object.is:_i,ge=null,Ae=null,He=null,Ye=null,et=!1,nt=!1,kt=0,en=null,jn=0;function wn(){if(ge===null)throw Error(t(321));return ge}function Lr(){if(0<jn)throw Error(t(312));return{memoizedState:null,queue:null,next:null}}function _n(){return Ye===null?He===null?(et=!1,He=Ye=Lr()):(et=!0,Ye=He):Ye.next===null?(et=!1,Ye=Ye.next=Lr()):(et=!0,Ye=Ye.next),Ye}function rr(){Ae=ge=null,nt=!1,He=null,jn=0,Ye=en=null}function Rr(M,H){return typeof H=="function"?H(M):H}function ca(M,H,J){if(ge=wn(),Ye=_n(),et){var ae=Ye.queue;if(H=ae.dispatch,en!==null&&(J=en.get(ae),J!==void 0)){en.delete(ae),ae=Ye.memoizedState;do ae=M(ae,J.action),J=J.next;while(J!==null);return Ye.memoizedState=ae,[ae,H]}return[Ye.memoizedState,H]}return M=M===Rr?typeof H=="function"?H():H:J!==void 0?J(H):H,Ye.memoizedState=M,M=Ye.queue={last:null,dispatch:null},M=M.dispatch=co.bind(null,ge,M),[Ye.memoizedState,M]}function bn(M,H){if(ge=wn(),Ye=_n(),H=H===void 0?null:H,Ye!==null){var J=Ye.memoizedState;if(J!==null&&H!==null){var ae=J[1];e:if(ae===null)ae=!1;else{for(var ke=0;ke<ae.length&&ke<H.length;ke++)if(!ne(H[ke],ae[ke])){ae=!1;break e}ae=!0}if(ae)return J[0]}}return M=M(),Ye.memoizedState=[M,H],M}function co(M,H,J){if(25<=jn)throw Error(t(301));if(M===ge)if(nt=!0,M={action:J,next:null},en===null&&(en=new Map),J=en.get(H),J===void 0)en.set(H,M);else{for(H=J;H.next!==null;)H=H.next;H.next=M}}function fo(){throw Error(t(394))}function Mr(){}var zo={readContext:function(M){return M._currentValue2},useContext:function(M){return wn(),M._currentValue2},useMemo:bn,useReducer:ca,useRef:function(M){ge=wn(),Ye=_n();var H=Ye.memoizedState;return H===null?(M={current:M},Ye.memoizedState=M):H},useState:function(M){return ca(Rr,M)},useInsertionEffect:Mr,useLayoutEffect:function(){},useCallback:function(M,H){return bn(function(){return M},H)},useImperativeHandle:Mr,useEffect:Mr,useDebugValue:Mr,useDeferredValue:function(M){return wn(),M},useTransition:function(){return wn(),[!1,fo]},useId:function(){var M=Ae.treeContext,H=M.overflow;M=M.id,M=(M&~(1<<32-Eo(M)-1)).toString(32)+H;var J=ho;if(J===null)throw Error(t(404));return H=kt++,M=":"+J.idPrefix+"R"+M,0<H&&(M+="H"+H.toString(32)),M+":"},useMutableSource:function(M,H){return wn(),H(M._source)},useSyncExternalStore:function(M,H,J){if(J===void 0)throw Error(t(407));return J()}},ho=null,bl=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function Bi(M){return console.error(M),null}function Hi(){}function cu(M,H,J,ae,ke,Te,Ue,ot,ct){var Nt=[],Yt=new Set;return H={destination:null,responseState:H,progressiveChunkSize:ae===void 0?12800:ae,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:Yt,pingedTasks:Nt,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:ke===void 0?Bi:ke,onAllReady:Te===void 0?Hi:Te,onShellReady:Ue===void 0?Hi:Ue,onShellError:ot===void 0?Hi:ot,onFatalError:ct===void 0?Hi:ct},J=Ba(H,0,null,J,!1,!1),J.parentFlushed=!0,M=Sl(H,M,null,J,Yt,$t,null,Uo),Nt.push(M),H}function Sl(M,H,J,ae,ke,Te,Ue,ot){M.allPendingTasks++,J===null?M.pendingRootTasks++:J.pendingTasks++;var ct={node:H,ping:function(){var Nt=M.pingedTasks;Nt.push(ct),Nt.length===1&&po(M)},blockedBoundary:J,blockedSegment:ae,abortSet:ke,legacyContext:Te,context:Ue,treeContext:ot};return ke.add(ct),ct}function Ba(M,H,J,ae,ke,Te){return{status:0,id:-1,index:H,parentFlushed:!1,chunks:[],children:[],formatContext:ae,boundary:J,lastPushedText:ke,textEmbedded:Te}}function da(M,H){if(M=M.onError(H),M!=null&&typeof M!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof M+'" instead');return M}function Ha(M,H){var J=M.onShellError;J(H),J=M.onFatalError,J(H),M.destination!==null?(M.status=2,M.destination.destroy(H)):(M.status=1,M.fatalError=H)}function Dl(M,H,J,ae,ke){for(ge={},Ae=H,kt=0,M=J(ae,ke);nt;)nt=!1,kt=0,jn+=1,Ye=null,M=J(ae,ke);return rr(),M}function Ya(M,H,J,ae){var ke=J.render(),Te=ae.childContextTypes;if(Te!=null){var Ue=H.legacyContext;if(typeof J.getChildContext!="function")ae=Ue;else{J=J.getChildContext();for(var ot in J)if(!(ot in Te))throw Error(t(108,zt(ae)||"Unknown",ot));ae=re({},Ue,J)}H.legacyContext=ae,_r(M,H,ke),H.legacyContext=Ue}else _r(M,H,ke)}function du(M,H){if(M&&M.defaultProps){H=re({},H),M=M.defaultProps;for(var J in M)H[J]===void 0&&(H[J]=M[J]);return H}return H}function Sn(M,H,J,ae,ke){if(typeof J=="function")if(J.prototype&&J.prototype.isReactComponent){ke=Gt(J,H.legacyContext);var Te=J.contextType;Te=new J(ae,typeof Te=="object"&&Te!==null?Te._currentValue2:ke),xo(Te,J,ae,ke),Ya(M,H,Te,J)}else{Te=Gt(J,H.legacyContext),ke=Dl(M,H,J,ae,Te);var Ue=kt!==0;if(typeof ke=="object"&&ke!==null&&typeof ke.render=="function"&&ke.$$typeof===void 0)xo(ke,J,ae,Te),Ya(M,H,ke,J);else if(Ue){ae=H.treeContext,H.treeContext=Li(ae,1,0);try{_r(M,H,ke)}finally{H.treeContext=ae}}else _r(M,H,ke)}else if(typeof J=="string"){switch(ke=H.blockedSegment,Te=ue(ke.chunks,J,ae,M.responseState,ke.formatContext),ke.lastPushedText=!1,Ue=ke.formatContext,ke.formatContext=R(Ue,J,ae),ws(M,H,Te),ke.formatContext=Ue,J){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:ke.chunks.push("</",J,">")}ke.lastPushedText=!1}else{switch(J){case Et:case gt:case Ne:case Be:case Oe:_r(M,H,ae.children);return;case Zt:_r(M,H,ae.children);return;case at:throw Error(t(343));case It:e:{J=H.blockedBoundary,ke=H.blockedSegment,Te=ae.fallback,ae=ae.children,Ue=new Set;var ot={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:Ue,errorDigest:null},ct=Ba(M,ke.chunks.length,ot,ke.formatContext,!1,!1);ke.children.push(ct),ke.lastPushedText=!1;var Nt=Ba(M,0,null,ke.formatContext,!1,!1);Nt.parentFlushed=!0,H.blockedBoundary=ot,H.blockedSegment=Nt;try{if(ws(M,H,ae),M.responseState.generateStaticMarkup||Nt.lastPushedText&&Nt.textEmbedded&&Nt.chunks.push("<!-- -->"),Nt.status=1,ci(ot,Nt),ot.pendingTasks===0)break e}catch(Yt){Nt.status=4,ot.forceClientRender=!0,ot.errorDigest=da(M,Yt)}finally{H.blockedBoundary=J,H.blockedSegment=ke}H=Sl(M,Te,J,ct,Ue,H.legacyContext,H.context,H.treeContext),M.pingedTasks.push(H)}return}if(typeof J=="object"&&J!==null)switch(J.$$typeof){case Qe:if(ae=Dl(M,H,J.render,ae,ke),kt!==0){J=H.treeContext,H.treeContext=Li(J,1,0);try{_r(M,H,ae)}finally{H.treeContext=J}}else _r(M,H,ae);return;case Re:J=J.type,ae=du(J,ae),Sn(M,H,J,ae,ke);return;case Je:if(ke=ae.children,J=J._context,ae=ae.value,Te=J._currentValue2,J._currentValue2=ae,Ue=cn,cn=ae={parent:Ue,depth:Ue===null?0:Ue.depth+1,context:J,parentValue:Te,value:ae},H.context=ae,_r(M,H,ke),M=cn,M===null)throw Error(t(403));ae=M.parentValue,M.context._currentValue2=ae===Tt?M.context._defaultValue:ae,M=cn=M.parent,H.context=M;return;case ze:ae=ae.children,ae=ae(J._currentValue2),_r(M,H,ae);return;case tt:ke=J._init,J=ke(J._payload),ae=du(J,ae),Sn(M,H,J,ae,void 0);return}throw Error(t(130,J==null?J:typeof J,""))}}function _r(M,H,J){if(H.node=J,typeof J=="object"&&J!==null){switch(J.$$typeof){case pe:Sn(M,H,J.type,J.props,J.ref);return;case Ie:throw Error(t(257));case tt:var ae=J._init;J=ae(J._payload),_r(M,H,J);return}if(k(J)){vs(M,H,J);return}if(J===null||typeof J!="object"?ae=null:(ae=qt&&J[qt]||J["@@iterator"],ae=typeof ae=="function"?ae:null),ae&&(ae=ae.call(J))){if(J=ae.next(),!J.done){var ke=[];do ke.push(J.value),J=ae.next();while(!J.done);vs(M,H,ke)}return}throw M=Object.prototype.toString.call(J),Error(t(31,M==="[object Object]"?"object with keys {"+Object.keys(J).join(", ")+"}":M))}typeof J=="string"?(ae=H.blockedSegment,ae.lastPushedText=K(H.blockedSegment.chunks,J,M.responseState,ae.lastPushedText)):typeof J=="number"&&(ae=H.blockedSegment,ae.lastPushedText=K(H.blockedSegment.chunks,""+J,M.responseState,ae.lastPushedText))}function vs(M,H,J){for(var ae=J.length,ke=0;ke<ae;ke++){var Te=H.treeContext;H.treeContext=Li(Te,ae,ke);try{ws(M,H,J[ke])}finally{H.treeContext=Te}}}function ws(M,H,J){var ae=H.blockedSegment.formatContext,ke=H.legacyContext,Te=H.context;try{return _r(M,H,J)}catch(ct){if(rr(),typeof ct=="object"&&ct!==null&&typeof ct.then=="function"){J=ct;var Ue=H.blockedSegment,ot=Ba(M,Ue.chunks.length,null,Ue.formatContext,Ue.lastPushedText,!0);Ue.children.push(ot),Ue.lastPushedText=!1,M=Sl(M,H.node,H.blockedBoundary,ot,H.abortSet,H.legacyContext,H.context,H.treeContext).ping,J.then(M,M),H.blockedSegment.formatContext=ae,H.legacyContext=ke,H.context=Te,Rn(Te)}else throw H.blockedSegment.formatContext=ae,H.legacyContext=ke,H.context=Te,Rn(Te),ct}}function Yi(M){var H=M.blockedBoundary;M=M.blockedSegment,M.status=3,Vo(this,H,M)}function Tl(M,H,J){var ae=M.blockedBoundary;M.blockedSegment.status=3,ae===null?(H.allPendingTasks--,H.status!==2&&(H.status=2,H.destination!==null&&H.destination.push(null))):(ae.pendingTasks--,ae.forceClientRender||(ae.forceClientRender=!0,M=J===void 0?Error(t(432)):J,ae.errorDigest=H.onError(M),ae.parentFlushed&&H.clientRenderedBoundaries.push(ae)),ae.fallbackAbortableTasks.forEach(function(ke){return Tl(ke,H,J)}),ae.fallbackAbortableTasks.clear(),H.allPendingTasks--,H.allPendingTasks===0&&(ae=H.onAllReady,ae()))}function ci(M,H){if(H.chunks.length===0&&H.children.length===1&&H.children[0].boundary===null){var J=H.children[0];J.id=H.id,J.parentFlushed=!0,J.status===1&&ci(M,J)}else M.completedSegments.push(H)}function Vo(M,H,J){if(H===null){if(J.parentFlushed){if(M.completedRootSegment!==null)throw Error(t(389));M.completedRootSegment=J}M.pendingRootTasks--,M.pendingRootTasks===0&&(M.onShellError=Hi,H=M.onShellReady,H())}else H.pendingTasks--,H.forceClientRender||(H.pendingTasks===0?(J.parentFlushed&&J.status===1&&ci(H,J),H.parentFlushed&&M.completedBoundaries.push(H),H.fallbackAbortableTasks.forEach(Yi,M),H.fallbackAbortableTasks.clear()):J.parentFlushed&&J.status===1&&(ci(H,J),H.completedSegments.length===1&&H.parentFlushed&&M.partialBoundaries.push(H)));M.allPendingTasks--,M.allPendingTasks===0&&(M=M.onAllReady,M())}function po(M){if(M.status!==2){var H=cn,J=bl.current;bl.current=zo;var ae=ho;ho=M.responseState;try{var ke=M.pingedTasks,Te;for(Te=0;Te<ke.length;Te++){var Ue=ke[Te],ot=M,ct=Ue.blockedSegment;if(ct.status===0){Rn(Ue.context);try{_r(ot,Ue,Ue.node),ot.responseState.generateStaticMarkup||ct.lastPushedText&&ct.textEmbedded&&ct.chunks.push("<!-- -->"),Ue.abortSet.delete(Ue),ct.status=1,Vo(ot,Ue.blockedBoundary,ct)}catch(Br){if(rr(),typeof Br=="object"&&Br!==null&&typeof Br.then=="function"){var Nt=Ue.ping;Br.then(Nt,Nt)}else{Ue.abortSet.delete(Ue),ct.status=4;var Yt=Ue.blockedBoundary,Tn=Br,Co=da(ot,Tn);if(Yt===null?Ha(ot,Tn):(Yt.pendingTasks--,Yt.forceClientRender||(Yt.forceClientRender=!0,Yt.errorDigest=Co,Yt.parentFlushed&&ot.clientRenderedBoundaries.push(Yt))),ot.allPendingTasks--,ot.allPendingTasks===0){var mo=ot.onAllReady;mo()}}}}}ke.splice(0,Te),M.destination!==null&&Wo(M,M.destination)}catch(Br){da(M,Br),Ha(M,Br)}finally{ho=ae,bl.current=J,J===zo&&Rn(H)}}}function Ua(M,H,J){switch(J.parentFlushed=!0,J.status){case 0:var ae=J.id=M.nextSegmentId++;return J.lastPushedText=!1,J.textEmbedded=!1,M=M.responseState,H.push('<template id="'),H.push(M.placeholderPrefix),M=ae.toString(16),H.push(M),H.push('"></template>');case 1:J.status=2;var ke=!0;ae=J.chunks;var Te=0;J=J.children;for(var Ue=0;Ue<J.length;Ue++){for(ke=J[Ue];Te<ke.index;Te++)H.push(ae[Te]);ke=vr(M,H,ke)}for(;Te<ae.length-1;Te++)H.push(ae[Te]);return Te<ae.length&&(ke=H.push(ae[Te])),ke;default:throw Error(t(390))}}function vr(M,H,J){var ae=J.boundary;if(ae===null)return Ua(M,H,J);if(ae.parentFlushed=!0,ae.forceClientRender)return M.responseState.generateStaticMarkup||(ae=ae.errorDigest,H.push("<!--$!-->"),H.push("<template"),ae&&(H.push(' data-dgst="'),ae=D(ae),H.push(ae),H.push('"')),H.push("></template>")),Ua(M,H,J),M=M.responseState.generateStaticMarkup?!0:H.push("<!--/$-->"),M;if(0<ae.pendingTasks){ae.rootSegmentID=M.nextSegmentId++,0<ae.completedSegments.length&&M.partialBoundaries.push(ae);var ke=M.responseState,Te=ke.nextSuspenseID++;return ke=ke.boundaryPrefix+Te.toString(16),ae=ae.id=ke,ee(H,M.responseState,ae),Ua(M,H,J),H.push("<!--/$-->")}if(ae.byteSize>M.progressiveChunkSize)return ae.rootSegmentID=M.nextSegmentId++,M.completedBoundaries.push(ae),ee(H,M.responseState,ae.id),Ua(M,H,J),H.push("<!--/$-->");if(M.responseState.generateStaticMarkup||H.push("<!--$-->"),J=ae.completedSegments,J.length!==1)throw Error(t(391));return vr(M,H,J[0]),M=M.responseState.generateStaticMarkup?!0:H.push("<!--/$-->"),M}function bs(M,H,J){return le(H,M.responseState,J.formatContext,J.id),vr(M,H,J),W(H,J.formatContext)}function Ss(M,H,J){for(var ae=J.completedSegments,ke=0;ke<ae.length;ke++)Ds(M,H,J,ae[ke]);if(ae.length=0,M=M.responseState,ae=J.id,J=J.rootSegmentID,H.push(M.startInlineScript),M.sentCompleteBoundaryFunction?H.push('$RC("'):(M.sentCompleteBoundaryFunction=!0,H.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),ae===null)throw Error(t(395));return J=J.toString(16),H.push(ae),H.push('","'),H.push(M.segmentPrefix),H.push(J),H.push('")<\/script>')}function Ds(M,H,J,ae){if(ae.status===2)return!0;var ke=ae.id;if(ke===-1){if((ae.id=J.rootSegmentID)===-1)throw Error(t(392));return bs(M,H,ae)}return bs(M,H,ae),M=M.responseState,H.push(M.startInlineScript),M.sentCompleteSegmentFunction?H.push('$RS("'):(M.sentCompleteSegmentFunction=!0,H.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),H.push(M.segmentPrefix),ke=ke.toString(16),H.push(ke),H.push('","'),H.push(M.placeholderPrefix),H.push(ke),H.push('")<\/script>')}function Wo(M,H){try{var J=M.completedRootSegment;if(J!==null&&M.pendingRootTasks===0){vr(M,H,J),M.completedRootSegment=null;var ae=M.responseState.bootstrapChunks;for(J=0;J<ae.length-1;J++)H.push(ae[J]);J<ae.length&&H.push(ae[J])}var ke=M.clientRenderedBoundaries,Te;for(Te=0;Te<ke.length;Te++){var Ue=ke[Te];ae=H;var ot=M.responseState,ct=Ue.id,Nt=Ue.errorDigest,Yt=Ue.errorMessage,Tn=Ue.errorComponentStack;if(ae.push(ot.startInlineScript),ot.sentClientRenderFunction?ae.push('$RX("'):(ot.sentClientRenderFunction=!0,ae.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')),ct===null)throw Error(t(395));if(ae.push(ct),ae.push('"'),Nt||Yt||Tn){ae.push(",");var Co=oe(Nt||"");ae.push(Co)}if(Yt||Tn){ae.push(",");var mo=oe(Yt||"");ae.push(mo)}if(Tn){ae.push(",");var Br=oe(Tn);ae.push(Br)}if(!ae.push(")<\/script>")){M.destination=null,Te++,ke.splice(0,Te);return}}ke.splice(0,Te);var di=M.completedBoundaries;for(Te=0;Te<di.length;Te++)if(!Ss(M,H,di[Te])){M.destination=null,Te++,di.splice(0,Te);return}di.splice(0,Te);var go=M.partialBoundaries;for(Te=0;Te<go.length;Te++){var Mo=go[Te];e:{ke=M,Ue=H;var qr=Mo.completedSegments;for(ot=0;ot<qr.length;ot++)if(!Ds(ke,Ue,Mo,qr[ot])){ot++,qr.splice(0,ot);var $o=!1;break e}qr.splice(0,ot),$o=!0}if(!$o){M.destination=null,Te++,go.splice(0,Te);return}}go.splice(0,Te);var yo=M.completedBoundaries;for(Te=0;Te<yo.length;Te++)if(!Ss(M,H,yo[Te])){M.destination=null,Te++,yo.splice(0,Te);return}yo.splice(0,Te)}finally{M.allPendingTasks===0&&M.pingedTasks.length===0&&M.clientRenderedBoundaries.length===0&&M.completedBoundaries.length===0&&H.push(null)}}function za(M,H){try{var J=M.abortableTasks;J.forEach(function(ae){return Tl(ae,M,H)}),J.clear(),M.destination!==null&&Wo(M,M.destination)}catch(ae){da(M,ae),Ha(M,ae)}}function Ui(){}function Zo(M,H,J,ae){var ke=!1,Te=null,Ue="",ot={push:function(Nt){return Nt!==null&&(Ue+=Nt),!0},destroy:function(Nt){ke=!0,Te=Nt}},ct=!1;if(M=cu(M,he(J,H?H.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,Ui,void 0,function(){ct=!0},void 0,void 0),po(M),za(M,ae),M.status===1)M.status=2,ot.destroy(M.fatalError);else if(M.status!==2&&M.destination===null){M.destination=ot;try{Wo(M,ot)}catch(Nt){da(M,Nt),Ha(M,Nt)}}if(ke)throw Te;if(!ct)throw Error(t(426));return Ue}return ud.renderToNodeStream=function(){throw Error(t(207))},ud.renderToStaticMarkup=function(M,H){return Zo(M,H,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},ud.renderToStaticNodeStream=function(){throw Error(t(208))},ud.renderToString=function(M,H){return Zo(M,H,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},ud.version="18.2.0",ud}var Jy={},RI;function ute(){if(RI)return Jy;RI=1;var e=F;function t(N){for(var _="https://reactjs.org/docs/error-decoder.html?invariant="+N,q=1;q<arguments.length;q++)_+="&args[]="+encodeURIComponent(arguments[q]);return"Minified React error #"+N+"; visit "+_+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=null,r=0;function o(N,_){if(_.length!==0)if(512<_.length)0<r&&(N.enqueue(new Uint8Array(n.buffer,0,r)),n=new Uint8Array(512),r=0),N.enqueue(_);else{var q=n.length-r;q<_.length&&(q===0?N.enqueue(n):(n.set(_.subarray(0,q),r),N.enqueue(n),_=_.subarray(q)),n=new Uint8Array(512),r=0),n.set(_,r),r+=_.length}}function i(N,_){return o(N,_),!0}function a(N){n&&0<r&&(N.enqueue(new Uint8Array(n.buffer,0,r)),n=null,r=0)}var u=new TextEncoder;function d(N){return u.encode(N)}function f(N){return u.encode(N)}function m(N,_){typeof N.error=="function"?N.error(_):N.close()}var g=Object.prototype.hasOwnProperty,v=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,w={},D={};function T(N){return g.call(D,N)?!0:g.call(w,N)?!1:v.test(N)?D[N]=!0:(w[N]=!0,!1)}function I(N,_,q,ie,Fe,xe,We){this.acceptsBooleans=_===2||_===3||_===4,this.attributeName=ie,this.attributeNamespace=Fe,this.mustUseProperty=q,this.propertyName=N,this.type=_,this.sanitizeURL=xe,this.removeEmptyString=We}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(N){k[N]=new I(N,0,!1,N,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(N){var _=N[0];k[_]=new I(_,1,!1,N[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(N){k[N]=new I(N,2,!1,N.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(N){k[N]=new I(N,2,!1,N,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(N){k[N]=new I(N,3,!1,N.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(N){k[N]=new I(N,3,!0,N,null,!1,!1)}),["capture","download"].forEach(function(N){k[N]=new I(N,4,!1,N,null,!1,!1)}),["cols","rows","size","span"].forEach(function(N){k[N]=new I(N,6,!1,N,null,!1,!1)}),["rowSpan","start"].forEach(function(N){k[N]=new I(N,5,!1,N.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function R(N){return N[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(N){var _=N.replace(A,R);k[_]=new I(_,1,!1,N,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(N){var _=N.replace(A,R);k[_]=new I(_,1,!1,N,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(N){var _=N.replace(A,R);k[_]=new I(_,1,!1,N,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(N){k[N]=new I(N,1,!1,N.toLowerCase(),null,!1,!1)}),k.xlinkHref=new I("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(N){k[N]=new I(N,1,!1,N.toLowerCase(),null,!0,!0)});var j={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},B=["Webkit","ms","Moz","O"];Object.keys(j).forEach(function(N){B.forEach(function(_){_=_+N.charAt(0).toUpperCase()+N.substring(1),j[_]=j[N]})});var L=/["'&<>]/;function Z(N){if(typeof N=="boolean"||typeof N=="number")return""+N;N=""+N;var _=L.exec(N);if(_){var q="",ie,Fe=0;for(ie=_.index;ie<N.length;ie++){switch(N.charCodeAt(ie)){case 34:_=""";break;case 38:_="&";break;case 39:_="'";break;case 60:_="<";break;case 62:_=">";break;default:continue}Fe!==ie&&(q+=N.substring(Fe,ie)),Fe=ie+1,q+=_}N=Fe!==ie?q+N.substring(Fe,ie):q}return N}var U=/([A-Z])/g,z=/^ms-/,$=Array.isArray,te=f("<script>"),Q=f("<\/script>"),ue=f('<script src="'),ee=f('<script type="module" src="'),le=f('" async=""><\/script>'),W=/(<\/|<)(s)(cript)/gi;function de(N,_,q,ie){return _+(q==="s"?"\\u0073":"\\u0053")+ie}function oe(N,_,q,ie,Fe){N=N===void 0?"":N,_=_===void 0?te:f('<script nonce="'+Z(_)+'">');var xe=[];if(q!==void 0&&xe.push(_,d((""+q).replace(W,de)),Q),ie!==void 0)for(q=0;q<ie.length;q++)xe.push(ue,d(Z(ie[q])),le);if(Fe!==void 0)for(ie=0;ie<Fe.length;ie++)xe.push(ee,d(Z(Fe[ie])),le);return{bootstrapChunks:xe,startInlineScript:_,placeholderPrefix:f(N+"P:"),segmentPrefix:f(N+"S:"),boundaryPrefix:N+"B:",idPrefix:N,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}function he(N,_){return{insertionMode:N,selectedValue:_}}function K(N){return he(N==="http://www.w3.org/2000/svg"?2:N==="http://www.w3.org/1998/Math/MathML"?3:0,null)}function re(N,_,q){switch(_){case"select":return he(1,q.value!=null?q.value:q.defaultValue);case"svg":return he(2,null);case"math":return he(3,null);case"foreignObject":return he(1,null);case"table":return he(4,null);case"thead":case"tbody":case"tfoot":return he(5,null);case"colgroup":return he(7,null);case"tr":return he(6,null)}return 4<=N.insertionMode||N.insertionMode===0?he(1,null):N}var pe=f("<!-- -->");function Ie(N,_,q,ie){return _===""?ie:(ie&&N.push(pe),N.push(d(Z(_))),!0)}var Oe=new Map,Ne=f(' style="'),Be=f(":"),Je=f(";");function ze(N,_,q){if(typeof q!="object")throw Error(t(62));_=!0;for(var ie in q)if(g.call(q,ie)){var Fe=q[ie];if(Fe!=null&&typeof Fe!="boolean"&&Fe!==""){if(ie.indexOf("--")===0){var xe=d(Z(ie));Fe=d(Z((""+Fe).trim()))}else{xe=ie;var We=Oe.get(xe);We!==void 0||(We=f(Z(xe.replace(U,"-$1").toLowerCase().replace(z,"-ms-"))),Oe.set(xe,We)),xe=We,Fe=typeof Fe=="number"?Fe===0||g.call(j,ie)?d(""+Fe):d(Fe+"px"):d(Z((""+Fe).trim()))}_?(_=!1,N.push(Ne,xe,Be,Fe)):N.push(Je,xe,Be,Fe)}}_||N.push(Zt)}var Qe=f(" "),It=f('="'),Zt=f('"'),Re=f('=""');function tt(N,_,q,ie){switch(q){case"style":ze(N,_,ie);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<q.length)||q[0]!=="o"&&q[0]!=="O"||q[1]!=="n"&&q[1]!=="N"){if(_=k.hasOwnProperty(q)?k[q]:null,_!==null){switch(typeof ie){case"function":case"symbol":return;case"boolean":if(!_.acceptsBooleans)return}switch(q=d(_.attributeName),_.type){case 3:ie&&N.push(Qe,q,Re);break;case 4:ie===!0?N.push(Qe,q,Re):ie!==!1&&N.push(Qe,q,It,d(Z(ie)),Zt);break;case 5:isNaN(ie)||N.push(Qe,q,It,d(Z(ie)),Zt);break;case 6:!isNaN(ie)&&1<=ie&&N.push(Qe,q,It,d(Z(ie)),Zt);break;default:_.sanitizeURL&&(ie=""+ie),N.push(Qe,q,It,d(Z(ie)),Zt)}}else if(T(q)){switch(typeof ie){case"function":case"symbol":return;case"boolean":if(_=q.toLowerCase().slice(0,5),_!=="data-"&&_!=="aria-")return}N.push(Qe,d(q),It,d(Z(ie)),Zt)}}}var at=f(">"),gt=f("/>");function Et(N,_,q){if(_!=null){if(q!=null)throw Error(t(60));if(typeof _!="object"||!("__html"in _))throw Error(t(61));_=_.__html,_!=null&&N.push(d(""+_))}}function Tt(N){var _="";return e.Children.forEach(N,function(q){q!=null&&(_+=q)}),_}var qt=f(' selected=""');function zt(N,_,q,ie){N.push(Xt(q));var Fe=q=null,xe;for(xe in _)if(g.call(_,xe)){var We=_[xe];if(We!=null)switch(xe){case"children":q=We;break;case"dangerouslySetInnerHTML":Fe=We;break;default:tt(N,ie,xe,We)}}return N.push(at),Et(N,Fe,q),typeof q=="string"?(N.push(d(Z(q))),null):q}var $t=f(`
|
|
|
`),Gt=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,cn=new Map;function Xt(N){var _=cn.get(N);if(_===void 0){if(!Gt.test(N))throw Error(t(65,N));_=f("<"+N),cn.set(N,_)}return _}var Qn=f("<!DOCTYPE html>");function En(N,_,q,ie,Fe){switch(_){case"select":N.push(Xt("select"));var xe=null,We=null;for(jt in q)if(g.call(q,jt)){var rt=q[jt];if(rt!=null)switch(jt){case"children":xe=rt;break;case"dangerouslySetInnerHTML":We=rt;break;case"defaultValue":case"value":break;default:tt(N,ie,jt,rt)}}return N.push(at),Et(N,We,xe),xe;case"option":We=Fe.selectedValue,N.push(Xt("option"));var St=rt=null,Vt=null,jt=null;for(xe in q)if(g.call(q,xe)){var Mn=q[xe];if(Mn!=null)switch(xe){case"children":rt=Mn;break;case"selected":Vt=Mn;break;case"dangerouslySetInnerHTML":jt=Mn;break;case"value":St=Mn;default:tt(N,ie,xe,Mn)}}if(We!=null)if(q=St!==null?""+St:Tt(rt),$(We)){for(ie=0;ie<We.length;ie++)if(""+We[ie]===q){N.push(qt);break}}else""+We===q&&N.push(qt);else Vt&&N.push(qt);return N.push(at),Et(N,jt,rt),rt;case"textarea":N.push(Xt("textarea")),jt=We=xe=null;for(rt in q)if(g.call(q,rt)&&(St=q[rt],St!=null))switch(rt){case"children":jt=St;break;case"value":xe=St;break;case"defaultValue":We=St;break;case"dangerouslySetInnerHTML":throw Error(t(91));default:tt(N,ie,rt,St)}if(xe===null&&We!==null&&(xe=We),N.push(at),jt!=null){if(xe!=null)throw Error(t(92));if($(jt)&&1<jt.length)throw Error(t(93));xe=""+jt}return typeof xe=="string"&&xe[0]===`
|
|
|
`&&N.push($t),xe!==null&&N.push(d(Z(""+xe))),null;case"input":N.push(Xt("input")),St=jt=rt=xe=null;for(We in q)if(g.call(q,We)&&(Vt=q[We],Vt!=null))switch(We){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,"input"));case"defaultChecked":St=Vt;break;case"defaultValue":rt=Vt;break;case"checked":jt=Vt;break;case"value":xe=Vt;break;default:tt(N,ie,We,Vt)}return jt!==null?tt(N,ie,"checked",jt):St!==null&&tt(N,ie,"checked",St),xe!==null?tt(N,ie,"value",xe):rt!==null&&tt(N,ie,"value",rt),N.push(gt),null;case"menuitem":N.push(Xt("menuitem"));for(var Yr in q)if(g.call(q,Yr)&&(xe=q[Yr],xe!=null))switch(Yr){case"children":case"dangerouslySetInnerHTML":throw Error(t(400));default:tt(N,ie,Yr,xe)}return N.push(at),null;case"title":N.push(Xt("title")),xe=null;for(Mn in q)if(g.call(q,Mn)&&(We=q[Mn],We!=null))switch(Mn){case"children":xe=We;break;case"dangerouslySetInnerHTML":throw Error(t(434));default:tt(N,ie,Mn,We)}return N.push(at),xe;case"listing":case"pre":N.push(Xt(_)),We=xe=null;for(St in q)if(g.call(q,St)&&(rt=q[St],rt!=null))switch(St){case"children":xe=rt;break;case"dangerouslySetInnerHTML":We=rt;break;default:tt(N,ie,St,rt)}if(N.push(at),We!=null){if(xe!=null)throw Error(t(60));if(typeof We!="object"||!("__html"in We))throw Error(t(61));q=We.__html,q!=null&&(typeof q=="string"&&0<q.length&&q[0]===`
|
|
|
`?N.push($t,d(q)):N.push(d(""+q)))}return typeof xe=="string"&&xe[0]===`
|
|
|
`&&N.push($t),xe;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":N.push(Xt(_));for(var ko in q)if(g.call(q,ko)&&(xe=q[ko],xe!=null))switch(ko){case"children":case"dangerouslySetInnerHTML":throw Error(t(399,_));default:tt(N,ie,ko,xe)}return N.push(gt),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return zt(N,q,_,ie);case"html":return Fe.insertionMode===0&&N.push(Qn),zt(N,q,_,ie);default:if(_.indexOf("-")===-1&&typeof q.is!="string")return zt(N,q,_,ie);N.push(Xt(_)),We=xe=null;for(Vt in q)if(g.call(q,Vt)&&(rt=q[Vt],rt!=null))switch(Vt){case"children":xe=rt;break;case"dangerouslySetInnerHTML":We=rt;break;case"style":ze(N,ie,rt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:T(Vt)&&typeof rt!="function"&&typeof rt!="symbol"&&N.push(Qe,d(Vt),It,d(Z(rt)),Zt)}return N.push(at),Et(N,We,xe),xe}}var Cr=f("</"),yr=f(">"),Rn=f('<template id="'),ji=f('"></template>'),xo=f("<!--$-->"),Uo=f('<!--$?--><template id="'),Li=f('"></template>'),Eo=f("<!--$!-->"),Ri=f("<!--/$-->"),ua=f("<template"),ui=f('"'),_i=f(' data-dgst="');f(' data-msg="'),f(' data-stck="');var ne=f("></template>");function ge(N,_,q){if(o(N,Uo),q===null)throw Error(t(395));return o(N,q),i(N,Li)}var Ae=f('<div hidden id="'),He=f('">'),Ye=f("</div>"),et=f('<svg aria-hidden="true" style="display:none" id="'),nt=f('">'),kt=f("</svg>"),en=f('<math aria-hidden="true" style="display:none" id="'),jn=f('">'),wn=f("</math>"),Lr=f('<table hidden id="'),_n=f('">'),rr=f("</table>"),Rr=f('<table hidden><tbody id="'),ca=f('">'),bn=f("</tbody></table>"),co=f('<table hidden><tr id="'),fo=f('">'),Mr=f("</tr></table>"),zo=f('<table hidden><colgroup id="'),ho=f('">'),bl=f("</colgroup></table>");function Bi(N,_,q,ie){switch(q.insertionMode){case 0:case 1:return o(N,Ae),o(N,_.segmentPrefix),o(N,d(ie.toString(16))),i(N,He);case 2:return o(N,et),o(N,_.segmentPrefix),o(N,d(ie.toString(16))),i(N,nt);case 3:return o(N,en),o(N,_.segmentPrefix),o(N,d(ie.toString(16))),i(N,jn);case 4:return o(N,Lr),o(N,_.segmentPrefix),o(N,d(ie.toString(16))),i(N,_n);case 5:return o(N,Rr),o(N,_.segmentPrefix),o(N,d(ie.toString(16))),i(N,ca);case 6:return o(N,co),o(N,_.segmentPrefix),o(N,d(ie.toString(16))),i(N,fo);case 7:return o(N,zo),o(N,_.segmentPrefix),o(N,d(ie.toString(16))),i(N,ho);default:throw Error(t(397))}}function Hi(N,_){switch(_.insertionMode){case 0:case 1:return i(N,Ye);case 2:return i(N,kt);case 3:return i(N,wn);case 4:return i(N,rr);case 5:return i(N,bn);case 6:return i(N,Mr);case 7:return i(N,bl);default:throw Error(t(397))}}var cu=f('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),Sl=f('$RS("'),Ba=f('","'),da=f('")<\/script>'),Ha=f('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),Dl=f('$RC("'),Ya=f('","'),du=f('")<\/script>'),Sn=f('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),_r=f('$RX("'),vs=f('"'),ws=f(")<\/script>"),Yi=f(","),Tl=/[<\u2028\u2029]/g;function ci(N){return JSON.stringify(N).replace(Tl,function(_){switch(_){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var Vo=Object.assign,po=Symbol.for("react.element"),Ua=Symbol.for("react.portal"),vr=Symbol.for("react.fragment"),bs=Symbol.for("react.strict_mode"),Ss=Symbol.for("react.profiler"),Ds=Symbol.for("react.provider"),Wo=Symbol.for("react.context"),za=Symbol.for("react.forward_ref"),Ui=Symbol.for("react.suspense"),Zo=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),J=Symbol.for("react.scope"),ae=Symbol.for("react.debug_trace_mode"),ke=Symbol.for("react.legacy_hidden"),Te=Symbol.for("react.default_value"),Ue=Symbol.iterator;function ot(N){if(N==null)return null;if(typeof N=="function")return N.displayName||N.name||null;if(typeof N=="string")return N;switch(N){case vr:return"Fragment";case Ua:return"Portal";case Ss:return"Profiler";case bs:return"StrictMode";case Ui:return"Suspense";case Zo:return"SuspenseList"}if(typeof N=="object")switch(N.$$typeof){case Wo:return(N.displayName||"Context")+".Consumer";case Ds:return(N._context.displayName||"Context")+".Provider";case za:var _=N.render;return N=N.displayName,N||(N=_.displayName||_.name||"",N=N!==""?"ForwardRef("+N+")":"ForwardRef"),N;case M:return _=N.displayName||null,_!==null?_:ot(N.type)||"Memo";case H:_=N._payload,N=N._init;try{return ot(N(_))}catch{}}return null}var ct={};function Nt(N,_){if(N=N.contextTypes,!N)return ct;var q={},ie;for(ie in N)q[ie]=_[ie];return q}var Yt=null;function Tn(N,_){if(N!==_){N.context._currentValue=N.parentValue,N=N.parent;var q=_.parent;if(N===null){if(q!==null)throw Error(t(401))}else{if(q===null)throw Error(t(401));Tn(N,q)}_.context._currentValue=_.value}}function Co(N){N.context._currentValue=N.parentValue,N=N.parent,N!==null&&Co(N)}function mo(N){var _=N.parent;_!==null&&mo(_),N.context._currentValue=N.value}function Br(N,_){if(N.context._currentValue=N.parentValue,N=N.parent,N===null)throw Error(t(402));N.depth===_.depth?Tn(N,_):Br(N,_)}function di(N,_){var q=_.parent;if(q===null)throw Error(t(402));N.depth===q.depth?Tn(N,q):di(N,q),_.context._currentValue=_.value}function go(N){var _=Yt;_!==N&&(_===null?mo(N):N===null?Co(_):_.depth===N.depth?Tn(_,N):_.depth>N.depth?Br(_,N):di(_,N),Yt=N)}var Mo={isMounted:function(){return!1},enqueueSetState:function(N,_){N=N._reactInternals,N.queue!==null&&N.queue.push(_)},enqueueReplaceState:function(N,_){N=N._reactInternals,N.replace=!0,N.queue=[_]},enqueueForceUpdate:function(){}};function qr(N,_,q,ie){var Fe=N.state!==void 0?N.state:null;N.updater=Mo,N.props=q,N.state=Fe;var xe={queue:[],replace:!1};N._reactInternals=xe;var We=_.contextType;if(N.context=typeof We=="object"&&We!==null?We._currentValue:ie,We=_.getDerivedStateFromProps,typeof We=="function"&&(We=We(q,Fe),Fe=We==null?Fe:Vo({},Fe,We),N.state=Fe),typeof _.getDerivedStateFromProps!="function"&&typeof N.getSnapshotBeforeUpdate!="function"&&(typeof N.UNSAFE_componentWillMount=="function"||typeof N.componentWillMount=="function"))if(_=N.state,typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount(),_!==N.state&&Mo.enqueueReplaceState(N,N.state,null),xe.queue!==null&&0<xe.queue.length)if(_=xe.queue,We=xe.replace,xe.queue=null,xe.replace=!1,We&&_.length===1)N.state=_[0];else{for(xe=We?_[0]:N.state,Fe=!0,We=We?1:0;We<_.length;We++){var rt=_[We];rt=typeof rt=="function"?rt.call(N,xe,q,ie):rt,rt!=null&&(Fe?(Fe=!1,xe=Vo({},xe,rt)):Vo(xe,rt))}N.state=xe}else xe.queue=null}var $o={id:1,overflow:""};function yo(N,_,q){var ie=N.id;N=N.overflow;var Fe=32-fa(ie)-1;ie&=~(1<<Fe),q+=1;var xe=32-fa(_)+Fe;if(30<xe){var We=Fe-Fe%5;return xe=(ie&(1<<We)-1).toString(32),ie>>=We,Fe-=We,{id:1<<32-fa(_)+Fe|q<<Fe|ie,overflow:xe+N}}return{id:1<<xe|q<<Fe|ie,overflow:N}}var fa=Math.clz32?Math.clz32:_d,ha=Math.log,Jh=Math.LN2;function _d(N){return N>>>=0,N===0?32:31-(ha(N)/Jh|0)|0}function Va(N,_){return N===_&&(N!==0||1/N===1/_)||N!==N&&_!==_}var Kh=typeof Object.is=="function"?Object.is:Va,fi=null,Ts=null,Il=null,Cn=null,on=!1,an=!1,hi=0,qo=null,fu=0;function Wa(){if(fi===null)throw Error(t(321));return fi}function hu(){if(0<fu)throw Error(t(312));return{memoizedState:null,queue:null,next:null}}function Is(){return Cn===null?Il===null?(on=!1,Il=Cn=hu()):(on=!0,Cn=Il):Cn.next===null?(on=!1,Cn=Cn.next=hu()):(on=!0,Cn=Cn.next),Cn}function xs(){Ts=fi=null,an=!1,Il=null,fu=0,Cn=qo=null}function bc(N,_){return typeof _=="function"?_(N):_}function An(N,_,q){if(fi=Wa(),Cn=Is(),on){var ie=Cn.queue;if(_=ie.dispatch,qo!==null&&(q=qo.get(ie),q!==void 0)){qo.delete(ie),ie=Cn.memoizedState;do ie=N(ie,q.action),q=q.next;while(q!==null);return Cn.memoizedState=ie,[ie,_]}return[Cn.memoizedState,_]}return N=N===bc?typeof _=="function"?_():_:q!==void 0?q(_):_,Cn.memoizedState=N,N=Cn.queue={last:null,dispatch:null},N=N.dispatch=pi.bind(null,fi,N),[Cn.memoizedState,N]}function Es(N,_){if(fi=Wa(),Cn=Is(),_=_===void 0?null:_,Cn!==null){var q=Cn.memoizedState;if(q!==null&&_!==null){var ie=q[1];e:if(ie===null)ie=!1;else{for(var Fe=0;Fe<ie.length&&Fe<_.length;Fe++)if(!Kh(_[Fe],ie[Fe])){ie=!1;break e}ie=!0}if(ie)return q[0]}}return N=N(),Cn.memoizedState=[N,_],N}function pi(N,_,q){if(25<=fu)throw Error(t(301));if(N===fi)if(an=!0,N={action:q,next:null},qo===null&&(qo=new Map),q=qo.get(_),q===void 0)qo.set(_,N);else{for(_=q;_.next!==null;)_=_.next;_.next=N}}function Sc(){throw Error(t(394))}function zi(){}var kr={readContext:function(N){return N._currentValue},useContext:function(N){return Wa(),N._currentValue},useMemo:Es,useReducer:An,useRef:function(N){fi=Wa(),Cn=Is();var _=Cn.memoizedState;return _===null?(N={current:N},Cn.memoizedState=N):_},useState:function(N){return An(bc,N)},useInsertionEffect:zi,useLayoutEffect:function(){},useCallback:function(N,_){return Es(function(){return N},_)},useImperativeHandle:zi,useEffect:zi,useDebugValue:zi,useDeferredValue:function(N){return Wa(),N},useTransition:function(){return Wa(),[!1,Sc]},useId:function(){var N=Ts.treeContext,_=N.overflow;N=N.id,N=(N&~(1<<32-fa(N)-1)).toString(32)+_;var q=Cs;if(q===null)throw Error(t(404));return _=hi++,N=":"+q.idPrefix+"R"+N,0<_&&(N+="H"+_.toString(32)),N+":"},useMutableSource:function(N,_){return Wa(),_(N._source)},useSyncExternalStore:function(N,_,q){if(q===void 0)throw Error(t(407));return q()}},Cs=null,Nr=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function Za(N){return console.error(N),null}function pa(){}function Ms(N,_,q,ie,Fe,xe,We,rt,St){var Vt=[],jt=new Set;return _={destination:null,responseState:_,progressiveChunkSize:ie===void 0?12800:ie,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:jt,pingedTasks:Vt,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:Fe===void 0?Za:Fe,onAllReady:xe===void 0?pa:xe,onShellReady:We===void 0?pa:We,onShellError:rt===void 0?pa:rt,onFatalError:St===void 0?pa:St},q=lr(_,0,null,q,!1,!1),q.parentFlushed=!0,N=pu(_,N,null,q,jt,ct,null,$o),Vt.push(N),_}function pu(N,_,q,ie,Fe,xe,We,rt){N.allPendingTasks++,q===null?N.pendingRootTasks++:q.pendingTasks++;var St={node:_,ping:function(){var Vt=N.pingedTasks;Vt.push(St),Vt.length===1&&Tc(N)},blockedBoundary:q,blockedSegment:ie,abortSet:Fe,legacyContext:xe,context:We,treeContext:rt};return Fe.add(St),St}function lr(N,_,q,ie,Fe,xe){return{status:0,id:-1,index:_,parentFlushed:!1,chunks:[],children:[],formatContext:ie,boundary:q,lastPushedText:Fe,textEmbedded:xe}}function $a(N,_){if(N=N.onError(_),N!=null&&typeof N!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof N+'" instead');return N}function or(N,_){var q=N.onShellError;q(_),q=N.onFatalError,q(_),N.destination!==null?(N.status=2,m(N.destination,_)):(N.status=1,N.fatalError=_)}function xl(N,_,q,ie,Fe){for(fi={},Ts=_,hi=0,N=q(ie,Fe);an;)an=!1,hi=0,fu+=1,Cn=null,N=q(ie,Fe);return xs(),N}function mu(N,_,q,ie){var Fe=q.render(),xe=ie.childContextTypes;if(xe!=null){var We=_.legacyContext;if(typeof q.getChildContext!="function")ie=We;else{q=q.getChildContext();for(var rt in q)if(!(rt in xe))throw Error(t(108,ot(ie)||"Unknown",rt));ie=Vo({},We,q)}_.legacyContext=ie,Hr(N,_,Fe),_.legacyContext=We}else Hr(N,_,Fe)}function Vi(N,_){if(N&&N.defaultProps){_=Vo({},_),N=N.defaultProps;for(var q in N)_[q]===void 0&&(_[q]=N[q]);return _}return _}function ks(N,_,q,ie,Fe){if(typeof q=="function")if(q.prototype&&q.prototype.isReactComponent){Fe=Nt(q,_.legacyContext);var xe=q.contextType;xe=new q(ie,typeof xe=="object"&&xe!==null?xe._currentValue:Fe),qr(xe,q,ie,Fe),mu(N,_,xe,q)}else{xe=Nt(q,_.legacyContext),Fe=xl(N,_,q,ie,xe);var We=hi!==0;if(typeof Fe=="object"&&Fe!==null&&typeof Fe.render=="function"&&Fe.$$typeof===void 0)qr(Fe,q,ie,xe),mu(N,_,Fe,q);else if(We){ie=_.treeContext,_.treeContext=yo(ie,1,0);try{Hr(N,_,Fe)}finally{_.treeContext=ie}}else Hr(N,_,Fe)}else if(typeof q=="string"){switch(Fe=_.blockedSegment,xe=En(Fe.chunks,q,ie,N.responseState,Fe.formatContext),Fe.lastPushedText=!1,We=Fe.formatContext,Fe.formatContext=re(We,q,ie),mi(N,_,xe),Fe.formatContext=We,q){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:Fe.chunks.push(Cr,d(q),yr)}Fe.lastPushedText=!1}else{switch(q){case ke:case ae:case bs:case Ss:case vr:Hr(N,_,ie.children);return;case Zo:Hr(N,_,ie.children);return;case J:throw Error(t(343));case Ui:e:{q=_.blockedBoundary,Fe=_.blockedSegment,xe=ie.fallback,ie=ie.children,We=new Set;var rt={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:We,errorDigest:null},St=lr(N,Fe.chunks.length,rt,Fe.formatContext,!1,!1);Fe.children.push(St),Fe.lastPushedText=!1;var Vt=lr(N,0,null,Fe.formatContext,!1,!1);Vt.parentFlushed=!0,_.blockedBoundary=rt,_.blockedSegment=Vt;try{if(mi(N,_,ie),Vt.lastPushedText&&Vt.textEmbedded&&Vt.chunks.push(pe),Vt.status=1,Ns(rt,Vt),rt.pendingTasks===0)break e}catch(jt){Vt.status=4,rt.forceClientRender=!0,rt.errorDigest=$a(N,jt)}finally{_.blockedBoundary=q,_.blockedSegment=Fe}_=pu(N,xe,q,St,We,_.legacyContext,_.context,_.treeContext),N.pingedTasks.push(_)}return}if(typeof q=="object"&&q!==null)switch(q.$$typeof){case za:if(ie=xl(N,_,q.render,ie,Fe),hi!==0){q=_.treeContext,_.treeContext=yo(q,1,0);try{Hr(N,_,ie)}finally{_.treeContext=q}}else Hr(N,_,ie);return;case M:q=q.type,ie=Vi(q,ie),ks(N,_,q,ie,Fe);return;case Ds:if(Fe=ie.children,q=q._context,ie=ie.value,xe=q._currentValue,q._currentValue=ie,We=Yt,Yt=ie={parent:We,depth:We===null?0:We.depth+1,context:q,parentValue:xe,value:ie},_.context=ie,Hr(N,_,Fe),N=Yt,N===null)throw Error(t(403));ie=N.parentValue,N.context._currentValue=ie===Te?N.context._defaultValue:ie,N=Yt=N.parent,_.context=N;return;case Wo:ie=ie.children,ie=ie(q._currentValue),Hr(N,_,ie);return;case H:Fe=q._init,q=Fe(q._payload),ie=Vi(q,ie),ks(N,_,q,ie,void 0);return}throw Error(t(130,q==null?q:typeof q,""))}}function Hr(N,_,q){if(_.node=q,typeof q=="object"&&q!==null){switch(q.$$typeof){case po:ks(N,_,q.type,q.props,q.ref);return;case Ua:throw Error(t(257));case H:var ie=q._init;q=ie(q._payload),Hr(N,_,q);return}if($(q)){In(N,_,q);return}if(q===null||typeof q!="object"?ie=null:(ie=Ue&&q[Ue]||q["@@iterator"],ie=typeof ie=="function"?ie:null),ie&&(ie=ie.call(q))){if(q=ie.next(),!q.done){var Fe=[];do Fe.push(q.value),q=ie.next();while(!q.done);In(N,_,Fe)}return}throw N=Object.prototype.toString.call(q),Error(t(31,N==="[object Object]"?"object with keys {"+Object.keys(q).join(", ")+"}":N))}typeof q=="string"?(ie=_.blockedSegment,ie.lastPushedText=Ie(_.blockedSegment.chunks,q,N.responseState,ie.lastPushedText)):typeof q=="number"&&(ie=_.blockedSegment,ie.lastPushedText=Ie(_.blockedSegment.chunks,""+q,N.responseState,ie.lastPushedText))}function In(N,_,q){for(var ie=q.length,Fe=0;Fe<ie;Fe++){var xe=_.treeContext;_.treeContext=yo(xe,ie,Fe);try{mi(N,_,q[Fe])}finally{_.treeContext=xe}}}function mi(N,_,q){var ie=_.blockedSegment.formatContext,Fe=_.legacyContext,xe=_.context;try{return Hr(N,_,q)}catch(St){if(xs(),typeof St=="object"&&St!==null&&typeof St.then=="function"){q=St;var We=_.blockedSegment,rt=lr(N,We.chunks.length,null,We.formatContext,We.lastPushedText,!0);We.children.push(rt),We.lastPushedText=!1,N=pu(N,_.node,_.blockedBoundary,rt,_.abortSet,_.legacyContext,_.context,_.treeContext).ping,q.then(N,N),_.blockedSegment.formatContext=ie,_.legacyContext=Fe,_.context=xe,go(xe)}else throw _.blockedSegment.formatContext=ie,_.legacyContext=Fe,_.context=xe,go(xe),St}}function Dc(N){var _=N.blockedBoundary;N=N.blockedSegment,N.status=3,Hd(this,_,N)}function Bd(N,_,q){var ie=N.blockedBoundary;N.blockedSegment.status=3,ie===null?(_.allPendingTasks--,_.status!==2&&(_.status=2,_.destination!==null&&_.destination.close())):(ie.pendingTasks--,ie.forceClientRender||(ie.forceClientRender=!0,N=q===void 0?Error(t(432)):q,ie.errorDigest=_.onError(N),ie.parentFlushed&&_.clientRenderedBoundaries.push(ie)),ie.fallbackAbortableTasks.forEach(function(Fe){return Bd(Fe,_,q)}),ie.fallbackAbortableTasks.clear(),_.allPendingTasks--,_.allPendingTasks===0&&(ie=_.onAllReady,ie()))}function Ns(N,_){if(_.chunks.length===0&&_.children.length===1&&_.children[0].boundary===null){var q=_.children[0];q.id=_.id,q.parentFlushed=!0,q.status===1&&Ns(N,q)}else N.completedSegments.push(_)}function Hd(N,_,q){if(_===null){if(q.parentFlushed){if(N.completedRootSegment!==null)throw Error(t(389));N.completedRootSegment=q}N.pendingRootTasks--,N.pendingRootTasks===0&&(N.onShellError=pa,_=N.onShellReady,_())}else _.pendingTasks--,_.forceClientRender||(_.pendingTasks===0?(q.parentFlushed&&q.status===1&&Ns(_,q),_.parentFlushed&&N.completedBoundaries.push(_),_.fallbackAbortableTasks.forEach(Dc,N),_.fallbackAbortableTasks.clear()):q.parentFlushed&&q.status===1&&(Ns(_,q),_.completedSegments.length===1&&_.parentFlushed&&N.partialBoundaries.push(_)));N.allPendingTasks--,N.allPendingTasks===0&&(N=N.onAllReady,N())}function Tc(N){if(N.status!==2){var _=Yt,q=Nr.current;Nr.current=kr;var ie=Cs;Cs=N.responseState;try{var Fe=N.pingedTasks,xe;for(xe=0;xe<Fe.length;xe++){var We=Fe[xe],rt=N,St=We.blockedSegment;if(St.status===0){go(We.context);try{Hr(rt,We,We.node),St.lastPushedText&&St.textEmbedded&&St.chunks.push(pe),We.abortSet.delete(We),St.status=1,Hd(rt,We.blockedBoundary,St)}catch(No){if(xs(),typeof No=="object"&&No!==null&&typeof No.then=="function"){var Vt=We.ping;No.then(Vt,Vt)}else{We.abortSet.delete(We),St.status=4;var jt=We.blockedBoundary,Mn=No,Yr=$a(rt,Mn);if(jt===null?or(rt,Mn):(jt.pendingTasks--,jt.forceClientRender||(jt.forceClientRender=!0,jt.errorDigest=Yr,jt.parentFlushed&&rt.clientRenderedBoundaries.push(jt))),rt.allPendingTasks--,rt.allPendingTasks===0){var ko=rt.onAllReady;ko()}}}}}Fe.splice(0,xe),N.destination!==null&&vu(N,N.destination)}catch(No){$a(N,No),or(N,No)}finally{Cs=ie,Nr.current=q,q===kr&&go(_)}}}function gu(N,_,q){switch(q.parentFlushed=!0,q.status){case 0:var ie=q.id=N.nextSegmentId++;return q.lastPushedText=!1,q.textEmbedded=!1,N=N.responseState,o(_,Rn),o(_,N.placeholderPrefix),N=d(ie.toString(16)),o(_,N),i(_,ji);case 1:q.status=2;var Fe=!0;ie=q.chunks;var xe=0;q=q.children;for(var We=0;We<q.length;We++){for(Fe=q[We];xe<Fe.index;xe++)o(_,ie[xe]);Fe=El(N,_,Fe)}for(;xe<ie.length-1;xe++)o(_,ie[xe]);return xe<ie.length&&(Fe=i(_,ie[xe])),Fe;default:throw Error(t(390))}}function El(N,_,q){var ie=q.boundary;if(ie===null)return gu(N,_,q);if(ie.parentFlushed=!0,ie.forceClientRender)ie=ie.errorDigest,i(_,Eo),o(_,ua),ie&&(o(_,_i),o(_,d(Z(ie))),o(_,ui)),i(_,ne),gu(N,_,q);else if(0<ie.pendingTasks){ie.rootSegmentID=N.nextSegmentId++,0<ie.completedSegments.length&&N.partialBoundaries.push(ie);var Fe=N.responseState,xe=Fe.nextSuspenseID++;Fe=f(Fe.boundaryPrefix+xe.toString(16)),ie=ie.id=Fe,ge(_,N.responseState,ie),gu(N,_,q)}else if(ie.byteSize>N.progressiveChunkSize)ie.rootSegmentID=N.nextSegmentId++,N.completedBoundaries.push(ie),ge(_,N.responseState,ie.id),gu(N,_,q);else{if(i(_,xo),q=ie.completedSegments,q.length!==1)throw Error(t(391));El(N,_,q[0])}return i(_,Ri)}function Cl(N,_,q){return Bi(_,N.responseState,q.formatContext,q.id),El(N,_,q),Hi(_,q.formatContext)}function qa(N,_,q){for(var ie=q.completedSegments,Fe=0;Fe<ie.length;Fe++)yu(N,_,q,ie[Fe]);if(ie.length=0,N=N.responseState,ie=q.id,q=q.rootSegmentID,o(_,N.startInlineScript),N.sentCompleteBoundaryFunction?o(_,Dl):(N.sentCompleteBoundaryFunction=!0,o(_,Ha)),ie===null)throw Error(t(395));return q=d(q.toString(16)),o(_,ie),o(_,Ya),o(_,N.segmentPrefix),o(_,q),i(_,du)}function yu(N,_,q,ie){if(ie.status===2)return!0;var Fe=ie.id;if(Fe===-1){if((ie.id=q.rootSegmentID)===-1)throw Error(t(392));return Cl(N,_,ie)}return Cl(N,_,ie),N=N.responseState,o(_,N.startInlineScript),N.sentCompleteSegmentFunction?o(_,Sl):(N.sentCompleteSegmentFunction=!0,o(_,cu)),o(_,N.segmentPrefix),Fe=d(Fe.toString(16)),o(_,Fe),o(_,Ba),o(_,N.placeholderPrefix),o(_,Fe),i(_,da)}function vu(N,_){n=new Uint8Array(512),r=0;try{var q=N.completedRootSegment;if(q!==null&&N.pendingRootTasks===0){El(N,_,q),N.completedRootSegment=null;var ie=N.responseState.bootstrapChunks;for(q=0;q<ie.length-1;q++)o(_,ie[q]);q<ie.length&&i(_,ie[q])}var Fe=N.clientRenderedBoundaries,xe;for(xe=0;xe<Fe.length;xe++){var We=Fe[xe];ie=_;var rt=N.responseState,St=We.id,Vt=We.errorDigest,jt=We.errorMessage,Mn=We.errorComponentStack;if(o(ie,rt.startInlineScript),rt.sentClientRenderFunction?o(ie,_r):(rt.sentClientRenderFunction=!0,o(ie,Sn)),St===null)throw Error(t(395));o(ie,St),o(ie,vs),(Vt||jt||Mn)&&(o(ie,Yi),o(ie,d(ci(Vt||"")))),(jt||Mn)&&(o(ie,Yi),o(ie,d(ci(jt||"")))),Mn&&(o(ie,Yi),o(ie,d(ci(Mn)))),i(ie,ws)}Fe.splice(0,xe);var Yr=N.completedBoundaries;for(xe=0;xe<Yr.length;xe++)qa(N,_,Yr[xe]);Yr.splice(0,xe),a(_),n=new Uint8Array(512),r=0;var ko=N.partialBoundaries;for(xe=0;xe<ko.length;xe++){var No=ko[xe];e:{Fe=N,We=_;var Ml=No.completedSegments;for(rt=0;rt<Ml.length;rt++)if(!yu(Fe,We,No,Ml[rt])){rt++,Ml.splice(0,rt);var xc=!1;break e}Ml.splice(0,rt),xc=!0}if(!xc){N.destination=null,xe++,ko.splice(0,xe);return}}ko.splice(0,xe);var ma=N.completedBoundaries;for(xe=0;xe<ma.length;xe++)qa(N,_,ma[xe]);ma.splice(0,xe)}finally{a(_),N.allPendingTasks===0&&N.pingedTasks.length===0&&N.clientRenderedBoundaries.length===0&&N.completedBoundaries.length===0&&_.close()}}function Ic(N,_){try{var q=N.abortableTasks;q.forEach(function(ie){return Bd(ie,N,_)}),q.clear(),N.destination!==null&&vu(N,N.destination)}catch(ie){$a(N,ie),or(N,ie)}}return Jy.renderToReadableStream=function(N,_){return new Promise(function(q,ie){var Fe,xe,We=new Promise(function(jt,Mn){xe=jt,Fe=Mn}),rt=Ms(N,oe(_?_.identifierPrefix:void 0,_?_.nonce:void 0,_?_.bootstrapScriptContent:void 0,_?_.bootstrapScripts:void 0,_?_.bootstrapModules:void 0),K(_?_.namespaceURI:void 0),_?_.progressiveChunkSize:void 0,_?_.onError:void 0,xe,function(){var jt=new ReadableStream({type:"bytes",pull:function(Mn){if(rt.status===1)rt.status=2,m(Mn,rt.fatalError);else if(rt.status!==2&&rt.destination===null){rt.destination=Mn;try{vu(rt,Mn)}catch(Yr){$a(rt,Yr),or(rt,Yr)}}},cancel:function(){Ic(rt)}},{highWaterMark:0});jt.allReady=We,q(jt)},function(jt){We.catch(function(){}),ie(jt)},Fe);if(_&&_.signal){var St=_.signal,Vt=function(){Ic(rt,St.reason),St.removeEventListener("abort",Vt)};St.addEventListener("abort",Vt)}Tc(rt)})},Jy.version="18.2.0",Jy}var Gh,G3;Gh=lte();G3=ute();Gh.version;Gh.renderToString;var cte=Gh.renderToStaticMarkup;Gh.renderToNodeStream;Gh.renderToStaticNodeStream;G3.renderToReadableStream;const J3=Me.oneOf(["top","right","bottom","left","bottom-left-aligned","bottom-middle-aligned","bottom-right-aligned","top-left-aligned","top-middle-aligned","top-right-aligned","auto"]),K3=Me.oneOf(["top-middle","top-left","top-right","bottom-left","bottom-right","bottom-middle","middle-left","middle-right","middle-middle"]),Q3=Me.shape({nextLabel:Me.string,prevLabel:Me.string,skipLabel:Me.string,doneLabel:Me.string,hidePrev:Me.bool,hideNext:Me.bool,tooltipPosition:J3,tooltipClass:Me.string,highlightClass:Me.string,exitOnEsc:Me.bool,exitOnOverlayClick:Me.bool,showStepNumbers:Me.bool,keyboardNavigation:Me.bool,showButtons:Me.bool,showBullets:Me.bool,showProgress:Me.bool,scrollToElement:Me.bool,overlayOpacity:Me.number,scrollPadding:Me.number,positionPrecedence:Me.arrayOf(Me.string),disableInteraction:Me.bool,hintPosition:K3,hintButtonLabel:Me.string,hintAnimation:Me.bool}),X3={hidePrev:!0,hideNext:!0};function ek(){return typeof window>"u"}class T1 extends F.Component{constructor(n){super(n);De(this,"onExit",()=>{const{onExit:n}=this.props;this.isVisible=!1,n(this.introJs._currentStep)});De(this,"onBeforeExit",()=>{const{onBeforeExit:n}=this.props;return n?n(this.introJs._currentStep):!0});De(this,"onBeforeChange",n=>{if(!this.isVisible)return!0;const{onBeforeChange:r,onPreventChange:o}=this.props;if(r){const i=r(this.introJs._currentStep,n);return i===!1&&o&&setTimeout(()=>{o(this.introJs._currentStep)},0),i}return!0});De(this,"onAfterChange",n=>{if(!this.isVisible)return;const{onAfterChange:r}=this.props;r&&r(this.introJs._currentStep,n)});De(this,"onChange",n=>{if(!this.isVisible)return;const{onChange:r}=this.props;r&&r(this.introJs._currentStep,n)});De(this,"onComplete",()=>{const{onComplete:n}=this.props;n&&n()});De(this,"updateStepElement",n=>{const r=document.querySelector(this.introJs._options.steps[n].element);r&&(this.introJs._introItems[n].element=r,this.introJs._introItems[n].position=this.introJs._options.steps[n].position||"auto")});this.introJs=null,this.isConfigured=!1,this.isVisible=!1,this.installIntroJs()}componentDidMount(){this.props.enabled&&(this.configureIntroJs(),this.renderSteps())}componentDidUpdate(n){const{enabled:r,steps:o,options:i}=this.props;(!this.isConfigured||n.steps!==o||n.options!==i)&&(this.configureIntroJs(),this.renderSteps()),n.enabled!==r&&this.renderSteps()}componentWillUnmount(){this.introJs.exit()}installIntroJs(){ek()||(this.introJs=Jv(),this.introJs.onexit(this.onExit),this.introJs.onbeforeexit(this.onBeforeExit),this.introJs.onbeforechange(this.onBeforeChange),this.introJs.onafterchange(this.onAfterChange),this.introJs.onchange(this.onChange),this.introJs.oncomplete(this.onComplete))}configureIntroJs(){const{options:n,steps:r}=this.props,o=r.map(i=>F.isValidElement(i.intro)?{...i,intro:cte(i.intro)}:i);this.introJs.setOptions({...n,steps:o}),this.isConfigured=!0}renderSteps(){const{enabled:n,initialStep:r,steps:o,onStart:i}=this.props;n&&o.length>0&&!this.isVisible?(this.introJs.start(),this.isVisible=!0,this.introJs.goToStepNumber(r+1),i&&i(this.introJs._currentStep)):!n&&this.isVisible&&(this.isVisible=!1,this.introJs.exit())}render(){return null}}De(T1,"propTypes",{enabled:Me.bool,initialStep:Me.number.isRequired,steps:Me.arrayOf(Me.shape({element:Me.oneOfType([Me.string,typeof Element>"u"?Me.any:Me.instanceOf(Element)]),intro:Me.node.isRequired,position:J3,tooltipClass:Me.string,highlightClass:Me.string})).isRequired,onStart:Me.func,onExit:Me.func.isRequired,onBeforeExit:Me.func,onBeforeChange:Me.func,onAfterChange:Me.func,onChange:Me.func,onPreventChange:Me.func,onComplete:Me.func,options:Q3}),De(T1,"defaultProps",{enabled:!1,onStart:null,onBeforeExit:null,onBeforeChange:null,onAfterChange:null,onChange:null,onPreventChange:null,onComplete:null,options:X3});class _I extends F.Component{constructor(t){super(t),this.introJs=null,this.isConfigured=!1,this.installIntroJs()}componentDidMount(){this.props.enabled&&(this.configureIntroJs(),this.renderHints())}componentDidUpdate(t){const{enabled:n,hints:r,options:o}=this.props;(!this.isConfigured||t.hints!==r||t.options!==o)&&(this.configureIntroJs(),this.renderHints()),t.enabled!==n&&this.renderHints()}componentWillUnmount(){this.introJs.hideHints()}installIntroJs(){if(ek())return;this.introJs=Jv();const{onClick:t,onClose:n}=this.props;t&&this.introJs.onhintclick(t),n&&this.introJs.onhintclose(n)}configureIntroJs(){const{options:t,hints:n}=this.props;this.introJs.removeHints(),this.introJs.setOptions({...t,hints:n}),this.isConfigured=!0}renderHints(){const{enabled:t,hints:n}=this.props;t&&n.length>0?this.introJs.showHints():t||this.introJs.hideHints()}render(){return null}}De(_I,"propTypes",{enabled:Me.bool,hints:Me.arrayOf(Me.shape({element:Me.string.isRequired,hint:Me.string.isRequired,hintPosition:K3})).isRequired,onClick:Me.func,onClose:Me.func,options:Q3}),De(_I,"defaultProps",{enabled:!1,onClick:null,onClose:null,options:X3});const dte=[{element:".left-sidebar",intro:E("This is Thino's sidebar. Navigate to different path or select query filter.")},{element:".user-banner-container",intro:E("Click here and go to settings page.")},{element:".path-entry-wrapper",intro:E("Click here and go to different path.")},{element:".queries-wrapper",intro:E("Select or create query filter here.")},{element:".status-text-container.sidebar",intro:E("See the status of Thinos here.")+E("It is not available on small view")},{element:".heatmap-default",intro:E("See your time status of thinos here.")},{element:".tags-wrapper",intro:E("See your tags here. Tags will be shown when thino contains tags.")},{element:".section-header-container.memos-header-container",intro:E("Search your thino quickly here.")},{element:".memo-editor-wrapper",intro:E("Edit or create your thino here.")},{element:".memolist-wrapper",intro:E("See your thinos here.")}],fte=[{element:".memos-sidebar-wrapper.left-sidebar",intro:E("This is Thino's sidebar. Navigate to different path or select query filter.")},{element:".user-banner-container",intro:E("Click here and go to settings page.")},{element:".heatmap-default",intro:E("See your time status of thinos here.")},{element:".path-entry-wrapper",intro:E("Click here and go to different path.")},{element:".queries-wrapper",intro:E("Select or create query filter here.")},{element:".tags-wrapper",intro:E("See your tags here. Tags will be shown when thino contains tags.")},{element:".section-header-container.memos-header-container",intro:E("Search your thino quickly here.")},{element:".memo-editor-wrapper",intro:E("Edit or create your thino here.")},{element:".memolist-wrapper",intro:E("See your thinos here.")}],hte={nextLabel:E("Next"),prevLabel:E("Previous"),doneLabel:E("Done"),hideNext:!1};function pte(){var v;const{dailyNotesState:{settings:e,verifyState:t},locationState:{pathname:n},globalState:{isMobileView:r,memoListView:o,globalEditorShown:i,locked:a,exited:u}}=F.useContext(Ot),d=F.useRef(null),f=F.useRef(null),m=e?e.FirstLoaded:(v=app.plugins.getPlugin("obsidian-memos").settings)==null?void 0:v.FirstLoaded;F.useEffect(()=>{if(!e.needVerify){dt.setLocked(!1);return}dt.setLocked(!0)},[e==null?void 0:e.needVerify]),F.useEffect(()=>{if(!f.current)return;(async()=>{var I;const D=!C.Platform.isDesktop&&await((I=window.Capacitor)==null?void 0:I.Plugins.Device.getId()),T=C.Platform.isDesktop?await Jn():D.identifier||D.uuid;!t||(t==null?void 0:t.appId)!==T?f.current.toggleClass("hide-pro",!0):f.current.toggleClass("hide-pro",!1)})()},[t,f.current]);const g=()=>{dt.setExitSteps(!1)};return y.jsxs(y.Fragment,{children:[m&&y.jsx(Xee,{}),y.jsx(T1,{ref:d,enabled:u,steps:(e==null?void 0:e.DefaultThemeForThino)==="modern"?dte:fte,initialStep:0,onExit:g,options:hte,onBeforeChange:w=>{(r&&(e==null?void 0:e.DefaultThemeForThino)==="classic"&&w===6||r&&(e==null?void 0:e.DefaultThemeForThino)==="modern"&&w===7)&&dt.setShowSiderbarInMobileView(!1)}}),a&&!m&&y.jsx(Qee,{}),!a&&!m&&i&&y.jsx(Sd,{editorType:"block"}),!a&&!m&&!i&&y.jsx("section",{ref:f,id:"page-wrapper","data-path":n,className:Kn(`memos-${n==="/"?o:"list"}-view`,(e==null?void 0:e.DefaultThemeForThino)==="modern"?"modern":"classic"),children:y.jsxs(y.Fragment,{children:[y.jsx(kI,{sidebarPosition:"left",className:"left-sidebar"}),y.jsx("main",{className:"content-wrapper",children:Nte(n)}),(e==null?void 0:e.DefaultThemeForThino)==="modern"&&!r?y.jsx(kI,{sidebarPosition:"right",className:"right-sidebar"}):null]})})]})}const mte={"*":y.jsx(pte,{})},gte=e=>{const{memo:t,handleDeletedMemoAction:n}=e,{dailyNotesState:r}=F.useContext(Ot),o={...t,createdAtStr:ut.getDateTimeString(t.createdAt),deletedAtStr:ut.getDateTimeString(t.deletedAt||t.createdAt)},i=se.useRef(null),a=se.useRef(null),[u,d]=se.useState(""),[f,m]=ml(!1),g={restore:F.useRef(null),delete:F.useRef(null),source:F.useRef(null)};F.useEffect(()=>{a&&(C.setIcon(g.restore.current,"archive-restore"),C.setIcon(g.delete.current,"trash"),C.setIcon(g.source.current,"home"))},[a]),F.useEffect(()=>{if(!i.current||!a.current||i.current.hasChildNodes()&&t.content===u||!r.view)return;const I=r.view;d(t.content),i.current.hasChildNodes()&&i.current.empty();async function k(){var R;await C.MarkdownRenderer.render(r.app,t.content+`
|
|
|
`,i.current,t.path,I);const A=(R=i.current)==null?void 0:R.querySelectorAll(".internal-link");A==null||A.forEach(j=>{const B=j,L=B.getAttribute("data-href");if(!L)return;r.app.metadataCache.getFirstLinkpathDest(L,t.path)||j.classList.add("is-unresolved"),B.addEventListener("mouseover",U=>{U.stopPropagation(),r.app.workspace.trigger("hover-link",{event:U,source:"thino",hoverParent:I.containerEl,targetEl:B,linktext:L,sourcePath:B.href})})})}k()},[t.content,a]);const v=async()=>{if(f)try{await je.deleteMemoById(o.id),n(o.id)}catch(I){new C.Notice(I.message)}else m()},w=async()=>{switch(o.sourceType){case"DAILY":await U1(o.id,o.path);break;case"CANVAS":await V1(o.id,o.path);break;case"MULTI":await Y1(o.path);break;case"FILE":await z1(o.id,o.path);break}},D=async()=>{try{const I=await je.restoreMemoById(o.id),k=r.app,A=k==null?void 0:k.loadLocalStorage("tokenForSync");I&&I.webId&&A&&r.settings.startSync&&await Lx(I.webId),I&&je.editMemo(I),n(o.id),new C.Notice(E("RESTORE SUCCEED"))}catch(I){new C.Notice(I.message)}},T=()=>{f&&m(!1)};return y.jsxs("div",{ref:a,className:`memo-wrapper ${"memos-"+o.id}`,onMouseLeave:T,children:[y.jsxs("div",{className:"memo-top-wrapper",children:[y.jsxs("span",{className:"time-text",children:[E("DELETE AT")," ",o.deletedAtStr]}),y.jsxs("div",{className:"btns-container",children:[y.jsx("span",{ref:I=>{I&&C.setIcon(I,"more-horizontal")},className:"btn more-action-btn"}),y.jsx("div",{className:"more-action-btns-wrapper",children:y.jsxs("div",{className:"more-action-btns-container",children:[y.jsxs("div",{className:"more-action-menu-item",children:[y.jsx("span",{ref:g.restore,className:"more-action-item-icon"}),y.jsx("span",{className:"btn restore-btn",onClick:D,children:E("RESTORE")})]}),y.jsxs("div",{className:"more-action-menu-item",children:[y.jsx("span",{ref:g.source,className:"more-action-item-icon"}),y.jsx("span",{className:"btn",onClick:w,children:E("SOURCE")})]}),y.jsxs("div",{className:"more-action-menu-item delete-menu-item",children:[y.jsx("span",{ref:g.delete,className:"more-action-item-icon"}),y.jsx("span",{className:`btn delete-btn ${f?"final-confirm":""}`,onClick:v,children:E(f?"CONFIRM!":"DELETE")})]})]})})]})]}),y.jsx("div",{ref:i,className:"memo-content-text",onContextMenu:I=>{I.preventDefault(),I.stopPropagation()}})]})},yte=({memos:e,query:t,HideDoneTasks:n})=>{const{tag:r,duration:o,type:i,text:a,filter:u}=t,d=tn.getQueryById(u);return!!(r||o&&o.from<o.to||i||a||d)||d||n?e.filter(m=>{let g=!0;if(m.thinoType!==void 0&&n&&m.thinoType==="TASK-DONE"&&(g=!1),m.content.contains("comment:")&&(g=!1),d){const v=JSON.parse(d.querystring);Array.isArray(v)&&(g=jh(m,v))}if(r){const v=new Set;for(const w of Array.from(m.content.match(gr)||[])){const T=w.replace(gr,"$1").trim().split("/");let I="";for(const k of T)I+=k,v.add(I),I+="/"}for(const w of Array.from(m.content.match(jr)||[])){const T=w.replace(jr,"$1").trim().split("/");let I="";for(const k of T)I+=k,v.add(I),I+="/"}for(const w of Array.from(m.content.match(so)||[])){const T=w.replace(so,"$2").trim().split("/");let I="";for(const k of T)I+=k,v.add(I),I+="/"}v.has(r)||(g=!1)}return o&&o.from<o.to&&(ut.getTimeStampByDate(m.createdAt)<o.from||ut.getTimeStampByDate(m.createdAt)>o.to)&&(g=!1),i&&(i==="NOT_TAGGED"&&(m.content.match(gr)!==null||m.content.match(so)!==null||m.content.match(jr)!==null)||i==="LINKED"&&m.content.match(Od)===null||i==="IMAGED"&&m.content.match(jd)===null||i==="CONNECTED"&&m.content.match(hc)===null)&&(g=!1),a&&!m.content.toLowerCase().includes(a.toLowerCase())&&(g=!1),g}):e.filter(m=>!m.content.contains("comment:"))},vte=()=>{const{locationState:{query:e},globalState:{isMobileView:t},memoState:{memos:n}}=F.useContext(Ot),r=$h(),[o,i]=F.useState([]),a=se.useRef(null);F.useEffect(()=>{const f=yte({memos:n.filter(m=>m.deletedAt!==""&&m.deletedAt),query:e,HideDoneTasks:!1});i(f),r.setFinish()},[n,a.current,e]);const u=F.useCallback(f=>{i(m=>m.filter(g=>g.id!==f))},[]),d=F.useCallback(()=>{dt.setShowSiderbarInMobileView(!0)},[]);return y.jsxs("div",{className:"memo-trash-wrapper",ref:a,children:[y.jsxs("div",{className:"section-header-container",children:[y.jsxs("div",{className:"title-text",children:[y.jsx(Aa,{when:t,children:y.jsx("button",{ref:f=>{f&&C.setIcon(f,"menu")},className:"btn action-btn clickable-icon",onClick:d})}),y.jsxs("span",{className:"go-home-btn",onClick:()=>{st.clearQuery(),st.setPathname("/")},children:["🏠 ",E("Return To Home Page")]})]}),y.jsx(lg,{})]}),y.jsx(xg,{thinosCount:o.length,thinos:o}),r.isLoading?y.jsx("div",{className:"tip-text-container",children:y.jsx("span",{className:"tip-text",children:E("Fetching data...")})}):o.length===0?y.jsx("div",{className:"tip-text-container",children:y.jsx("span",{className:"tip-text",children:E("Here is No Memos.")})}):y.jsx("div",{className:"deleted-memos-container",children:o.map(f=>y.jsx(gte,{memo:f,handleDeletedMemoAction:u},`${f.id}-${f.updatedAt}`))})]})},Ky="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24px'%20viewBox='0%200%2024%2024'%20width='24px'%20fill='currentColor'%3e%3cpath%20d='M0%200h24v24H0V0z'%20fill='none'/%3e%3cpath%20d='M19%203H5c-1.1%200-2%20.9-2%202v14c0%201.1.9%202%202%202h14c1.1%200%202-.9%202-2V5c0-1.1-.9-2-2-2zm0%2016H5V5h14v14zM17.99%209l-1.41-1.42-6.59%206.59-2.58-2.57-1.42%201.41%204%203.99z'/%3e%3c/svg%3e",Qy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20fill='currentColor'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='none'%20d='M0%200h24v24H0V0z'/%3e%3cpath%20d='M19%205v14H5V5h14m0-2H5c-1.1%200-2%20.9-2%202v14c0%201.1.9%202%202%202h14c1.1%200%202-.9%202-2V5c0-1.1-.9-2-2-2z'/%3e%3c/svg%3e",wte=()=>{const{globalState:e}=F.useContext(Ot),{useTinyUndoHistoryCache:t,shouldHideImageUrl:n,shouldSplitMemoWord:r,shouldUseMarkdownParser:o}=e,i=`👋 你好呀~欢迎使用memos!
|
|
|
* ✨ **开源项目**;
|
|
|
* 😋 精美且细节的视觉样式;
|
|
|
* 📑 体验优良的交互逻辑;`,a=()=>{dt.setAppSetting({useTinyUndoHistoryCache:!t})},u=()=>{dt.setAppSetting({shouldSplitMemoWord:!r})},d=()=>{dt.setAppSetting({shouldHideImageUrl:!n})},f=()=>{dt.setAppSetting({shouldUseMarkdownParser:!o})},m=async()=>{const g=je.getState().memos.map(D=>({...D})),v=JSON.stringify(g),w=document.createElement("a");w.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(v)),w.setAttribute("download","data.json"),w.style.display="none",document.body.appendChild(w),w.click(),document.body.removeChild(w)};return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"section-container preferences-section-container",children:[y.jsx("p",{className:"title-text",children:"Memo 显示相关"}),y.jsx("div",{className:"demo-content-container memo-content-text",dangerouslySetInnerHTML:{__html:Fb(i)}}),y.jsxs("label",{className:"form-label checkbox-form-label",onClick:u,children:[y.jsx("span",{className:"normal-text",children:"中英文内容自动间隔"}),y.jsx("img",{className:"icon-img",src:r?Ky:Qy})]}),y.jsxs("label",{className:"form-label checkbox-form-label",onClick:f,children:[y.jsx("span",{className:"normal-text",children:"部分 markdown 格式解析"}),y.jsx("img",{className:"icon-img",src:o?Ky:Qy})]}),y.jsxs("label",{className:"form-label checkbox-form-label",onClick:d,children:[y.jsx("span",{className:"normal-text",children:"隐藏图片链接地址"}),y.jsx("img",{className:"icon-img",src:n?Ky:Qy})]})]}),y.jsxs("div",{className:"section-container preferences-section-container",children:[y.jsx("p",{className:"title-text",children:"编辑器"}),y.jsxs("label",{className:"form-label checkbox-form-label",onClick:a,children:[y.jsxs("span",{className:"normal-text",children:["启用"," ",y.jsx("a",{target:"_blank",href:"https://github.com/boojack/tiny-undo",onClick:g=>g.stopPropagation(),rel:"noreferrer",children:"tiny-undo"})]}),y.jsx("img",{className:"icon-img",src:t?Ky:Qy})]})]}),y.jsxs("div",{className:"section-container hidden",children:[y.jsx("p",{className:"title-text",children:"其他"}),y.jsx("div",{className:"btn-container",children:y.jsx("button",{className:"btn export-btn",onClick:m,children:"导出数据(JSON)"})})]})]})},bte=()=>{const{globalState:{isMobileView:e}}=F.useContext(Ot);F.useEffect(()=>{je.fetchAllMemos()},[]);const t=F.useCallback(()=>{dt.setShowSiderbarInMobileView(!0)},[]);return y.jsxs("div",{className:"preference-wrapper",children:[y.jsx("div",{className:"section-header-container",children:y.jsxs("div",{className:"title-text",children:[y.jsx(Aa,{when:e,children:y.jsx("button",{className:"action-btn",onClick:t})}),y.jsx("span",{className:"normal-text",children:"账号与设置"})]})}),y.jsx("div",{className:"sections-wrapper",children:y.jsx(wte,{})})]})},Ste=e=>{const{dailyNotesState:{app:t,settings:n,view:r}}=F.useContext(Ot),{memo:o,handleUnarchivedMemoAction:i}=e,a=se.useRef(null),u=se.useRef(null),[d,f]=se.useState(""),m={...o,createdAtStr:ut.getDateTimeString(o.createdAt),deletedAtStr:ut.getDateTimeString(o.deletedAt||o.createdAt)},[g,v]=ml(!1),w={restore:F.useRef(null),delete:F.useRef(null),source:F.useRef(null)};F.useEffect(()=>{u&&(C.setIcon(w.restore.current,"archive-restore"),C.setIcon(w.delete.current,"trash"),C.setIcon(w.source.current,"home"))},[u]),F.useEffect(()=>{if(!a.current||!u.current||a.current.hasChildNodes()&&o.content===d||!r)return;f(o.content),a.current.hasChildNodes()&&a.current.empty();async function A(){var j,B;(j=a.current)==null||j.toggleClass(["markdown-rendered"],!0),await C.MarkdownRenderer.render(t,o.content+`
|
|
|
`,a.current,o.path,r);const R=(B=a.current)==null?void 0:B.querySelectorAll(".internal-link");R==null||R.forEach(L=>{const Z=L,U=Z.getAttribute("data-href");if(!U)return;t.metadataCache.getFirstLinkpathDest(U,o.path)||L.classList.add("is-unresolved"),Z.addEventListener("mouseover",$=>{$.stopPropagation(),t.workspace.trigger("hover-link",{event:$,source:"thino",hoverParent:r.containerEl,targetEl:Z,linktext:U,sourcePath:Z.href})})})}A()},[o.content,u]);const D=async()=>{switch(m.sourceType){case"DAILY":await U1(m.id,m.path);break;case"CANVAS":await V1(m.id,m.path);break;case"MULTI":await Y1(m.path);break;case"FILE":await z1(m.id,m.path);break}},T=async()=>{if(g)try{if(n.DeleteThinoDirectly)await je.deleteMemoById(m.id);else{const A=await je.hideMemoById(m.id);A&&je.editMemo(A)}}catch(A){new C.Notice(A.message)}else v()},I=async()=>{try{const A=await je.unarchiveMemo(m);A&&je.editMemo(A),i(m.id),new C.Notice(E("RESTORE SUCCEED"))}catch(A){new C.Notice(A.message)}},k=()=>{g&&v(!1)};return y.jsxs("div",{ref:u,className:`memo-wrapper ${"memos-"+m.id}`,onMouseLeave:k,children:[y.jsxs("div",{className:"memo-top-wrapper",children:[y.jsxs("span",{className:"time-text",children:[E("ARCHIVED AT")," ",m.updatedAt]}),y.jsxs("div",{className:"btns-container",children:[y.jsx("span",{ref:A=>{A&&C.setIcon(A,"more-horizontal")},className:"btn more-action-btn"}),y.jsx("div",{className:"more-action-btns-wrapper",children:y.jsxs("div",{className:"more-action-btns-container",children:[y.jsxs("div",{className:"more-action-menu-item",children:[y.jsx("span",{ref:w.restore,className:"more-action-item-icon"}),y.jsx("span",{className:"btn restore-btn",onClick:I,children:E("RESTORE")})]}),y.jsxs("div",{className:"more-action-menu-item",children:[y.jsx("span",{ref:w.source,className:"more-action-item-icon"}),y.jsx("span",{className:"btn",onClick:D,children:E("SOURCE")})]}),y.jsxs("div",{className:"more-action-menu-item delete-menu-item",children:[y.jsx("span",{ref:w.delete,className:"more-action-item-icon"}),y.jsx("span",{className:`btn delete-btn ${g?"final-confirm":""}`,onClick:T,children:E(g?"CONFIRM!":"DELETE")})]})]})})]})]}),y.jsx("div",{ref:a,className:"memo-content-text"})]})},Dte=({memos:e,query:t,HideDoneTasks:n})=>{const{tag:r,duration:o,type:i,text:a,filter:u}=t,d=tn.getQueryById(u);return!!(r||o&&o.from<o.to||i||a||d)||d||n?e.filter(m=>{let g=!0;if(m.thinoType!==void 0&&n&&m.thinoType==="TASK-DONE"&&(g=!1),m.content.contains("comment:")&&(g=!1),d){const v=JSON.parse(d.querystring);Array.isArray(v)&&(g=jh(m,v))}if(r){const v=new Set;for(const w of Array.from(m.content.match(gr)||[])){const T=w.replace(gr,"$1").trim().split("/");let I="";for(const k of T)I+=k,v.add(I),I+="/"}for(const w of Array.from(m.content.match(jr)||[])){const T=w.replace(jr,"$1").trim().split("/");let I="";for(const k of T)I+=k,v.add(I),I+="/"}for(const w of Array.from(m.content.match(so)||[])){const T=w.replace(so,"$2").trim().split("/");let I="";for(const k of T)I+=k,v.add(I),I+="/"}v.has(r)||(g=!1)}return o&&o.from<o.to&&(ut.getTimeStampByDate(m.createdAt)<o.from||ut.getTimeStampByDate(m.createdAt)>o.to)&&(g=!1),i&&(i==="NOT_TAGGED"&&(m.content.match(gr)!==null||m.content.match(so)!==null||m.content.match(jr)!==null)||i==="LINKED"&&m.content.match(Od)===null||i==="IMAGED"&&m.content.match(jd)===null||i==="CONNECTED"&&m.content.match(hc)===null)&&(g=!1),a&&!m.content.toLowerCase().includes(a.toLowerCase())&&(g=!1),g}):e.filter(m=>!m.content.contains("comment:"))},Tte=()=>{const{locationState:{query:e},globalState:{isMobileView:t},memoState:{memos:n}}=F.useContext(Ot),r=$h(),[o,i]=F.useState([]),a=se.useRef(null);F.useEffect(()=>{const m=Dte({memos:n.filter(g=>g.rowStatus==="ARCHIVED"&&g.deletedAt===""),query:e,HideDoneTasks:!1});i(m),r.setFinish()},[n,a.current,e]);const u=F.useCallback(m=>{i(g=>g.filter(v=>v.id!==m))},[]),d=F.useCallback(m=>{i(g=>g.filter(v=>v.id!==m))},[]),f=F.useCallback(()=>{dt.setShowSiderbarInMobileView(!0)},[]);return y.jsxs("div",{className:"memo-trash-wrapper",ref:a,children:[y.jsxs("div",{className:"section-header-container",children:[y.jsxs("div",{className:"title-text",children:[y.jsx(Aa,{when:t,children:y.jsx("button",{ref:m=>{m&&C.setIcon(m,"menu")},className:"btn action-btn clickable-icon",onClick:f})}),y.jsxs("span",{className:"go-home-btn",onClick:()=>{st.clearQuery(),st.setPathname("/")},children:["🏠 ",E("Return To Home Page")]})]}),y.jsx(lg,{})]}),y.jsx(xg,{thinosCount:o.length,thinos:o}),r.isLoading?y.jsx("div",{className:"tip-text-container",children:y.jsx("p",{className:"tip-text",children:E("Fetching data...")})}):o.length===0?y.jsx("div",{className:"tip-text-container",children:y.jsx("p",{className:"tip-text",children:E("Here is No Memos.")})}):y.jsx("div",{className:"deleted-memos-container",children:o.map(m=>y.jsx(Ste,{memo:m,handleUnarchivedMemoAction:d,handleDeletedMemoAction:u},`${m.id}-${m.updatedAt}`))})]})},Ite=()=>{const{dailyNotesState:{app:e},locationState:{query:t},globalState:{isMobileView:n,changedByMemos:r},memoState:{memos:o}}=F.useContext(Ot),i=$h(),[a,u]=F.useState([]),[d,f]=F.useState([]),m=se.useRef(null),g=se.useRef(null),[v,w]=F.useState(!1),[D,T]=F.useState([]),I=se.useRef([]),k=F.useCallback(({memos:j,query:B,HideDoneTasks:L})=>{const{tag:Z,duration:U,type:z,text:$,filter:te}=B,Q=tn.getQueryById(te);return!!(Z||U&&U.from<U.to||z||$||Q)||Q||L?j.filter(ee=>{let le=!0;if(ee.thinoType!==void 0&&L&&ee.thinoType==="TASK-DONE"&&(le=!1),ee.content.contains("comment:")&&(le=!1),Q){const W=JSON.parse(Q.querystring);Array.isArray(W)&&(le=jh(ee,W))}if(Z){const W=new Set;for(const de of Array.from(ee.content.match(gr)||[])){const he=de.replace(gr,"$1").trim().split("/");let K="";for(const re of he)K+=re,W.add(K),K+="/"}for(const de of Array.from(ee.content.match(jr)||[])){const he=de.replace(jr,"$1").trim().split("/");let K="";for(const re of he)K+=re,W.add(K),K+="/"}for(const de of Array.from(ee.content.match(so)||[])){const he=de.replace(so,"$2").trim().split("/");let K="";for(const re of he)K+=re,W.add(K),K+="/"}W.has(Z)||(le=!1)}return U&&U.from<U.to&&(ut.getTimeStampByDate(ee.createdAt)<U.from||ut.getTimeStampByDate(ee.createdAt)>U.to)&&(le=!1),z&&(z==="NOT_TAGGED"&&(ee.content.match(gr)!==null||ee.content.match(jr)!==null)||z==="LINKED"&&ee.content.match(Od)===null||z==="IMAGED"&&ee.content.match(jd)===null||z==="CONNECTED"&&ee.content.match(hc)===null)&&(le=!1),$&&!ee.content.toLowerCase().includes($.toLowerCase())&&(le=!1),le}):j},[]);F.useEffect(()=>{g.current&&(C.setIcon(g.current,"refresh-cw"),e.workspace.on("refresh-review-memos",R))},[g]),F.useEffect(()=>{if(!v)return;if(t){const L=[...k({memos:o,query:t,HideDoneTasks:!1})].sort(()=>Math.random()-Math.random()).slice(0,10);u(L),w(!1);return}const j=[...D].sort(()=>Math.random()-Math.random()).slice(0,10);u(j),w(!1)},[v]),F.useEffect(()=>{if(!(D.length>0))return;const j=[...D].sort(()=>Math.random()-Math.random()).slice(0,10);u(j),w(!1)},[D]),F.useEffect(()=>{m.current&&(T(k({memos:o,query:t,HideDoneTasks:!1}).filter(j=>j.rowStatus!=="ARCHIVED"&&!(j.deletedAt!==""&&j.deletedAt))),i.setFinish(),st.clearQuery())},[o,m.current]),F.useEffect(()=>{if(r&&I.current.length>0){const j=D.filter(L=>I.current.includes(L.id)),B=I.current.map(L=>j.find(Z=>Z.id===L)).filter(L=>L!==void 0);f(B);return}I.current=a.map(j=>j.id),f(a)},[a]),F.useEffect(()=>{if(a.length===0)return;const j=k({memos:a,query:t,HideDoneTasks:!1});f(j)},[t]);const A=F.useCallback(()=>{dt.setShowSiderbarInMobileView(!0)},[]),R=()=>{w(!0)};return y.jsxs("div",{className:"memo-review-wrapper",ref:m,children:[y.jsx("div",{className:"section-header-container",children:y.jsxs("div",{className:"title-wrapper",children:[y.jsxs("div",{className:"title-btns-left-wrapper",children:[y.jsx(Aa,{when:n,children:y.jsx("button",{ref:j=>{j&&C.setIcon(j,"menu")},className:"btn action-btn clickable-icon",onClick:A})}),y.jsx("span",{ref:g,onClick:R,className:"refresh-icon"})]}),y.jsx("div",{className:"title-btns-right-wrapper",children:y.jsxs("span",{className:"go-home-btn",onClick:()=>{st.setPathname("/")},children:["🏠 ",E("Return To Home Page")]})})]})}),y.jsx(xg,{}),i.isLoading?y.jsx("div",{className:"tip-text-container",children:y.jsx("span",{className:"tip-text",children:E("Fetching data...")})}):o.length===0?y.jsx("div",{className:"tip-text-container",children:y.jsx("span",{className:"tip-text",children:E("Here is No Memos.")})}):y.jsx("div",{className:"review-memos-container",children:d.map(j=>y.jsx(Oi,{memo:j},`${j==null?void 0:j.id}-${j.createdAt}`))})]})},tk=({memos:e,query:t,HideDoneTasks:n})=>{const{tag:r,duration:o,type:i,text:a,filter:u}=t,d=tn.getQueryById(u);return!!(r||o&&o.from<o.to||i||a||d)||d||n?e.filter(m=>{let g=!0;if(m.thinoType!==void 0&&n&&m.thinoType==="TASK-DONE"&&(g=!1),m.content.contains("comment:")&&(g=!1),d){const v=JSON.parse(d.querystring);Array.isArray(v)&&(g=jh(m,v))}if(r){const v=new Set;for(const w of Array.from(m.content.match(gr)||[])){const T=w.replace(gr,"$1").trim().split("/");let I="";for(const k of T)I+=k,v.add(I),I+="/"}for(const w of Array.from(m.content.match(jr)||[])){const T=w.replace(jr,"$1").trim().split("/");let I="";for(const k of T)I+=k,v.add(I),I+="/"}for(const w of Array.from(m.content.match(so)||[])){const T=w.replace(so,"$2").trim().split("/");let I="";for(const k of T)I+=k,v.add(I),I+="/"}v.has(r)||(g=!1)}return o&&o.from<o.to&&(ut.getTimeStampByDate(m.createdAt)<o.from||ut.getTimeStampByDate(m.createdAt)>o.to)&&(g=!1),i&&(i==="NOT_TAGGED"&&(m.content.match(gr)!==null||m.content.match(so)!==null||m.content.match(jr)!==null)||i==="LINKED"&&m.content.match(Od)===null||i==="IMAGED"&&m.content.match(jd)===null||i==="CONNECTED"&&m.content.match(hc)===null)&&(g=!1),a&&!m.content.toLowerCase().includes(a.toLowerCase())&&(g=!1),g}):e.filter(m=>!m.content.contains("comment:"))},xte=F.forwardRef((e,t)=>{const{currentDate:n,setCurrentDateStamp:r}=e,[o,i]=F.useState(!1),a=ut.getDateStampByDate(ut.getDateString(n)),u=F.useRef(null);F.useEffect(()=>{u.current&&(!o&&C.setIcon(u.current,"more-horizontal"),o&&C.setIcon(u.current,"x"))},[u.current,o]);const d=f=>{r(f)};return F.useImperativeHandle(t,()=>({closeDatePicker:()=>{i(!1)}})),y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"date-card-container",children:[y.jsxs("div",{className:"date-container-details",children:[y.jsxs("div",{className:"details-text",children:[C.moment(a,"x").format("dddd"),y.jsx("div",{className:"date-text",children:C.moment(a,"x").format("MMM")+C.moment(a,"x").format("DD")})]}),y.jsx("div",{className:"details-logo-text",children:E("Daily Memos")})]}),y.jsxs("div",{className:"date-container-info",children:[y.jsxs("div",{className:"date-container-info-text",children:["Week ",y.jsx("div",{className:"week-text",children:C.moment(a,"x").format("ww")}),"of ",y.jsx("div",{className:"year-text",children:C.moment(a,"x").format("YYYY")})]}),y.jsx("div",{ref:u,onClick:()=>i(!o)})]})]}),y.jsx(f0,{className:`date-picker ${o?"":"hidden"}`,datestamp:a,handleDateStampChange:d})]})}),Ete=({thino:e})=>{const t=F.useCallback(()=>{Lh(e)},[]);return y.jsxs("div",{className:"daily-thino-wrapper",children:[y.jsx("div",{className:"time-wrapper",onClick:t,children:y.jsx("span",{className:"normal-text",children:C.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm")})}),y.jsx("div",{className:"daily-thino-container",children:y.jsx(Oi,{memo:e})})]})},Cte=()=>{const{locationState:{query:e},globalState:{isMobileView:t},memoState:{memos:n},dailyNotesState:{settings:r,app:o}}=F.useContext(Ot),i=$h(),[a,u]=F.useState([]),[d,f]=F.useState(ut.getDateStampByDate(ut.getDateString(C.moment().format("YYYY-MM-DD HH:mm:ss")))),m=F.useRef(),g=F.useRef(null),v=se.useRef(null),w=F.useRef(null),[D,T]=F.useState(!1);F.useEffect(()=>{e.duration&&e.duration.from&&e.duration.to&&f(e.duration.from)},[e.duration]),F.useEffect(()=>{w.current&&(C.setIcon&&w&&!D&&C.setIcon(w.current,"share"),C.setIcon&&w&&D&&C.setIcon(w.current,"chrome"))},[w.current,D]),F.useEffect(()=>{const R=tk({memos:n,query:e,HideDoneTasks:!1}).filter(j=>ut.getTimeStampByDate(j.createdAt)>=d&&ut.getTimeStampByDate(j.createdAt)<d+fl).filter(j=>j.deletedAt==="").sort((j,B)=>ut.getTimeStampByDate(j.createdAt)-ut.getTimeStampByDate(B.createdAt));u(R),i.setFinish()},[n,d,v.current,e]);const I=F.useCallback(()=>{dt.setShowSiderbarInMobileView(!0)},[]),k=async()=>{var A;m.current&&((A=m==null?void 0:m.current)==null||A.closeDatePicker()),T(!0),setTimeout(async()=>{if(!g.current){T(!1);return}await BS(g.current),m0(g.current).then(R=>{if(r!=null&&r.AutoSaveWhenOnMobile&&C.Platform.isMobile){const j=R.split("base64,")[1];n0(j,"image/png").arrayBuffer().then(async L=>{let Z;const U="png",z=su();for(const $ in z)if(z[$]instanceof C.TFile){Z=z[$];break}Z!==void 0&&await o.vault.createBinary(await vault.getAvailablePathForAttachments(`Pasted Image ${C.moment().format("YYYYMMDDHHmmss")}`,U,Z),L)})}g0({imgUrl:R}),T(!1)}).catch(()=>{T(!1)})},0)};return y.jsxs("div",{className:"daily-thinos-list-wrapper",ref:v,children:[y.jsxs("div",{className:"section-header-container",children:[y.jsxs("div",{className:"title-text",children:[y.jsx(Aa,{when:t,children:y.jsx("button",{ref:A=>{A&&C.setIcon(A,"menu")},className:"btn action-btn clickable-icon",onClick:I})}),y.jsxs("span",{className:"go-home-btn",onClick:()=>{st.clearQuery(),st.setPathname("/")},children:["🏠 ",E("Return To Home Page")]})]}),y.jsxs("div",{className:"header-right-section",children:[y.jsxs("div",{className:"btns-container",children:[y.jsx("span",{ref:A=>{C.setIcon&&A&&C.setIcon(A,"chevron-left")},className:"btn btn-text",onClick:()=>f(A=>A-fl)}),y.jsx("span",{ref:A=>{C.setIcon&&A&&C.setIcon(A,"chevron-right")},className:"btn btn-text",onClick:()=>f(A=>A+fl)}),y.jsx("span",{ref:w,className:Kn("btn btn-text share-btn",D?"generating":""),onClick:k})]}),y.jsx(YS,{}),y.jsx(lg,{})]})]}),y.jsx(xg,{thinosCount:a.length,thinos:a}),y.jsx("div",{className:"daily-thinos-view-wrapper",children:y.jsxs("div",{ref:g,className:"daily-thinos-view-container",children:[y.jsx(xte,{ref:m,currentDate:new Date(d),setCurrentDateStamp:f}),i.isLoading?y.jsx("div",{className:"tip-text-container",children:y.jsx("p",{className:"tip-text",children:E("Fetching data...")})}):a.length===0?y.jsx("div",{className:"tip-container",children:y.jsx("p",{className:"tip-text",children:E("Noooop!")})}):y.jsx("div",{className:"daily-thinos-list-container",children:a.map(A=>y.jsx(Ete,{thino:A},`${A.id}-${A.updatedAt}`))})]})})]})},Mte={"/recycle":y.jsx(vte,{}),"/setting":y.jsx(bte,{}),"/archive":y.jsx(Tte,{}),"/review":y.jsx(Ite,{}),"/daily":y.jsx(Cte,{}),"*":y.jsx(Yee,{})},nk=e=>t=>{for(const n of Object.keys(e))if(n===t)return e[n];return e["*"]},kte=nk(mte),Nte=nk(Mte);function Ate({app:e}){const{locationState:{pathname:t},dailyNotesState:{settings:n}}=F.useContext(Ot);return F.useEffect(()=>{je.fetchAllMemos()},[]),!Mm()&&!e.plugins.getPlugin("periodic-notes")&&(n!=null&&n.EnabledLocationList.find(r=>r.value==="DAILY"))&&new C.Notice(E("Check if you opened Daily Notes Plugin Or Periodic Notes Plugin")),!Mm()&&(n!=null&&n.EnabledLocationList.find(r=>r.value==="DAILY"))&&!c6()&&new C.Notice(E("Your daily note folder is not set correctly, please check your settings")),y.jsx(Ra,{store:_e,context:Ot,children:kte(t)})}function Fte(e){const t=e.view.canvas;if(!t||!e.view.file.path.endsWith(".thino.canvas")||t.thinoBtn)return;const n=t.wrapperEl.createDiv({cls:"thino-canvas-menu-btn"}),r=sg(n);r.render(y.jsx(se.StrictMode,{children:y.jsx(Ra,{store:_e,context:Ot,children:y.jsx(Pte,{leaf:e})})})),t.thinoBtn=r,yt.getState().view.appendRoot({root:r,canvas:t})}function Pte({leaf:e}){const{memoState:{memos:t},locationState:{query:n}}=F.useContext(Ot),r=se.useRef(null),o=se.useRef(null),[i,a]=se.useState(!1),[u,d]=se.useState([]),[f,m]=se.useState([]),{tag:g,duration:v,type:w,text:D,filter:T}=n,I=tn.getQueryById(T),k=!!(g||v&&v.from<v.to||w||D||I);return F.useEffect(()=>{o.current&&C.setIcon(o.current,"eraser")},[o.current]),F.useEffect(()=>{r.current&&C.setIcon(r.current,"Memos")},[r.current]),F.useEffect(()=>{const A=e.view.file.path;d(t.filter(R=>R.sourceType==="CANVAS"&&R.path===A))},[t]),F.useEffect(()=>{if(u.length===0||!n)return;const A=tk({memos:u,query:n,HideDoneTasks:!1});m(A)},[n,u]),F.useEffect(()=>{if(!n)return;const A=new Set(f.map(j=>j.id)),R=Array.from(e.view.canvas.nodes.values());R.forEach(j=>{j.nodeEl.toggleVisibility(!0),e.view.canvas.getEdgesForNode(j).forEach(B=>{var L,Z,U;(L=B.lineGroupEl)==null||L.toggleClass("hidden",!1),(Z=B.lineStartGroupEl)==null||Z.toggleClass("hidden",!1),(U=B.lineEndGroupEl)==null||U.toggleClass("hidden",!1)})}),R.filter(j=>!A.has(j.id)).forEach(j=>{j.nodeEl.toggleVisibility(!1),e.view.canvas.getEdgesForNode(j).forEach(B=>{var L,Z,U;(L=B.lineGroupEl)==null||L.toggleClass("hidden",!0),(Z=B.lineStartGroupEl)==null||Z.toggleClass("hidden",!0),(U=B.lineEndGroupEl)==null||U.toggleClass("hidden",!0)})})},[f]),y.jsxs(y.Fragment,{children:[y.jsx("div",{ref:r,className:"btn-container",onClick:()=>a(!i)}),i&&y.jsxs("div",{className:"thino-canvas-menu",children:[y.jsxs("div",{className:"thino-canvas-filter-group",children:[y.jsx(YS,{}),y.jsx(lg,{}),k&&y.jsx("div",{ref:o,className:"clear-query",onClick:()=>{st.clearQuery()}})]}),y.jsx(jm,{initThinos:f})]})]})}const Bo="thino_view";class Ote extends C.EditorSuggest{constructor(n,r){super(n);De(this,"root");De(this,"editor");De(this,"cursor");De(this,"plugin");this.plugin=r,this.suggestEl.toggleClass("thino-date-selector",!0)}checkInMemosView(n){var i;const r=n.containerEl;if(!r)return!1;const o=(i=r.parentElement)==null?void 0:i.parentElement;return(o==null?void 0:o.classList.contains("common-editor-inputer"))||!1}onTrigger(n,r){const i=r.getLine(n.line)[n.ch-1];return this.checkInMemosView(r)&&i==="@"?(this.cursor=n,this.editor=r,C.Platform.isMobile?(new mC(this.app,"text",a=>{this.selectSuggestion(parseInt(a),new MouseEvent("click"))}).open(),null):{start:{line:n.line,ch:n.ch-1},end:n,query:""}):null}getSuggestions(){return[parseInt(C.moment().startOf("day").format("x"))]}renderSuggestion(n,r){r.empty(),this.root=Pa.createRoot(r),this.root.render(y.jsx(se.StrictMode,{children:y.jsx(f0,{className:"editor-date-picker",datestamp:n,handleDateStampChange:this.selectSuggestion.bind(this)})}))}selectSuggestion(n,r){var u,d,f;if(r instanceof KeyboardEvent||r instanceof PointerEvent&&!r.target.closest(".day-item"))return;const o=(u=this.app.workspace.getLeavesOfType("thino_view")[0])==null?void 0:u.view;(d=o==null?void 0:o.contentEl.find(".action-btn.list-or-task.list"))==null||d.click();let i="",a="";switch(this.plugin.settings.InsertDateFormat){case"Dataview":i="[due::",a="]";break;case"Tasks":i="📆 ";break}this.editor.replaceRange(i+C.moment(n).format("YYYY-MM-DD")+a,{line:this.cursor.line,ch:this.cursor.ch-1},this.cursor),(f=this.root)==null||f.unmount(),this.close()}}class jte extends C.EditorSuggest{constructor(n,r){super(n);De(this,"root");De(this,"editor");De(this,"cursor");De(this,"plugin");De(this,"memos",[]);this.plugin=r,this.memos=je.getState().memos.filter(o=>!o.deletedAt&&o.rowStatus!=="ARCHIVED")}checkInMemosView(n){var i;const r=n.containerEl;if(!r)return!1;const o=(i=r.parentElement)==null?void 0:i.parentElement;return(o==null?void 0:o.classList.contains("common-editor-inputer"))||!1}fuzzySearchItemsOptimized(n,r){const o=C.prepareFuzzySearch(n);return r.map(i=>{const a=o(i.content);return a?{item:i,match:a}:null}).filter(Boolean)}onTrigger(n,r){if(!this.checkInMemosView(r))return null;const i=r.getLine(n.line).slice(0,n.ch);if(i.lastIndexOf("~")===-1)return null;const a=i.slice(i.lastIndexOf("~")+1,n.ch);if(i[i.lastIndexOf("~")-1]!==" "&&i.lastIndexOf("~")!==0)return null;const u=a.trim();return this.memos=je.getState().memos.filter(d=>!d.deletedAt&&d.rowStatus!=="ARCHIVED"),{start:{line:n.line,ch:n.ch-u.length},end:n,query:u}}getSuggestions(n){return n.query?this.fuzzySearchItemsOptimized(n.query,this.memos).sort((o,i)=>i.match.score-o.match.score).map(o=>o.item).map(o=>({time:o.createdAt,id:o.id,content:o.content})):this.memos.map(o=>({time:o.createdAt,id:o.id,content:o.content}))}renderSuggestion(n,r){r.toggleClass("thino-suggestion",!0),r.createEl("div",{cls:"thino-suggestion-time",text:n.time}),r.createEl("div",{cls:"thino-suggestion-container"}).createEl("div",{cls:"thino-suggestion-content",text:n.content})}selectSuggestion(n){const r=n.id;this.context.editor.replaceRange("MARK: [@THINO]("+r+")",{line:this.context.end.line,ch:this.context.start.ch-1},this.context.end)}}class Lte{constructor(){De(this,"path","/fake-file-that-generated-for-thino.png");De(this,"basename","fake-file-that-generated-for-thino");De(this,"extension","png");De(this,"deleted",!1);De(this,"name","fake-file-that-generated-for-thino.png");De(this,"parent",null);De(this,"stat");De(this,"vault",null)}static[Symbol.hasInstance](t){return t instanceof C.TFile}setPath(t){}getNewPathAfterRename(t){}getShortName(){}cache(t){}updateCacheLimit(){}}class ac extends C.ItemView{constructor(n,r){super(n);De(this,"scope",new C.Scope(this.app.scope));De(this,"root");De(this,"mobileHeaderRoot");De(this,"plugin");De(this,"memosComponent");De(this,"rootList",[]);De(this,"editor",null);De(this,"navigation",!1);De(this,"file",this.app.vault.getMarkdownFiles()[0]||new Lte);De(this,"handleUpdateInstance",n=>{this.editor=n.editor});De(this,"updateCacheDebounced",C.debounce(async n=>{this.app.vault.getFileByPath(n.path)&&await je.updateMemosInFile(n)},1e3));this.plugin=r,this.registerScope()}getDisplayText(){return"Thino"}getIcon(){return"Memos"}getViewType(){return Bo}getMode(){return"source"}canToggleBacklinks(){return!1}registerScope(){const{scope:n}=this;n.register(["Mod"],"Enter",()=>{}),n.register([],"i",r=>{const o=r.target;o.tagName==="INPUT"||o.tagName==="TEXTAREA"||o.hasClass("cm-line")||o.hasClass("cm-content")||(r.preventDefault(),this.plugin.app.workspace.trigger("focus-on-textarea"))}),n.register(["Mod"],"f",r=>{const o=r.target;o.tagName==="INPUT"||o.tagName==="TEXTAREA"||o.hasClass("cm-line")||o.hasClass("cm-content")||(r.preventDefault(),this.plugin.app.workspace.trigger("focus-on-searchBar"))}),n.register([],"o",r=>{const o=r.target;o.tagName==="INPUT"||o.tagName==="TEXTAREA"||o.hasClass("cm-line")||o.hasClass("cm-content")||(r.preventDefault(),this.plugin.app.workspace.trigger("focus-on-searchBar"))}),n.register([],"Escape",()=>{setTimeout(()=>{this.plugin.app.workspace.trigger("blur-on-memos")},20)})}async onFileDeleted(n){var m,g,v,w,D;const r=lh(n,"day"),o=n.path.contains(".thino")&&n.path.contains(".canvas"),i=n.path.contains(".thino")&&n.path.contains(".md"),a=((m=this.plugin.settings)==null?void 0:m.MemoOtherSaveLocation.MemoDefaultMultiFilePath)||"Thino",u=(v=((g=n.parent)==null?void 0:g.path)||n.path)==null?void 0:v.contains(a==null?void 0:a.trim());(r||o&&this.plugin.settings.EnabledLocationList.find(T=>T.value==="CANVAS"))&&(await je.removeMemosInFile(n),je.updateTagsState()),u&&this.plugin.settings.EnabledLocationList.find(T=>T.value==="MULTI")&&(await je.removeMemosInFile(n,a),je.updateTagsState()),i&&this.plugin.settings.EnabledLocationList.find(T=>T.value==="FILE")&&(await je.removeMemosInFile(n),je.updateTagsState());const d=(w=C.getAllTags(this.app.metadataCache.getFileCache(n)))==null?void 0:w.contains(this.plugin.settings.TagForMultiTypeFiles),f=(D=C.getAllTags(this.app.metadataCache.getFileCache(n)))==null?void 0:D.contains(this.plugin.settings.TagForFileTypeFiles);!u&&d&&(await je.updateMemosInFile(n,a),je.updateTagsState()),!i&&f&&(await je.updateMemosInFile(n),je.updateTagsState())}async onFileModified(n){var m,g,v;if(dt.getState().changedByMemos){dt.setChangedByMemos(!1);return}const r=lh(n,"day"),o=n.path.contains(".thino")&&n.path.contains(".canvas"),i=n.path.contains(".thino")&&n.path.contains(".md"),a=((m=this.plugin.settings)==null?void 0:m.MemoOtherSaveLocation.MemoDefaultMultiFilePath)||"Thino",u=n.parent.path.contains(a==null?void 0:a.trim());if(r||o&&this.plugin.settings.EnabledLocationList.find(w=>w.value==="CANVAS")){await je.updateMemosInFile(n),je.updateTagsState();return}u&&this.plugin.settings.EnabledLocationList.find(w=>w.value==="MULTI")&&(await je.updateMemosInFile(n,a),je.updateTagsState()),i&&this.plugin.settings.EnabledLocationList.find(w=>w.value==="FILE")&&(await je.updateMemosInFile(n),je.updateTagsState());const d=(g=C.getAllTags(this.app.metadataCache.getFileCache(n)))==null?void 0:g.contains(this.plugin.settings.TagForMultiTypeFiles),f=(v=C.getAllTags(this.app.metadataCache.getFileCache(n)))==null?void 0:v.contains(this.plugin.settings.TagForFileTypeFiles);!u&&d&&(await je.updateMemosInFile(n,a),je.updateTagsState()),!i&&f&&(await je.updateMemosInFile(n),je.updateTagsState())}async onFileCreated(n){var r,o,i;if(this.app.workspace.layoutReady&&this.root){const a=lh(n,"day"),u=n.path.contains(".thino")&&n.path.contains(".canvas"),d=n.path.contains(".thino")&&n.path.contains(".md"),f=((r=this.plugin.settings)==null?void 0:r.MemoOtherSaveLocation.MemoDefaultMultiFilePath)||"Thino",m=n.parent.path.contains(f==null?void 0:f.trim());if(a){await yt.updateDailyNotes(n,!1),await je.updateMemosInFile(n),je.updateTagsState();return}if(u&&this.plugin.settings.EnabledLocationList.find(w=>w.value==="CANVAS")){await je.updateMemosInFile(n),je.updateTagsState();return}m&&this.plugin.settings.EnabledLocationList.find(w=>w.value==="MULTI")&&(await je.updateMemosInFile(n,f),je.updateTagsState()),d&&this.plugin.settings.EnabledLocationList.find(w=>w.value==="FILE")&&(await je.updateMemosInFile(n),je.updateTagsState());const g=(o=C.getAllTags(this.app.metadataCache.getFileCache(n)))==null?void 0:o.contains(this.plugin.settings.TagForMultiTypeFiles),v=(i=C.getAllTags(this.app.metadataCache.getFileCache(n)))==null?void 0:i.contains(this.plugin.settings.TagForFileTypeFiles);!m&&g&&(await je.updateMemosInFile(n,f),je.updateTagsState()),!d&&v&&(await je.updateMemosInFile(n),je.updateTagsState())}}async onFileRenamed(n,r){n instanceof C.TFile&&(await je.removeThinosByPath(r),await this.onFileCreated(n))}async onResize(){var r;super.onResize();const n=this.leaf;if(n&&n.height!==0){if(n.view.containerEl.toggleClass("tiny-view",n.width<600),n.view.containerEl.toggleClass("waterfall-small-group",n.width<1300),n.width>950){n.view.containerEl.classList.toggle("mobile-view",!1),dt.setIsMobileView(n.width<=950);return}if((r=this.plugin.settings)!=null&&r.ShowLeftSideBar&&!C.Platform.isMobile)return;n.view.containerEl.classList.toggle("mobile-view",!0),dt.setIsMobileView(n.width<=950)}}appendToHeader(){const n=this.leaf.view.titleContainerEl;n&&(this.mobileHeaderRoot=Pa.createRoot(n),this.mobileHeaderRoot.render(y.jsx(se.StrictMode,{children:y.jsx(Ra,{store:_e,context:Ot,children:y.jsx(vv,{})})})))}appendRoot({root:n,canvas:r}){this.rootList.push({root:n,canvas:r})}async onOpen(){this.navigation=this.plugin.settings.navigation,await this.onResize(),this.onFileCreated=this.onFileCreated.bind(this),this.onFileDeleted=this.onFileDeleted.bind(this),this.onFileModified=this.onFileModified.bind(this),C.Platform.isTablet&&document.body.toggleClass("is-tablet",!0),C.Platform.isMobile&&!C.Platform.isTablet&&this.appendToHeader(),this.registerEvent(this.app.vault.on("create",this.onFileCreated)),this.registerEvent(this.app.vault.on("delete",this.onFileDeleted)),this.registerEvent(this.app.vault.on("modify",C.debounce(this.onFileModified,2e3,!0))),this.registerEvent(this.app.vault.on("rename",this.onFileRenamed.bind(this))),this.registerEvent(this.app.workspace.on("active-leaf-change",n=>{n.view.getViewType()==="canvas"&&Fte(n)})),this.registerEvent(this.app.metadataCache.on("changed",(n,r,o)=>{lh(n,"day")&&this.updateCacheDebounced(n)}));try{this.root=Pa.createRoot(this.contentEl),yt.setView(this),this.root.render(y.jsx(se.StrictMode,{children:y.jsx(Ate,{app:this.plugin.app})}))}catch(n){console.error(n)}}onunload(){var n;super.onunload(),this.root.unmount(),(n=this.mobileHeaderRoot)==null||n.unmount(),this.rootList.forEach(r=>{var o,i,a;(o=r==null?void 0:r.root)==null||o.unmount(),(i=r==null?void 0:r.canvas)!=null&&i.thinoBtn&&(r.canvas.thinoBtn=void 0),(a=r==null?void 0:r.canvas)!=null&&a.wrapperEl.find(".thino-canvas-menu-btn")&&r.canvas.wrapperEl.find(".thino-canvas-menu-btn").detach()})}}const BI={Memos:'<svg t="1641348507339" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2120" width="100" height="100"><path d="M126.692653 478.099639l-90.757281 0c-19.019408 0-34.437336 15.423923-34.437336 34.417356 0 18.992434 15.416929 34.477297 34.437336 34.477297l90.757281 0c19.013414 0 34.42335-15.484863 34.42335-34.477297C161.116003 493.523561 145.706067 478.099639 126.692653 478.099639zM244.662333 243.526943c13.742566-13.110184 14.310011-34.948836 1.185841-48.706388l-62.644762-65.668806c-13.128167-13.762547-34.974811-14.229091-48.717377-1.118906s-14.261059 34.911872-1.132893 48.674419l62.644762 65.668806C209.123074 256.13262 230.919767 256.637127 244.662333 243.526943zM543.066631 957.422083l-60.603757 0c-18.654764 0-33.794964 15.147193-33.794964 33.862898 0 18.661757 15.1402 32.71502 33.794964 32.71502l60.603757 0c18.654764 0 33.794964-14.053262 33.794964-32.71502C576.861595 972.568277 561.721395 957.422083 543.066631 957.422083zM988.076617 479.050709l-90.757281 0c-19.019408 0-34.437336 15.423923-34.437336 34.417356s15.416929 34.477297 34.437336 34.477297l90.757281 0c19.013414 0 34.42335-15.484863 34.42335-34.477297S1007.09003 479.050709 988.076617 479.050709zM512.268737 192.765564c-172.737143 0-312.75527 150.079292-312.75527 322.746503 0 125.630192 74.080583 233.957298 180.936128 283.703669l0 84.51838c0 16.762614 15.410935 31.35435 34.42335 31.35435 0.598415 0 1.193833-0.014985 1.785255-0.042958 0.618395 0.026974 1.239788 0.042958 1.867175 0.042958l187.479731 0c5.905227 0 11.455802-1.220807 16.288078-3.477601 12.231044-4.657447 20.795671-15.383962 20.795671-27.87575l0-84.052835c107.391021-49.534578 181.935151-158.147405 181.935151-284.168214C825.024007 342.843857 684.997888 192.765564 512.268737 192.765564zM574.863548 742.713968l0 80.17063c0 3.159911-0.221783 5.976158-0.642372 8.496694l0 19.092336-124.910895 0 0-17.71768c-0.423586-2.856208-0.642372-6.123015-0.642372-9.870351l0-80.443363c-99.204024-27.75387-171.970892-118.821847-171.970892-226.930167 0-130.094827 105.4689-245.507007 235.571719-245.507007s235.563727 115.41218 235.563727 245.507007C747.832465 623.984031 674.578074 715.293772 574.863548 742.713968zM895.407204 129.328576c-13.429872-13.429872-35.233558-13.439862-48.677416 0.004995l-64.174267 64.175266c-13.448853 13.448853-13.443858 35.257534-0.013986 48.687406 13.429872 13.429872 35.281511 13.477825 48.730364 0.028972l64.175266-64.175266C908.889025 164.605092 908.837076 142.758448 895.407204 129.328576zM511.796199 159.617967c18.992434 0 34.417356-15.410935 34.417356-34.42335l0-90.757281c0-19.019408-15.423923-34.437336-34.417356-34.437336-18.992434 0-34.477297 15.416929-34.477297 34.437336l0 90.757281C477.317903 144.208031 492.802766 159.617967 511.796199 159.617967z" fill="currentColor" p-id="2121"></path></svg>'};function Rte(){Object.keys(BI).forEach(e=>{C.addIcon(e,BI[e])})}const $S=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const HI=typeof TextEncoder=="function"?new TextEncoder:void 0,_te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",vm=Array.prototype.slice.call(_te);(e=>{let t={};return e.forEach((n,r)=>t[n]=r),t})(vm);const rl=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const Bte=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),Hte=e=>{let t,n,r,o,i="";const a=e.length%3;for(let u=0;u<e.length;){if((n=e.charCodeAt(u++))>255||(r=e.charCodeAt(u++))>255||(o=e.charCodeAt(u++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|o,i+=vm[t>>18&63]+vm[t>>12&63]+vm[t>>6&63]+vm[t&63]}return a?i.slice(0,a-3)+"===".substring(a):i},rk=typeof btoa=="function"?e=>btoa(e):$S?e=>Buffer.from(e,"binary").toString("base64"):Hte,Yte=$S?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let r=0,o=e.length;r<o;r+=4096)n.push(rl.apply(null,e.subarray(r,r+4096)));return rk(n.join(""))},Ute=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?rl(192|t>>>6)+rl(128|t&63):rl(224|t>>>12&15)+rl(128|t>>>6&63)+rl(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return rl(240|t>>>18&7)+rl(128|t>>>12&63)+rl(128|t>>>6&63)+rl(128|t&63)}},zte=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Vte=e=>e.replace(zte,Ute),YI=$S?e=>Buffer.from(e,"utf8").toString("base64"):HI?e=>Yte(HI.encode(e)):e=>rk(Vte(e)),Wte=(e,t=!1)=>t?Bte(YI(e)):YI(e),Tb=C.Platform.isDesktop&&require("os"),ok=async()=>{var r,o;let e="";if(C.Platform.isDesktop)e=await Jn();else{const i=await((r=window.Capacitor)==null?void 0:r.Plugins.Device.getId());e=i.identifier||i.uuid}let t;if(Tb)t=JSON.stringify({hostname:Tb.hostname(),platform:Tb.platform(),machineid:e});else{const i=await((o=window.Capacitor)==null?void 0:o.Plugins.Device.getInfo()),a=i==null?void 0:i.model,u=i==null?void 0:i.platform;t=JSON.stringify({hostname:a||("mobile"+C.Platform.isMobile?Math.random().toString(36).substring(7):""),platform:u||"mobile",machineid:e})}return Wte(t)},Zte=async()=>{var t;let e="";if(C.Platform.isDesktop)e=await Jn();else{const n=await((t=window.Capacitor)==null?void 0:t.Plugins.Device.getId());e=n.identifier||n.uuid}return e},$te={General:"chef-hat",Thino:"Memos",Interface:"brush",Share:"share-2",Advanced:"cog"},qte=[{value:"DAILY",target:"ProcessEntriesBelow",insert:"InsertAfter"},{value:"CANVAS",target:"MemoDefaultCanvasPath"},{value:"MULTI",target:"MemoDefaultMultiFilePath"},{value:"FILE",target:"MemoDefaultSingleFilePath"}],cs={FirstLoaded:!0,StartDate:"Sunday",InsertAfter:"",UserName:"THINO 😉",ProcessEntriesBelow:"",Language:"en",SaveMemoButtonLabel:"NOTE",SaveMemoButtonIcon:"",ShareFooterStart:"{ThinoNum} Thino {UsedDay} Day",ShareFooterEnd:"✍️ by {UserName}",DefaultPrefix:"List",DefaultTimePrefix:"HH:mm",UseDailyOrPeriodic:"Daily",InsertDateFormat:"Tasks",DefaultEditorLocation:"Top",UseButtonToShowEditor:!1,FocusOnEditor:!0,OpenDailyMemosWithMemos:!0,HideDoneTasks:!1,ShowTaskLabel:!0,AppendDateWhenTaskDone:!1,MobileAndDesktop:"All",OpenMemosAutomatically:!1,ShowTime:!0,ShowDate:!0,AddBlankLineWhenDate:!1,AutoSaveWhenOnMobile:!1,DeleteFileName:"delete",QueryFileName:"query",UseVaultTags:!1,SetCustomBackgroundImage:!1,SetCustomMemoFooter:!1,DefaultLightBackgroundImage:"",DefaultDarkBackgroundImage:"",DefaultLightBackgroundImageForClean:"",DefaultDarkBackgroundImageForClean:"",DefaultMemoComposition:"{TIME} {CONTENT}",CommentOnMemos:!1,CommentsInOriginalNotes:!1,FetchMemosMark:"#memo",FetchMemosFromNote:!1,ShowCommentOnMemos:!1,ShowLeftSideBar:!1,MemoListView:"list",MemoSaveLocation:"DAILY",MemoOtherSaveLocation:{MemoDefaultCanvasPath:"basic.thino.canvas",MemoDefaultMultiFilePath:"Thino",MemoDefaultSingleFilePath:"basic.thino.md"},MemoDailyTarget:5,HeatmapColorScheme:"default",EnabledHttpApi:!1,HttpApiIpType:"localhost",HttpApiPort:"43999",AutoDownloadImage:!1,EditorType:"obsidian",EnabledLocationList:[{value:"DAILY",target:"ProcessEntriesBelow",insert:"InsertAfter"}],DeleteThinoDirectly:!1,CaptureKey:{EnableCaptureKey:!1,OpenThinoGlobally:"CommandOrControl+Shift+T",ShowNearMouse:!1},startSync:!1,tokenForVerify:{},saveThinoType:"FILE",showDayMark:!1,dayMarkRange:"day",navigation:!1,password:"",needVerify:!1,addTagAutomatically:!1,addTagPosition:"End",addTagWithNewline:!1,chatViewStyle:"default",MomentsBackgroundImage:"https://images.pexels.com/photos/531767/pexels-photo-531767.jpeg",MomentsIcon:"https://images.pexels.com/photos/256514/pexels-photo-256514.jpeg",MomentsQuote:"Share your thino with the world",DefaultThemeForThino:"modern",LastUpdatedVersion:"0.0.0",ShareToThinoWithText:!1,ShareToThinoWithTextAppend:"",ShareToThinoWithTextPrepend:"",ShareToThinoWithTextNewline:"none",hidePinnedGroup:!1,DifferentInsertTarget:!1,InsertAfterForTask:"",ProcessContentTarget:"custom",InsertType:"custom",ShareAppendType:"preset",SharePrependType:"preset",SetFileNameAfterCreate:!1,TagForFileTypeFiles:"thino/file",TagForMultiTypeFiles:"thino/multi",MinHeightForShare:"200px"};function Gte({plugin:e}){const{dailyNotesState:{verifyState:t}}=F.useContext(Ot),[n,r]=F.useState(!1),[o,i]=F.useState(!1),[a,u]=F.useState(""),[d,f]=F.useState("");F.useEffect(()=>{Zte().then(v=>{f(v)})},[]);const m=async()=>{var T;const v=a,w=!C.Platform.isDesktop&&await((T=window.Capacitor)==null?void 0:T.Plugins.Device.getId()),D=C.Platform.isDesktop?await Jn():w.identifier||w.uuid;v&&(e.settingTab.updateSettings("tokenForVerify",{...e.settings.tokenForVerify,[D]:v}),e.verify().then(I=>{I&&(r(!0),dt.setRefresh(!0),setTimeout(()=>{e.settingTab.display()},200),e.registerToolbarCheck()),new C.Notice(E(I?"Verify successfully":"Failed to verify"))}).catch(I=>{new C.Notice(E("Failed to verify"))}))},g=async v=>{u(v)};return y.jsx("div",{className:"thino-verify-component",children:t?y.jsxs("div",{className:"thino-verify-content verified",children:[y.jsx("div",{className:"thino-verified-text",children:E("You have verified your account. Congrats!")}),y.jsx("div",{className:"thino-description-link",children:y.jsxs("p",{children:[E("If you have any questions, please contact us."),y.jsx("span",{className:"thino-url",onClick:()=>{const v=localStorage.getItem("language");v&&(v==="zh"||v==="zh-TW")?window.open("https://pkmer.cn"):window.open("https://thino.pkmer.net/en/")},children:"@ PKMer"})]})})]}):y.jsxs("div",{className:"thino-verify-content",children:[y.jsxs("div",{className:"thino-description-link",children:[E("You can buy a license from")+"->",y.jsxs("span",{className:"thino-url",onClick:()=>{const v=localStorage.getItem("language");v&&(v==="zh"||v==="zh-TW")?window.open("https://pkmer.cn/products/thino"):window.open("https://thino.pkmer.net/en/#price")},children:[" ","PKMer"]})]}),y.jsx("textarea",{className:"thino-verify-textarea",value:a,onChange:v=>g(v.target.value),placeholder:E("Input activation code here")}),y.jsxs("div",{className:"thino-button-container",children:[y.jsxs("div",{className:"thino-button-group",children:[y.jsx("button",{onClick:async()=>{try{const v=await ok();await navigator.clipboard.writeText(v),i(!0)}catch(v){console.error(v),new C.Notice("Failed to copy id");return}new C.Notice(E("Copied to clipboard Successfully"))},children:E("Copy Thino id")}),y.jsx("button",{onClick:()=>{if(!o){new C.Notice(E("Please copy Thino id first"));return}const v=localStorage.getItem("language");v&&(v==="zh"||v==="zh-TW")?window.open("https://pkmer.cn/products/UserProfile/#tab-21&getCode"):window.open("https://pkmer.net/en/userprofile/#tab-21&getCode"),r(!0)},children:E("Get activation code")}),a&&y.jsx(y.Fragment,{children:y.jsx("button",{onClick:async()=>{await m()},children:E("Verify")})})]}),n?y.jsx("p",{children:E("After you verify your account, please refresh this page.")}):""]}),y.jsxs("div",{className:"thino-description-link",children:[E("If you have any questions, please contact us."),y.jsx("span",{className:"thino-url",onClick:()=>{const v=localStorage.getItem("language");v&&(v==="zh"||v==="zh-TW")?window.open("https://pkmer.cn"):window.open("https://thino.pkmer.net/en/")},children:"@ PKMer"})]})]})})}class Jte extends C.PluginSettingTab{constructor(n,r){super(n,r);De(this,"plugin");De(this,"applyDebounceTimer",0);De(this,"tabContent",new Map);De(this,"selectedTab","General");De(this,"search");De(this,"searchSettingInfo",new Map);De(this,"searchZeroState");De(this,"navigateEl");De(this,"passwordMatched",!1);De(this,"root");De(this,"debounceApplySettingsUpdate",C.debounce(async()=>{await this.plugin.saveSettings()},100,!0));De(this,"debounceDisplay",C.debounce(async()=>{await this.display()},300,!0));this.plugin=r}updateSettings(n,r){this.plugin.settings={...this.plugin.settings,[n]:r},this.applySettingsUpdate()}applySettingsUpdate(){this.debounceApplySettingsUpdate(),je.updateTagsState()}async hide(){var n;(n=this.root)==null||n.unmount(),this.passwordMatched=!1}async display(){var n;await this.plugin.loadSettings(),this.root&&((n=this.root)==null||n.unmount()),this.containerEl.empty(),this.containerEl.toggleClass("memos-settings",!0),C.Platform.isMobile&&this.containerEl.toggleClass("memos-mobile",!0),this.generateSettingsTitle(),this.addTabHeader()}generateSettingsTitle(){const n=this.containerEl.createDiv("memos-setting-title");n.createEl("h2",{text:"Thino"}),this.generateSearchBar(n)}addTabHeader(){const n=this.containerEl.createEl("nav",{cls:"memos-setting-header"});this.navigateEl=n.createDiv("memos-setting-tab-group");const r=this.containerEl.createDiv("memos-setting-content");this.updateOldData(),this.createTabAndContent("General",this.navigateEl,r,(o,i)=>this.generateGeneralSettings(i,o)),this.createTabAndContent("Thino",this.navigateEl,r,(o,i)=>this.generateMemosSettings(i,o)),this.createTabAndContent("Interface",this.navigateEl,r,(o,i)=>this.generateThemeSettings(i,o)),this.createTabAndContent("Share",this.navigateEl,r,(o,i)=>this.generateShareSettings(i,o)),this.createTabAndContent("Advanced",this.navigateEl,r,(o,i)=>this.generateAdvancedSettings(i,o)),this.createSearchZeroState(r)}updateOldData(){this.plugin.settings.UserName.startsWith("MEMO ")&&(this.plugin.settings.UserName="THINO 😉"),this.plugin.settings.ShareFooterStart.contains("{Memo")&&(this.plugin.settings.ShareFooterStart=this.plugin.settings.ShareFooterStart.replace("{MemosNum}","{ThinoNum}").replace("memos","thino")),this.applySettingsUpdate()}generateSearchBar(n){const r=new C.Setting(n);r.settingEl.style.border="none",r.addSearch(o=>{this.search=o}),this.search.setPlaceholder(E("Search all settings")),this.search.inputEl.oninput=()=>{for(const o of this.tabContent){const i=o[1];i.navButton.removeClass("memos-navigation-item-selected"),i.content.show(),i.heading.show();const a=this.search.getValue();this.selectedTab==""&&a.trim()!=""&&this.searchSettings(a.toLowerCase()),this.selectedTab=""}this.navigateEl.addClass("memos-setting-searching")},this.search.inputEl.onblur=()=>{this.navigateEl.removeClass("memos-setting-searching")},this.search.onChange(o=>{var i;if(o===""){this.triggerTabChange((i=this.tabContent.get("General"))==null?void 0:i.navButton,"General");return}this.searchSettings(o.toLowerCase())})}triggerTabChange(n,r){if(this.selectedTab==r)return;n.toggleClass("memos-navigation-item-selected",!0);const o=this.tabContent.get(r);if((o==null?void 0:o.content).show(),this.selectedTab!=""){const i=this.tabContent.get(this.selectedTab);i==null||i.navButton.removeClass("memos-navigation-item-selected"),(i==null?void 0:i.content).hide()}else{this.searchZeroState.hide();for(const i of this.searchSettingInfo)for(const a of i[1])a.containerEl.show();for(const i of this.tabContent){const a=i[1];a.heading.hide(),r!==i[0]&&a.content.hide()}}this.selectedTab=r}createTabAndContent(n,r,o,i){const a=this.selectedTab===n,u=r.createDiv("memos-navigation-item");u.toggleClass("memos-desktop",!0),C.setIcon(u.createEl("div",{cls:"memos-navigation-item-icon"}),$te[n]),u.createSpan({text:E(n)}),u.onclick=()=>{this.triggerTabChange(u,n)};const d=o.createDiv("memos-tab-settings"),f=d.createEl("h2",{cls:"memos-setting-heading",text:n+" Settings"});f.hide(),d.id=n.toLowerCase().replace(" ","-"),a?u.addClass("memos-navigation-item-selected"):d.hide(),i&&i(d,n),this.tabContent.set(n,{content:d,heading:f,navButton:u})}searchSettings(n){var i;const r=new Set,o=(a,u)=>{a.show(),r.has(u)||r.add(u)};for(const a of this.searchSettingInfo){const u=a[0],d=a[1];for(const f of d)if(n.trim()===""||(i=f.alias)!=null&&i.includes(n)||f.description.includes(n)||f.name.includes(n))o(f.containerEl,u);else if(f.options&&f.options.length>0)for(const m of f.options){if(m.description.toLowerCase().includes(n)||m.name.toLowerCase().includes(n)){o(f.containerEl,u);break}else if(m.options){for(const g of m.options)if(g.description.toLowerCase().includes(n)||g.value.toLowerCase().includes(n)){o(f.containerEl,u);break}}f.containerEl.hide()}else f.containerEl.hide()}for(const a of this.tabContent)r.has(a[0])?a[1].heading.show():a[1].heading.hide();r.size===0?this.searchZeroState.show():this.searchZeroState.hide()}addSettingToMasterSettingsList(n,r,o="",i="",a=[],u=""){var f;const d={containerEl:r,name:o.toLowerCase(),description:i.toLowerCase(),options:a,alias:u};this.searchSettingInfo.has(n)?(f=this.searchSettingInfo.get(n))==null||f.push(d):this.searchSettingInfo.set(n,[d])}createSearchZeroState(n){this.searchZeroState=n.createDiv(),this.searchZeroState.hide(),this.searchZeroState.createEl(C.Platform.isMobile?"h3":"h2",{text:"No settings match search"}).style.textAlign="center"}generateGeneralSettings(n,r){this.customHeading(n,r)}async generateThemeSettings(n,r){var d;const o=yt.getState().verifyState,i=!C.Platform.isDesktop&&await((d=window.Capacitor)==null?void 0:d.Plugins.Device.getId()),a=C.Platform.isDesktop?await Jn():i.identifier||i.uuid,u=o&&(o==null?void 0:o.appId)===a;await this.customNameAndTheme(n,r,u)}async generateMemosSettings(n,r){var d;const o=yt.getState().verifyState,i=!C.Platform.isDesktop&&await((d=window.Capacitor)==null?void 0:d.Plugins.Device.getId()),a=C.Platform.isDesktop?await Jn():i.identifier||i.uuid,u=o&&(o==null?void 0:o.appId)===a;this.setPasswordSettings(n,r),this.addMemoSettings(n,r),this.addTaskRelatedSettings(n,r),this.customFileNameSettings(n,r,u),this.addThinoProSettings(n,r,u)}async generateShareSettings(n,r){var d;const o=yt.getState().verifyState,i=!C.Platform.isDesktop&&await((d=window.Capacitor)==null?void 0:d.Plugins.Device.getId()),a=C.Platform.isDesktop?await Jn():i.identifier||i.uuid,u=o&&(o==null?void 0:o.appId)===a;new lt(r,this).setHeading().setTab(n).setName(E("Copy filtered results")),this.copyMemosSettings(n,r),new lt(r,this).setHeading().setTab(n).setName(E("Share image")),this.shareMemosSettings(n,r),C.Platform.isMobile&&this.shareToThinosSettings(n,r,u)}async generateAdvancedSettings(n,r){var d;this.saveDataSettings(n,r),this.fetchDataSettings(n,r),this.navigationSettings(n,r),this.clearConfigSettings(n,r);const o=yt.getState().verifyState,i=!C.Platform.isDesktop&&await((d=window.Capacitor)==null?void 0:d.Plugins.Device.getId()),a=C.Platform.isDesktop?await Jn():i.identifier||i.uuid,u=o&&(o==null?void 0:o.appId)===a;this.setGlobalSettings(n,r,u)}async customNameAndTheme(n,r,o){new lt(r,this).setName(E("Theme for Thino")).setDesc(E("Set the theme for Thino")).setTab(n).addDropdown(async a=>{a.addOption("modern","Modern"),a.addOption("classic","Classic"),a.setValue(this.plugin.settings.DefaultThemeForThino).onChange(async u=>{this.plugin.settings.DefaultThemeForThino=u,this.applySettingsUpdate()})}),new lt(r,this).setTab(n).setHeading().setName(E("Interface Details"));let i;new lt(r,this).setName(E("Heatmap Color Scheme")).setDesc(E("Set different color scheme for heatmap.")).setTab(n).addDropdown(async a=>{i=a,i.addOption("default",E("Default")),i.addOption("gray",E("Gray")),i.addOption("grass",E("Grass")),i.addOption("flame",E("Flame")),i.addOption("olive",E("Olive")),i.addOption("ice",E("Ice")),i.addOption("magenta",E("Magenta")),i.setValue(this.plugin.settings.HeatmapColorScheme).onChange(async u=>{this.plugin.settings.HeatmapColorScheme=u,this.applySettingsUpdate()})}),new lt(r,this).setName(E("Save Memo button label")).setDesc(E("The text shown on the save Memo button in the UI. 'NOTEIT' by default.")).setTab(n).addText(a=>a.setPlaceholder(cs.SaveMemoButtonLabel).setValue(this.plugin.settings.SaveMemoButtonLabel).onChange(async u=>{this.plugin.settings.SaveMemoButtonLabel=u,this.applySettingsUpdate()})),C.Platform.isDesktop&&new lt(r,this).setName(E("Always Show Leaf Sidebar on PC")).setDesc(E("Show left sidebar on PC even when the leaf width is less than 875px. False by default.")).setTab(n).addToggle(a=>a.setValue(this.plugin.settings.ShowLeftSideBar).onChange(async u=>{this.plugin.settings.ShowLeftSideBar=u,this.applySettingsUpdate()})),await this.getEditorLocation(r,n),new lt(r,this).setHeading().setTab(n).setName("💎 "+E("Pro features")),this.addThinoDailyMarkSettings(n,r,o),new lt(r,this).setName(E("Chat view style")).setDesc(E("Set the style of chat view")).setTab(n).addDropdown(async a=>{i=a,i.addOption("default","Default"),i.addOption("fluent","Fluent"),i.addOption("inline","Inline"),i.setValue(this.plugin.settings.chatViewStyle).onChange(async u=>{if(!o){Fn();return}this.plugin.settings.chatViewStyle=u,this.applySettingsUpdate()})}),this.addThinoMomentsSettings(n,r,o)}addThinoDailyMarkSettings(n,r,o){let i;new lt(r,this).setName(E("Show day mark in thino list")).setDesc(E("Show day mark on the top of daily range thino. False by default.")).setTab(n).addToggle(a=>a.setValue(this.plugin.settings.showDayMark).onChange(async u=>{if(!o){Fn();return}this.plugin.settings.showDayMark=u,this.applySettingsUpdate(),this.debounceDisplay()})),this.plugin.settings.showDayMark&&(new lt(r,this).setName(E("Day mark range")).setDesc(E("Set the range of day mark. Day by default.")).setTab(n).addDropdown(async a=>{i=a,i.addOption("day","day"),i.addOption("week","week"),i.addOption("month","month"),i.addOption("quarter","quarter"),i.addOption("year","year"),i.setValue(this.plugin.settings.dayMarkRange).onChange(async u=>{this.plugin.settings.dayMarkRange=u,this.applySettingsUpdate()})}),new lt(r,this).setName(E("Hide pinned group")).setDesc(E("Hide pinned group in thino list. False by default.")).setTab(n).addToggle(a=>a.setValue(this.plugin.settings.hidePinnedGroup).onChange(async u=>{if(!o){Fn();return}this.plugin.settings.hidePinnedGroup=u,this.applySettingsUpdate()})))}addThinoMomentsSettings(n,r,o){new lt(r,this).setTab(n).setName(E("Background image for moments view")).setDesc(E("Set the background image for moments view")).addText(i=>{new hd(i.inputEl),i.setPlaceholder("URL").setValue(this.plugin.settings.MomentsBackgroundImage).onChange(async a=>{o&&(this.plugin.settings.MomentsBackgroundImage=a,this.applySettingsUpdate())})})}async getEditorLocation(n,r){let o;C.Platform.isMobile&&(new lt(n,this).setName(E("Default editor position on mobile")).setDesc(E("Set the default editor position on Mobile, 'Top' by default.")).setTab(r).addDropdown(async i=>{o=i,o.addOption("Top",E("Top")),o.addOption("Bottom",E("Bottom")),o.setValue(this.plugin.settings.DefaultEditorLocation).onChange(async a=>{this.plugin.settings.DefaultEditorLocation=a,this.applySettingsUpdate(),setTimeout(()=>{this.display()},200)})}),this.plugin.settings.DefaultEditorLocation!=="Top"&&new lt(n,this).setName(E("Use button to show editor on mobile")).setDesc(E("Set a float button to call editor on mobile. Only when editor located at the bottom works.")).setTab(r).addToggle(i=>i.setValue(this.plugin.settings.UseButtonToShowEditor).onChange(async a=>{this.plugin.settings.UseButtonToShowEditor=a,this.applySettingsUpdate()})))}customHeading(n,r){new lt(r,this).setHeading().setName(E("User info")).setTab(n),new lt(r,this).setName(E("User name")).setDesc(E("Set your user name here. 'Memos 😏' By default")).setTab(n).addText(v=>v.setPlaceholder(cs.UserName).setValue(this.plugin.settings.UserName).onChange(async w=>{this.plugin.settings.UserName=w,this.applySettingsUpdate()})),new lt(r,this).setTab(n).setName(E("User icon")).setDesc(E("Set user icon for thino. You can input http/https link or file path in vault.")).addText(v=>{new hd(v.inputEl),v.setPlaceholder("URL").setValue(this.plugin.settings.MomentsIcon).onChange(async w=>{this.plugin.settings.MomentsIcon=w,this.applySettingsUpdate()})}),new lt(r,this).setTab(n).setName(E("User quote")).setDesc(E("Set user quote for thino")).addText(v=>v.setPlaceholder("Input anything here").setValue(this.plugin.settings.MomentsQuote).onChange(async w=>{this.plugin.settings.MomentsQuote=w,this.applySettingsUpdate()}));let o=!1;const i=document.createDocumentFragment();i.createEl("span",{text:E("Connect to PKMer Sync, you can check it in ")});const a=localStorage.getItem("language");let u;a&&a==="zh"?u="https://pkmer.cn/products/UserProfile/#tab-21&activateSync":u="https://thino.pkmer.net/en/",i.createEl("a",{text:E("PKMer Sync"),attr:{href:u}}),new lt(r,this).setHeading().setName(E("Pro verification status")).setTab(n);const d=document.createDocumentFragment(),f=d.createEl("div",{cls:"thino-activation"}),m=new lt(r,this).setName(E("Activate Pro Version")).setDesc(d).setTab(n);m.settingEl.toggleClass("thino-activation-setting",!0),m.nameEl.toggleClass("thino-activation-title",!0),this.root=Pa.createRoot(f),this.root.render(y.jsx(Ra,{store:_e,context:Ot,children:y.jsx(Gte,{plugin:this.plugin})}));let g=!1;new lt(r,this).setName(E("Deactivate")).setTab(n).addButton(v=>{v.setWarning().setButtonText(E("Remove")).onClick(async()=>{var T;if(!g){v.setButtonText(E("Confirm?")),g=!0;return}g=!1;const w=!C.Platform.isDesktop&&await((T=window.Capacitor)==null?void 0:T.Plugins.Device.getId()),D=C.Platform.isDesktop?await Jn():w.identifier||w.uuid;this.plugin.settings.tokenForVerify[D]&&(delete this.plugin.settings.tokenForVerify[D],await this.plugin.saveSettings(),new C.Notice(E("Remove successfully"))),await this.plugin.verify(),dt.setRefresh(!0),setTimeout(()=>{this.display()},20)})}),(a==="zh"||a==="zh-TW")&&new lt(r,this).setHeading().setName(E("Sync service")).setTab(n),(a==="zh"||a==="zh-TW")&&new lt(r,this).setName(E("Sync Thino via PKMer")).setDesc(i).setTab(n).addButton(v=>{var D;const w=(D=this.plugin.app)==null?void 0:D.loadLocalStorage("tokenForSync");v.setButtonText(E(w?"Unlink":"Link")).onClick(async()=>{var T;if(!w){const I=localStorage.getItem("language");I&&(I==="zh"||I==="zh-TW")?window.open("https://pkmer.cn/products/UserProfile/#tab-21&activateSync"):window.open("https://thino.pkmer.net/en/");return}if(!o){v.setButtonText(E("Confirm?")),o=!0;return}o=!1,w&&((T=this.plugin.app)==null||T.saveLocalStorage("tokenForSync",""),new C.Notice(E("Remove successfully"))),dt.setRefresh(!0),setTimeout(()=>{this.display()},20)})}),(a==="zh"||a==="zh-TW")&&this.showSyncStatus(r,n)}showSyncStatus(n,r){var i;(i=this.plugin.app)!=null&&i.loadLocalStorage("tokenForSync")&&(new lt(n,this).setName(E("Save thino type when sync local")).setDesc(E("Set the default save thino type when sync local, FILE by default.")).setTab(r).addDropdown(async a=>{a.addOption("DAILY",E("DAILY")),a.addOption("FILE",E("FILE")),a.setValue(this.plugin.settings.saveThinoType).onChange(async u=>{this.plugin.settings.saveThinoType=u,this.applySettingsUpdate()})}),new lt(n,this).setName(E("Sync Status")).setDesc(E("Start or stop sync")).setTab(r).addButton(a=>{a.setButtonText(this.plugin.settings.startSync?E("Stop"):E("Start")).onClick(async()=>{this.plugin.settings.startSync=!this.plugin.settings.startSync,await this.plugin.saveSettings(),dt.setRefresh(!0),new C.Notice(this.plugin.settings.startSync?E("Start sync successfully"):E("Stop sync successfully")),setTimeout(()=>{this.display()},200)})}))}addMemoSettings(n,r){new lt(r,this).setName(E("Open Memos when obsidian opens")).setDesc(E("When enable this, Memos will open when Obsidian opens. False by default.")).setTab(n).addDropdown(i=>{i.addOption("Desktop","Desktop"),i.addOption("Mobile","Mobile"),i.addOption("All","All"),i.setValue(this.plugin.settings.MobileAndDesktop).onChange(async a=>{this.plugin.settings.MobileAndDesktop=a,this.applySettingsUpdate()})}).addToggle(i=>i.setValue(this.plugin.settings.OpenMemosAutomatically).onChange(async a=>{this.plugin.settings.OpenMemosAutomatically=a,this.applySettingsUpdate()})),new lt(r,this).setHeading().setTab(n).setName(E("Editor")),new lt(r,this).setName(E("Use Tags In Vault")).setDesc(E("Use tags in vault rather than only in Memos. False by default.")).setTab(n).addToggle(i=>i.setValue(this.plugin.settings.UseVaultTags).onChange(async a=>{this.plugin.settings.UseVaultTags=a,this.applySettingsUpdate()}));let o;new lt(r,this).setName(E("Default insert date format")).setDesc(E("Set the default date format when insert date by @, 'Tasks' by default.")).setTab(n).addDropdown(async i=>{o=i,o.addOption("Tasks","Tasks"),o.addOption("Dataview","Dataview"),o.setValue(this.plugin.settings.InsertDateFormat).onChange(async a=>{this.plugin.settings.InsertDateFormat=a,this.applySettingsUpdate()})}),new lt(r,this).setHeading().setTab(n).setName(E("Daily notes")),new lt(r,this).setName(E("Default prefix when save thino")).setDesc(E("Set the default prefix when create memo, 'List' by default.")).setTab(n).addDropdown(async i=>{o=i,o.addOption("List",E("List")),o.addOption("Task",E("Task")),o.setValue(this.plugin.settings.DefaultPrefix).onChange(async a=>{this.plugin.settings.DefaultPrefix=a,this.applySettingsUpdate()})}),this.plugin.settings.EnabledLocationList.some(i=>i.value==="DAILY")&&new lt(r,this).setName(E("Default time prefix for thino in daily notes")).setDesc(E("Set default time prefix for thino in daily notes.")).setTab(n).addDropdown(async i=>{o=i,o.addOption("HH:mm","HH:mm"),o.addOption("HH:mm:ss","HH:mm:ss"),o.setValue(this.plugin.settings.DefaultTimePrefix).onChange(async a=>{this.plugin.settings.DefaultTimePrefix=a,this.applySettingsUpdate()})})}addThinoProSettings(n,r,o){new lt(r,this).setHeading().setTab(n).setName("💎 "+E("Pro features")),new lt(r,this).setName(E("Default save type")).setDesc(E('Set the default save type for thino. "DAILY" by default')).setTab(n).addDropdown(async i=>{for(const a of this.plugin.settings.EnabledLocationList)i.addOption(a.value,E(a.value));i.setValue(this.plugin.settings.MemoSaveLocation||this.plugin.settings.EnabledLocationList[0].value).onChange(async a=>{if(!o){Fn();return}this.plugin.settings.MemoSaveLocation=a,this.applySettingsUpdate()})}),new lt(r,this).setName(E("Add tag automatically")).setDesc(E("Add tag to the end or beginning of the thino content when creating a thino and filtering tags")).setTab(n).addToggle(i=>i.setValue(this.plugin.settings.addTagAutomatically).onChange(async a=>{if(!o){Fn();return}this.plugin.settings.addTagAutomatically=a,this.applySettingsUpdate(),this.debounceDisplay()})),this.plugin.settings.addTagAutomatically&&(new lt(r,this).setName(E("Add tag position")).setDesc(E("Set the position of the tag when adding tag automatically")).setTab(n).addDropdown(async i=>{i.addOption("End",E("End")),i.addOption("Beginning",E("Beginning")),i.setValue(this.plugin.settings.addTagPosition).onChange(async a=>{this.plugin.settings.addTagPosition=a,this.applySettingsUpdate()})}),new lt(r,this).setName(E("Add tag with new line")).setDesc(E("Add tag with new line when adding tag automatically")).setTab(n).addToggle(i=>i.setValue(this.plugin.settings.addTagWithNewline).onChange(async a=>{this.plugin.settings.addTagWithNewline=a,this.applySettingsUpdate()})))}memosCommentSettings(n,r){new lt(r,this).setName(E("Allow Comments On Memos")).setDesc(E("You can comment on memos. False by default")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.CommentOnMemos).onChange(async i=>{this.plugin.settings.CommentOnMemos=i,this.applySettingsUpdate(),this.display()})),this.plugin.settings.CommentOnMemos&&(new lt(r,this).setName(E("Always Show Memo Comments")).setDesc(E("Always show memo comments on memos. False by default")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.ShowCommentOnMemos).onChange(async i=>{this.plugin.settings.ShowCommentOnMemos=i,this.applySettingsUpdate()})),new lt(r,this).setName(E("Comments In Original DailyNotes/Notes")).setDesc(E("You should install Dataview Plugin ver 0.5.9 or later to use this feature.")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.CommentsInOriginalNotes).onChange(async i=>{this.plugin.settings.CommentsInOriginalNotes=i,this.applySettingsUpdate()})))}shareToThinosSettings(n,r,o){new lt(r,this).setHeading().setTab(n).setName("💎 "+E("Pro features")),new lt(r,this).setTab(n).setName(E("Append/prepend text when share to Thino")).addToggle(i=>{i.setValue(this.plugin.settings.ShareToThinoWithText).onChange(async a=>{if(!o){Fn();return}this.plugin.settings.ShareToThinoWithText=a,this.applySettingsUpdate(),this.debounceDisplay()})}),this.plugin.settings.ShareToThinoWithText&&(new lt(r,this).setTab(n).setName(E("Prepend Text Action")).addDropdown(i=>{i.addOption("none",E("None")),i.addOption("preset",E("Preset")),i.addOption("input",E("Input")),i.addOption("selectTags",E("Select Tags")),i.setValue(this.plugin.settings.SharePrependType).onChange(async a=>{this.plugin.settings.SharePrependType=a,this.applySettingsUpdate(),this.debounceDisplay()})}),this.plugin.settings.SharePrependType==="preset"&&new lt(r,this).setTab(n).setName(E("Prepend text when share to Thino")).addText(i=>{i.setPlaceholder(E("Input anything here")).setValue(this.plugin.settings.ShareToThinoWithTextPrepend).onChange(async a=>{this.plugin.settings.ShareToThinoWithTextPrepend=a,this.applySettingsUpdate()})}),new lt(r,this).setTab(n).setName(E("Append Text Action")).addDropdown(i=>{i.addOption("none",E("None")),i.addOption("preset",E("Preset")),i.addOption("input",E("Input")),i.addOption("selectTags",E("Select Tags")),i.setValue(this.plugin.settings.ShareAppendType).onChange(async a=>{this.plugin.settings.ShareAppendType=a,this.applySettingsUpdate(),this.debounceDisplay()})}),this.plugin.settings.ShareAppendType==="preset"&&new lt(r,this).setTab(n).setName(E("Append text when share to Thino")).addText(i=>{i.setPlaceholder(E("Input anything here")).setValue(this.plugin.settings.ShareToThinoWithTextAppend).onChange(async a=>{this.plugin.settings.ShareToThinoWithTextAppend=a,this.applySettingsUpdate()})}),new lt(r,this).setTab(n).setName(E("Add newline when append/prepend text")).addDropdown(async i=>{i.addOption("prepend",E("Prepend")),i.addOption("append",E("Append")),i.addOption("both",E("Both")),i.addOption("none",E("None")),i.setValue(this.plugin.settings.ShareToThinoWithTextNewline).onChange(async a=>{this.plugin.settings.ShareToThinoWithTextNewline=a,this.applySettingsUpdate()})}))}copyMemosSettings(n,r){new lt(r,this).setName(E("Show Time When Copy Results")).setDesc(E("Show time when you copy results, like 12:00. Copy time by default.")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.ShowTime).onChange(async i=>{this.plugin.settings.ShowTime=i,this.applySettingsUpdate()})),new lt(r,this).setName(E("Show Date When Copy Results")).setDesc(E("Show date when you copy results, like [[2022-01-01]]. Copy date by default.")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.ShowDate).onChange(async i=>{this.plugin.settings.ShowDate=i,this.applySettingsUpdate(),this.debounceDisplay()})),this.plugin.settings.ShowDate&&new lt(r,this).setName(E("Add Blank Line Between Different Date")).setDesc(E("Add blank line when copy result with date. No blank line by default.")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.AddBlankLineWhenDate).onChange(async i=>{this.plugin.settings.AddBlankLineWhenDate=i,this.applySettingsUpdate()}))}shareMemosSettings(n,r){new lt(r,this).setName(E("Custom height for Thino content")).setDesc(E("Set custom height for Thino content. Like 200px or 20rem")).setTab(n).addText(o=>o.setPlaceholder(E("Input height")).setValue(this.plugin.settings.MinHeightForShare).onChange(async i=>{this.plugin.settings.MinHeightForShare=i,this.debounceApplySettingsUpdate()})),this.customMemoFooter(n,r),new lt(r,this).setName(E("Custom Background Image")).setDesc(E("Set custom background image.")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.SetCustomBackgroundImage).onChange(async i=>{this.plugin.settings.SetCustomBackgroundImage=i,this.applySettingsUpdate(),setTimeout(()=>{this.display()},100)})),this.plugin.settings.SetCustomBackgroundImage&&(new lt(r,this).setName(E("Background Image in Light Theme")+` [${E("Modern")}]`).setDesc(E('Set background image in light theme. Set something like "Daily/one.png"')).setTab(n).addText(o=>{new hd(o.inputEl),o.setPlaceholder(cs.DefaultLightBackgroundImage).setValue(this.plugin.settings.DefaultLightBackgroundImage).onChange(async i=>{this.plugin.settings.DefaultLightBackgroundImage=i,this.applySettingsUpdate()})}),new lt(r,this).setName(E("Background Image in Dark Theme")+` [${E("Modern")}]`).setDesc(E('Set background image in dark theme. Set something like "Daily/one.png"')).setTab(n).addText(o=>{new hd(o.inputEl),o.setPlaceholder(cs.DefaultDarkBackgroundImage).setValue(this.plugin.settings.DefaultDarkBackgroundImage).onChange(async i=>{this.plugin.settings.DefaultDarkBackgroundImage=i,this.applySettingsUpdate()})}),new lt(r,this).setName(E("Background Image in Light Theme")+` [${E("Clean")}]`).setDesc(E('Set background image in light theme. Set something like "Daily/one.png"')).setTab(n).addText(o=>{new hd(o.inputEl),o.setPlaceholder(cs.DefaultLightBackgroundImageForClean).setValue(this.plugin.settings.DefaultLightBackgroundImageForClean).onChange(async i=>{this.plugin.settings.DefaultLightBackgroundImageForClean=i,this.applySettingsUpdate()})}),new lt(r,this).setName(E("Background Image in Dark Theme")+` [${E("Clean")}]`).setDesc(E('Set background image in dark theme. Set something like "Daily/one.png"')).setTab(n).addText(o=>{new hd(o.inputEl),o.setPlaceholder(cs.DefaultDarkBackgroundImageForClean).setValue(this.plugin.settings.DefaultDarkBackgroundImageForClean).onChange(async i=>{this.plugin.settings.DefaultDarkBackgroundImageForClean=i,this.applySettingsUpdate()})}))}customMemoFooter(n,r){new lt(r,this).setName(E("Custom Memo Footer")).setDesc(E("Set custom memo footer.")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.SetCustomMemoFooter).onChange(async i=>{this.plugin.settings.SetCustomMemoFooter=i,this.applySettingsUpdate(),setTimeout(()=>{this.display()},100)})),this.plugin.settings.SetCustomMemoFooter&&new lt(r,this).setName(E("Share Memos Image Footer Start")).setDesc(E("Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default")).setTab(n).addText(o=>o.setPlaceholder(cs.ShareFooterStart).setValue(this.plugin.settings.ShareFooterStart).onChange(async i=>{this.plugin.settings.ShareFooterStart=i,this.applySettingsUpdate()}))}saveDataSettings(n,r){let o;new lt(r,this).setName(E("Default Editor Mode")).setDesc(E("Live-Preview Mode OR Source Mode.")).setTab(n).addDropdown(async i=>{o=i,o.addOption("obsidian",E("Live-preview")),o.addOption("memos",E("Source")),o.setValue(this.plugin.settings.EditorType).onChange(async a=>{this.plugin.settings.EditorType=a,this.applySettingsUpdate()})}),new lt(r,this).setName(E("Delete Thino Directly")).setDesc(E("When delete thino directly, it will not be moved to trash. False by default.")).setTab(n).addToggle(i=>{i.setValue(this.plugin.settings.DeleteThinoDirectly).onChange(async a=>{this.plugin.settings.DeleteThinoDirectly=a,this.applySettingsUpdate()})})}async initHttpServer(n,r){var d;const o=yt.getState().verifyState,i=!C.Platform.isDesktop&&await((d=window.Capacitor)==null?void 0:d.Plugins.Device.getId()),a=C.Platform.isDesktop?await Jn():i.identifier||i.uuid,u=o&&(o==null?void 0:o.appId)===a;new lt(n,this).setName(E("Enable Local Http Server")).setTab(r).setDisabled(!u).addToggle(f=>f.setValue(this.plugin.settings.EnabledHttpApi).onChange(async m=>{if(!u){Fn();return}this.plugin.settings.EnabledHttpApi=m,this.applySettingsUpdate(),setTimeout(()=>{this.plugin.settings.EnabledHttpApi?this.plugin.initServer():this.plugin.stopServer(),this.display()},100)})),this.plugin.settings.EnabledHttpApi&&(new lt(n,this).setName(E("Memos Http Server Port")).setDesc(E("Set memos http server port to listen. '43999' by default")).setTab(r).addText(f=>f.setPlaceholder(cs.HttpApiPort).setValue(this.plugin.settings.HttpApiPort).onChange(async m=>{if(!u){Fn();return}this.plugin.settings.HttpApiPort=m,this.applySettingsUpdate(),setTimeout(()=>{this.plugin.stopServer(),this.plugin.initServer()},1e3)})),new lt(n,this).setName(E("Auto Download Image")).setDesc(E("Auto download image when save to thino. 'false' by default")).setTab(r).setDisabled(!u).addToggle(f=>{f.setValue(this.plugin.settings.AutoDownloadImage).onChange(async m=>{if(!u){Fn();return}this.plugin.settings.AutoDownloadImage=m,this.applySettingsUpdate(),setTimeout(()=>{this.plugin.stopServer(),this.plugin.initServer()},1e3)})}),new lt(n,this).setName(E("Thino Http IP Type")).setDesc(E("Set Thino http server ip to listen. 'localhost' by default")).setTab(r).addDropdown(f=>{f.addOption("localhost","localhost"),f.addOption("127.0.0.1","127.0.0.1"),f.setValue(this.plugin.settings.HttpApiIpType).onChange(async m=>{if(!o||(o==null?void 0:o.appId)!==a){Fn();return}this.plugin.settings.HttpApiIpType=m,this.applySettingsUpdate(),setTimeout(()=>{this.plugin.stopServer(),this.plugin.initServer()},1e3)})}))}fetchDataSettings(n,r){let o;new lt(r,this).setName(E("Use which plugin's default configuration")).setDesc(E("Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.")).setTab(n).addDropdown(async i=>{o=i,o.addOption("Daily",E("Daily")),o.addOption("Periodic","Periodic"),o.setValue(this.plugin.settings.UseDailyOrPeriodic).onChange(async a=>{this.plugin.settings.UseDailyOrPeriodic=a,this.applySettingsUpdate()})})}navigationSettings(n,r){new lt(r,this).setName(E("Open link directly in Thino view")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.navigation).onChange(async i=>{this.plugin.settings.navigation=i,this.applySettingsUpdate()}))}clearConfigSettings(n,r){new lt(r,this).setName(E("Reset all Thino settings")).setDesc(E("Reset Thino settings to default settings.")).setTab(n).addButton(o=>{o.setWarning().setButtonText(E("Reset settings")).onClick(async()=>{new fd(this.app,E("Reset all Thino settings"),async()=>{var i;this.plugin.settings={...cs,tokenForVerify:this.plugin.settings.tokenForVerify,password:this.plugin.settings.password,needVerify:this.plugin.settings.needVerify},this.debounceApplySettingsUpdate(),await je.fetchAllMemos(),je.updateTagsState(),(i=this.plugin.app)==null||i.saveLocalStorage("tokenForSync",""),dt.setRefresh(!0),dt.setMemoListView("list"),new C.Notice(E("All settings have been reset to default.")),this.debounceDisplay()}).open()})})}setPasswordSettings(n,r){new lt(r,this).setName(E("Need password to unlock Thino")).setTab(n).addToggle(o=>{this.plugin.settings.needVerify&&this.plugin.settings.password&&!this.passwordMatched&&(o.toggleEl.onclick=i=>{this.passwordMatched||(i.preventDefault(),new UI(this.app,this,this.plugin,a=>{o.setDisabled(!a),this.passwordMatched=a,this.debounceDisplay()}).open(),new C.Notice(E("Please input your password to change password settings")))}),o.setDisabled(this.plugin.settings.needVerify&&this.plugin.settings.password&&!this.passwordMatched).setValue(this.plugin.settings.needVerify).onChange(async i=>{this.plugin.settings.needVerify=i,i&&(this.passwordMatched=!1),this.applySettingsUpdate(),this.debounceDisplay()})}),this.plugin.settings.needVerify&&new lt(r,this).setName(E("Password to lock Thino")).setTab(n).addText(o=>{this.plugin.settings.needVerify&&this.plugin.settings.password&&!this.passwordMatched&&(o.inputEl.onclick=i=>{this.passwordMatched||(i.preventDefault(),new UI(this.app,this,this.plugin,a=>{o.inputEl.readOnly=!a,this.passwordMatched=a,this.debounceDisplay()}).open(),new C.Notice(E("Please input your password to change password settings")))}),o.inputEl.readOnly=this.plugin.settings.password&&this.plugin.settings.needVerify&&!this.passwordMatched,o.inputEl.oncopy=()=>!1,o.inputEl.type="password",o.setValue(this.plugin.settings.password).onChange(async i=>{this.plugin.settings.password=i,this.applySettingsUpdate()})})}setGlobalSettings(n,r,o){new lt(r,this).setHeading().setTab(n).setName("💎 "+E("Pro features")),this.initHttpServer(r,n),new lt(r,this).setName(E("Enable opening thino globally")).setDesc(E("Enable opening thino globally. False by default.")).setTab(n).addToggle(i=>i.setValue(this.plugin.settings.CaptureKey.EnableCaptureKey).onChange(async a=>{if(!o){Fn();return}this.plugin.settings.CaptureKey.EnableCaptureKey=a,this.applySettingsUpdate(),setTimeout(()=>{this.display()},100)})),this.plugin.settings.CaptureKey.EnableCaptureKey&&(new lt(r,this).setName(E("Key for opening thino globally")).setDesc(E("Set key for opening thino globally. CTRL + SHIFT + T by default.")).setTab(n).addText(i=>i.setPlaceholder(cs.CaptureKey.OpenThinoGlobally).setValue(this.plugin.settings.CaptureKey.OpenThinoGlobally).onChange(async a=>{if(!o){Fn();return}this.plugin.settings.CaptureKey.OpenThinoGlobally=a,this.applySettingsUpdate()})),new lt(r,this).setName(E("Show thino near mouse")).setTab(n).addToggle(i=>i.setValue(this.plugin.settings.CaptureKey.ShowNearMouse).onChange(async a=>{if(!o){Fn();return}this.plugin.settings.CaptureKey.ShowNearMouse=a,this.applySettingsUpdate()})))}checkInList(n){return this.plugin.settings.EnabledLocationList.find(r=>r.value===n)!==void 0}customFileNameSettings(n,r,o){var d;const i=document.createDocumentFragment(),a=i.createEl("div",{cls:"memo-save-location-desc"});for(const f of qte){const m=a.createEl("div",{cls:`memo-save-location-desc-item ${f.value}`}),g=m.createEl("span",{cls:"memo-save-location-desc-item-icon"});C.setIcon(g,((d=km.find(I=>I.title===f.value))==null?void 0:d.icon)||""),m.createEl("span",{cls:"memo-save-location-desc-item-desc",text:`${E(f.value)}`});const v=m.createEl("span",{cls:"memo-save-location-desc-item-toggle"}),w=m.createEl("span",{cls:"memo-save-location-desc-item-setting"});f.value!=="DAILY"&&m.createEl("span",{cls:["memo-save-location-desc-item-pro","user-pro-badge"],text:"PRO"}),new C.ToggleComponent(v).setValue(this.checkInList(f.value)).onChange(async I=>{if(!o){Fn();return}I?(await je.updateTypeMemos(f.value),this.plugin.settings.EnabledLocationList=[...this.plugin.settings.EnabledLocationList,f]):(await je.removeTypeMemos(f.value),this.plugin.settings.EnabledLocationList=this.plugin.settings.EnabledLocationList.filter(k=>k.value!==f.value)),this.plugin.settings.EnabledLocationList.length===1&&(this.plugin.settings.MemoSaveLocation=f.value),this.applySettingsUpdate(),setTimeout(()=>{this.display()},500)}).setDisabled(this.plugin.settings.EnabledLocationList.length===1&&this.checkInList(f.value)),new C.ExtraButtonComponent(w).setIcon("settings").onClick(()=>{new Kte(this.app,this,this.plugin,f,o).open()})}const u=new lt(r,this).setName(E("Save type for Thino")).setDesc(i).setTab(n);u.settingEl.toggleClass("memo-save-location-setting",!0),u.nameEl.toggleClass("memo-save-location-title",!0)}addTaskRelatedSettings(n,r){new lt(r,this).setHeading().setName(E("Task Management")),new lt(r,this).setName(E("Show Tasks Label")).setDesc(E("Show tasks label near the time text. False by default")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.ShowTaskLabel).onChange(async i=>{this.plugin.settings.ShowTaskLabel=i,this.applySettingsUpdate()})),new lt(r,this).setName(E("Append completed date when task done in thino")).setDesc(E("Append completed date when task done in thino. False by default")).setTab(n).addToggle(o=>o.setValue(this.plugin.settings.AppendDateWhenTaskDone).onChange(async i=>{this.plugin.settings.AppendDateWhenTaskDone=i,this.applySettingsUpdate()}))}}class Kte extends C.Modal{constructor(n,r,o,i,a){super(n);De(this,"plugin");De(this,"settingTab");De(this,"LocationList");De(this,"target","");De(this,"insertTarget","");De(this,"verified");De(this,"updateValue",C.debounce(n=>{this.LocationList.value!=="DAILY"&&this.LocationList.value!=="MULTI"?this.target=n.trim()===""?"basic":n.trim():this.target=n.trim()===""&&this.LocationList.value==="MULTI"?"Memos":n.trim()},400,!0));De(this,"debounceDisplay",C.debounce(()=>this.display(),400,!0));this.verified=a,this.app=n,this.settingTab=r,this.plugin=o,this.LocationList=i,this.target=i.target!=="ProcessEntriesBelow"?o.settings.MemoOtherSaveLocation[i.target]:o.settings[i.target],this.insertTarget=o.settings.InsertAfter}onOpen(){this.display()}async display(){var d;const{contentEl:n}=this;this.contentEl.empty(),(d=n.parentElement)==null||d.classList.add("memo-save-location-modal"),this.titleEl.toggleClass("modal-title",!0),this.titleEl.setText(E("Save type for Thino")+` [${E(this.LocationList.value)}]`),(this.LocationList.value==="FILE"||this.LocationList.value==="CANVAS")&&n.createDiv("modal-desc",f=>{f.setText(E('You can set folder name with file name like "folder/file"'))}),this.LocationList.value==="MULTI"&&n.createDiv("modal-desc",f=>{f.setText(E('You can set folder name like "folder1/folder2/folder3" to create sub-folder'))}),this.LocationList.value==="DAILY"&&n.createDiv("modal-desc",f=>{f.setText(E('You can set target heading like "# Heading" to control data location'))});const r=n.createDiv("modal-setting"),o=this.LocationList.value==="DAILY"?E("Process Memos below"):this.LocationList.value==="MULTI"?E("Set the folder name"):E("Set the filename");if(this.LocationList.value==="DAILY"&&(new lt(r,this.settingTab).setName(E("Set thino insert place")).setDesc(E("Set where to insert thino content")).addDropdown(async f=>{f.addOption("end",E("End of the diary")),f.addOption("custom",E("Custom location")),f.setValue(this.plugin.settings.InsertType).onChange(async m=>{this.plugin.settings.InsertType=m,this.settingTab.applySettingsUpdate(),this.debounceDisplay()})}),this.plugin.settings.InsertType==="custom"&&await this.addDailySettings(r),new lt(r,this.settingTab).setName(E("Set process target")).setDesc(E("You can set whole diary or only part of it")).addDropdown(async f=>{f.addOption("custom",E("Custom")),f.addOption("whole",E("Whole diary")),f.setValue(this.plugin.settings.ProcessContentTarget).onChange(async m=>{this.plugin.settings.ProcessContentTarget=m,this.settingTab.applySettingsUpdate(),this.debounceDisplay()})})),this.LocationList.value!=="DAILY"||this.plugin.settings.ProcessContentTarget!=="whole"){const f=new lt(r,this.settingTab).setName(o).addText(m=>m.setPlaceholder(this.LocationList.value==="DAILY"?E("# Heading"):E("Set the filename for current location file")).setValue(this.LocationList.value!=="DAILY"&&this.LocationList.value!=="MULTI"?this.target.replace(/\.thino\.(canvas|md)/g,""):this.target).onChange(async g=>{const v=this.LocationList.value==="CANVAS"?".thino.canvas":this.LocationList.value==="FILE"?".thino.md":"";this.updateValue(g.replace(/\.thino\.(canvas|md)/g,"")+v)}));this.LocationList.value==="DAILY"&&f.setDesc(E("If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.")),this.LocationList.value!=="DAILY"&&this.LocationList.value!=="MULTI"&&f.controlEl.createEl("span",{text:`${this.LocationList.value==="FILE"?".thino.md":".thino.canvas"}`})}this.LocationList.value==="MULTI"&&new lt(r,this.settingTab).setName(E("Set file name after create thino")).setDesc(E("You can set file name after create thino. A input box will show when you create thino.")).addToggle(f=>{f.setValue(this.plugin.settings.SetFileNameAfterCreate).onChange(async m=>{this.plugin.settings.SetFileNameAfterCreate=m,this.settingTab.debounceApplySettingsUpdate()})}),this.LocationList.value==="FILE"&&new lt(r,this.settingTab).setName(E("Set tag for file type file")).setDesc(E("When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.")).addText(f=>{new Pm(f.inputEl,m=>{this.plugin.settings.TagForFileTypeFiles=m.trim(),this.settingTab.debounceApplySettingsUpdate()}),f.setPlaceholder(E("Please input the tag")).setValue(this.plugin.settings.TagForFileTypeFiles).onChange(async m=>{this.plugin.settings.TagForFileTypeFiles=m.trim(),this.settingTab.debounceApplySettingsUpdate()})}),this.LocationList.value==="MULTI"&&new lt(r,this.settingTab).setName(E("Set tag for multi type file")).setDesc(E("When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.")).addText(f=>{new Pm(f.inputEl,m=>{this.plugin.settings.TagForMultiTypeFiles=m.trim(),this.settingTab.debounceApplySettingsUpdate()}),f.setPlaceholder(E("Please input the tag")).setValue(this.plugin.settings.TagForMultiTypeFiles).onChange(async m=>{this.plugin.settings.TagForMultiTypeFiles=m.trim(),this.settingTab.debounceApplySettingsUpdate()})});const i=n.createDiv("button-group"),a=i.createEl("button",{text:E("Cancel")}),u=i.createEl("button",{text:E("Save")});u.onclick=async()=>{if(!this.verified&&this.LocationList.value!=="DAILY"){this.close(),Fn();return}this.LocationList.target!=="ProcessEntriesBelow"?this.plugin.settings.MemoOtherSaveLocation[this.LocationList.target]=this.target:this.plugin.settings[this.LocationList.target]=this.target,this.LocationList.value==="MULTI"&&ut.checkDailyInMulti(this.plugin.settings),this.LocationList.target==="ProcessEntriesBelow"&&(this.plugin.settings.InsertAfter=this.insertTarget),this.settingTab.applySettingsUpdate(),setTimeout(()=>{je.updateTypeMemos(this.LocationList.value)},1e3),this.close()},a.onclick=async()=>{this.close()}}async addDailySettings(n){var d,f,m,g;const r=yt.getState().verifyState,o=!C.Platform.isDesktop&&await((d=window.Capacitor)==null?void 0:d.Plugins.Device.getId()),i=C.Platform.isDesktop?await Jn():o.identifier||o.uuid,a=r&&(r==null?void 0:r.appId)===i,u=((f=this.plugin.settings)!=null&&f.DifferentInsertTarget?`[${E("List")}] `:"")+E("Insert after heading");new lt(n,this.settingTab).setName(u).setDesc(E("If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.")).addText(v=>v.setPlaceholder(E("# Heading")).setValue(this.insertTarget).onChange(async w=>{this.insertTarget=w})),(m=this.plugin.settings)!=null&&m.DifferentInsertTarget&&new lt(n,this.settingTab).setName(((g=this.plugin.settings)!=null&&g.DifferentInsertTarget?`[${E("Task")}] `:"")+E("Insert after heading")).setDesc(E("Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.")).addText(v=>{v.setPlaceholder(E("# Heading")).setValue(this.plugin.settings.InsertAfterForTask).onChange(async w=>{this.plugin.settings.InsertAfterForTask=w,this.settingTab.applySettingsUpdate()})}),new lt(n,this.settingTab).setName(E("Different insert target for different type")).setDesc(E("Toggle this to set different insert target for different type of thino, like task or list type of thino")).addToggle(v=>v.setValue(this.plugin.settings.DifferentInsertTarget).onChange(async w=>{if(!a){Fn();return}this.plugin.settings.DifferentInsertTarget=w,this.settingTab.applySettingsUpdate(),this.debounceDisplay()}))}onClose(){const{contentEl:n}=this;n.empty()}}class UI extends C.Modal{constructor(n,r,o,i){super(n);De(this,"plugin");De(this,"settingTab");this.cb=i,this.app=n,this.settingTab=r,this.plugin=o}onOpen(){var d;const{contentEl:n}=this;(d=n.parentElement)==null||d.classList.add("memo-save-location-modal"),this.titleEl.toggleClass("modal-title",!0),this.titleEl.setText(E("Password for Thino")),n.createDiv("modal-desc",f=>{f.setText(E("Please input your password to change password settings"))});const r=n.createDiv("modal-setting"),o=new lt(r,this.settingTab).setName(E("Password")).addText(f=>{f.setPlaceholder(E("Please input your password")).inputEl.type="password"}),i=n.createDiv("button-group"),a=i.createEl("button",{text:E("Cancel")}),u=i.createEl("button",{cls:"thino-password-confirm-btn",text:E("Confirm?").replace(/(\?|?)/g,"")});u.onclick=async()=>{var f;o.controlEl.querySelector("input").value===this.plugin.settings.password?((f=this.cb)==null||f.call(this,!0),this.close()):new C.Notice(E("Password is incorrect"))},a.onclick=async()=>{this.close()}}onClose(){const{contentEl:n}=this;n.empty()}}function V0(e){return e.split("-")[0]}function ik(e){return e.split("-")[1]}function qS(e){return["top","bottom"].includes(V0(e))?"x":"y"}function ak(e){return e==="y"?"height":"width"}function zI(e){let{reference:t,floating:n,placement:r}=e;const o=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;let a;switch(V0(r)){case"top":a={x:o,y:t.y-n.height};break;case"bottom":a={x:o,y:t.y+t.height};break;case"right":a={x:t.x+t.width,y:i};break;case"left":a={x:t.x-n.width,y:i};break;default:a={x:t.x,y:t.y}}const u=qS(r),d=ak(u);switch(ik(r)){case"start":a[u]=a[u]-(t[d]/2-n[d]/2);break;case"end":a[u]=a[u]+(t[d]/2-n[d]/2);break}return a}const Qte=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n;let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=zI({...u,placement:r}),m=r,g={};for(let v=0;v<i.length;v++){const{name:w,fn:D}=i[v],{x:T,y:I,data:k,reset:A}=await D({x:d,y:f,initialPlacement:r,placement:m,strategy:o,middlewareData:g,rects:u,platform:a,elements:{reference:e,floating:t}});if(d=T??d,f=I??f,g={...g,[w]:k??{}},A){typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(u=A.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):A.rects),{x:d,y:f}=zI({...u,placement:m})),v=-1;continue}}return{x:d,y:f,placement:m,strategy:o,middlewareData:g}};function Xte(e){return{top:0,right:0,bottom:0,left:0,...e}}function ene(e){return typeof e!="number"?Xte(e):{top:e,right:e,bottom:e,left:e}}function I1(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function x1(e,t){t===void 0&&(t={});const{x:n,y:r,platform:o,rects:i,elements:a,strategy:u}=e,{boundary:d="clippingParents",rootBoundary:f="viewport",elementContext:m="floating",altBoundary:g=!1,padding:v=0}=t,w=ene(v),T=a[g?m==="floating"?"reference":"floating":m],I=await o.getClippingClientRect({element:await o.isElement(T)?T:T.contextElement||await o.getDocumentElement({element:a.floating}),boundary:d,rootBoundary:f}),k=I1(await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:m==="floating"?{...i.floating,x:n,y:r}:i.reference,offsetParent:await o.getOffsetParent({element:a.floating}),strategy:u}));return{top:I.top-k.top+w.top,bottom:k.bottom-I.bottom+w.bottom,left:I.left-k.left+w.left,right:k.right-I.right+w.right}}const tne={left:"right",right:"left",bottom:"top",top:"bottom"};function Kv(e){return e.replace(/left|right|bottom|top/g,t=>tne[t])}function nne(e,t){const n=ik(e)==="start",r=qS(e),o=ak(r);let i=r==="x"?n?"right":"left":n?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Kv(i)),{main:i,cross:Kv(i)}}const rne={start:"end",end:"start"};function VI(e){return e.replace(/start|end/g,t=>rne[t])}function one(e){const t=Kv(e);return[VI(e),t,VI(t)]}const ine=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:u}=t;if((n=i.flip)!=null&&n.skip)return{};const{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",flipAlignment:v=!0,...w}=e,D=V0(o),I=m||(D===u||!v?[Kv(u)]:one(u)),k=[u,...I],A=await x1(t,w),R=[];let j=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&R.push(A[D]),f){const{main:U,cross:z}=nne(o,a);R.push(A[U],A[z])}if(j=[...j,{placement:o,overflows:R}],!R.every(U=>U<=0)){var B,L;const U=((B=(L=i.flip)==null?void 0:L.index)!=null?B:0)+1,z=k[U];if(z)return{data:{index:U,overflows:j},reset:{placement:z}};let $="bottom";switch(g){case"bestFit":{var Z;const te=(Z=j.slice().sort((Q,ue)=>Q.overflows.filter(ee=>ee>0).reduce((ee,le)=>ee+le,0)-ue.overflows.filter(ee=>ee>0).reduce((ee,le)=>ee+le,0))[0])==null?void 0:Z.placement;te&&($=te);break}case"initialPlacement":$=u;break}return{data:{skip:!0},reset:{placement:$}}}return{}}}};function ane(e){let{placement:t,rects:n,value:r}=e;const o=V0(t),i=["left","top"].includes(o)?-1:1,a=typeof r=="function"?r({...n,placement:t}):r,{mainAxis:u,crossAxis:d}=typeof a=="number"?{mainAxis:a,crossAxis:0}:{mainAxis:0,crossAxis:0,...a};return qS(o)==="x"?{x:d,y:u*i}:{x:u*i,y:d}}const sne=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(t){const{x:n,y:r,placement:o,rects:i}=t,a=ane({placement:o,rects:i,value:e});return{x:n+a.x,y:r+a.y,data:a}}}};function GS(e){return(e==null?void 0:e.toString())==="[object Window]"}function vc(e){if(e==null)return window;if(!GS(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function W0(e){return vc(e).getComputedStyle(e)}function iu(e){return GS(e)?"":e?(e.nodeName||"").toLowerCase():""}function au(e){return e instanceof vc(e).HTMLElement}function Qv(e){return e instanceof vc(e).Element}function lne(e){return e instanceof vc(e).Node}function sk(e){const t=vc(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Z0(e){const{overflow:t,overflowX:n,overflowY:r}=W0(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function une(e){return["table","td","th"].includes(iu(e))}function lk(e){const t=navigator.userAgent.toLowerCase().includes("firefox"),n=W0(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}const WI=Math.min,Em=Math.max,Xv=Math.round;function xh(e,t){t===void 0&&(t=!1);const n=e.getBoundingClientRect();let r=1,o=1;return t&&au(e)&&(r=e.offsetWidth>0&&Xv(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Xv(n.height)/e.offsetHeight||1),{width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function wc(e){return((lne(e)?e.ownerDocument:e.document)||window.document).documentElement}function $0(e){return GS(e)?{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}:{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function uk(e){return xh(wc(e)).left+$0(e).scrollLeft}function cne(e){const t=xh(e);return Xv(t.width)!==e.offsetWidth||Xv(t.height)!==e.offsetHeight}function dne(e,t,n){const r=au(t),o=wc(t),i=xh(e,r&&cne(t));let a={scrollLeft:0,scrollTop:0};const u={x:0,y:0};if(r||!r&&n!=="fixed")if((iu(t)!=="body"||Z0(o))&&(a=$0(t)),au(t)){const d=xh(t,!0);u.x=d.x+t.clientLeft,u.y=d.y+t.clientTop}else o&&(u.x=uk(o));return{x:i.left+a.scrollLeft-u.x,y:i.top+a.scrollTop-u.y,width:i.width,height:i.height}}function q0(e){return iu(e)==="html"?e:e.assignedSlot||e.parentNode||(sk(e)?e.host:null)||wc(e)}function ZI(e){return!au(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function fne(e){let t=q0(e);for(;au(t)&&!["html","body"].includes(iu(t));){if(lk(t))return t;t=t.parentNode}return null}function E1(e){const t=vc(e);let n=ZI(e);for(;n&&une(n)&&getComputedStyle(n).position==="static";)n=ZI(n);return n&&(iu(n)==="html"||iu(n)==="body"&&getComputedStyle(n).position==="static"&&!lk(n))?t:n||fne(e)||t}function $I(e){return{width:e.offsetWidth,height:e.offsetHeight}}function hne(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=au(n),i=wc(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0};const u={x:0,y:0};if((o||!o&&r!=="fixed")&&((iu(n)!=="body"||Z0(i))&&(a=$0(n)),au(n))){const d=xh(n,!0);u.x=d.x+n.clientLeft,u.y=d.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+u.x,y:t.y-a.scrollTop+u.y}}function pne(e){const t=vc(e),n=wc(e),r=t.visualViewport;let o=n.clientWidth,i=n.clientHeight,a=0,u=0;return r&&(o=r.width,i=r.height,Math.abs(t.innerWidth/r.scale-r.width)<.01&&(a=r.offsetLeft,u=r.offsetTop)),{width:o,height:i,x:a,y:u}}function mne(e){var t;const n=wc(e),r=$0(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Em(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Em(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let u=-r.scrollLeft+uk(e);const d=-r.scrollTop;return W0(o||n).direction==="rtl"&&(u+=Em(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:u,y:d}}function ck(e){return["html","body","#document"].includes(iu(e))?e.ownerDocument.body:au(e)&&Z0(e)?e:ck(q0(e))}function dk(e,t){var n;t===void 0&&(t=[]);const r=ck(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=vc(r),a=o?[i].concat(i.visualViewport||[],Z0(r)?r:[]):r,u=t.concat(a);return o?u:u.concat(dk(q0(a)))}function gne(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&sk(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function yne(e){const t=xh(e),n=t.top+e.clientTop,r=t.left+e.clientLeft;return{top:n,left:r,x:r,y:n,right:r+e.clientWidth,bottom:n+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function qI(e,t){return t==="viewport"?I1(pne(e)):Qv(t)?yne(t):I1(mne(wc(e)))}function vne(e){const t=dk(q0(e)),r=["absolute","fixed"].includes(W0(e).position)&&au(e)?E1(e):e;return Qv(r)?t.filter(o=>Qv(o)&&gne(o,r)&&iu(o)!=="body"):[]}function wne(e){let{element:t,boundary:n,rootBoundary:r}=e;const i=[...n==="clippingParents"?vne(t):[].concat(n),r],a=i[0],u=i.reduce((d,f)=>{const m=qI(t,f);return d.top=Em(m.top,d.top),d.right=WI(m.right,d.right),d.bottom=WI(m.bottom,d.bottom),d.left=Em(m.left,d.left),d},qI(t,a));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}const bne={getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:dne(t,E1(n),r),floating:{...$I(n),x:0,y:0}}},convertOffsetParentRelativeRectToViewportRelativeRect:e=>hne(e),getOffsetParent:e=>{let{element:t}=e;return E1(t)},isElement:e=>Qv(e),getDocumentElement:e=>{let{element:t}=e;return wc(t)},getClippingClientRect:e=>wne(e),getDimensions:e=>{let{element:t}=e;return $I(t)},getClientRects:e=>{let{element:t}=e;return t.getClientRects()}},Sne=(e,t,n)=>Qte(e,t,{platform:bne,...n});var Dne=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n};const Tne=$r(Dne),Ib=Cm.Facet.define({combine:e=>{var t,n;return{defaultPlacement:((t=e.find(r=>r.defaultPlacement))==null?void 0:t.defaultPlacement)||"top",padding:((n=e.find(r=>r.padding))==null?void 0:n.padding)||8}}}),fk=e=>e.split("-")[0],Ine=e=>e==="x"?"y":"x",xne=e=>["top","bottom"].includes(fk(e))?"x":"y",fm=(e,t,n)=>Math.max(e,Math.min(t,n)),Ene=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r],o)=>[n,t(r,n,o)])),Cne=e=>e===void 0?e:typeof e=="number"?-e:Ene(e,t=>t!==void 0?-t:t),Mne=(e={})=>({name:"shift",fn:async t=>{const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:u=({x:I,y:k})=>({x:I,y:k}),editorMenu:d,...f}=e,m={x:n,y:r},g=await x1(t,f),v=xne(fk(o)),w=Ine(v);let D=m[v],T=m[w];if(i){const I=v==="y"?"top":"left",k=v==="y"?"bottom":"right",A=D+g[I],R=D-g[k];if(d){const j=await x1(t,{...f,boundary:d.dom,padding:Cne(f.padding)});if((w==="y"?["top","bottom"]:["left","right"]).every(L=>j[L]<=0)){const L=t.rects.floating.width,Z=D+j[I]-L,U=D-j[k]+L,z=Math.abs(g[I]-j[I]),$=Math.abs(g[k]-j[k]);z>=L||$<z?D=fm(A,D,Z):D=fm(U,D,R)}else D=fm(A,D,R)}else D=fm(A,D,R)}if(a){const I=w==="y"?"top":"left",k=w==="y"?"bottom":"right",A=T+g[I],R=T-g[k];T=fm(A,T,R)}return u({...t,[v]:D,[w]:T})}}),kne="thino-mini-toolbar",Nne=(e=0,t=0)=>({width:0,height:0,top:t,left:e,bottom:t,right:e,x:e,y:t}),Ane=(e,t)=>{if(!e)return null;const n=Math.min(e.left,(t==null?void 0:t.left)??e.left),r=Math.max(e.right,(t==null?void 0:t.right)??e.right),o=Math.max(e.bottom,(t==null?void 0:t.bottom)??e.bottom)-Math.min(e.top,(t==null?void 0:t.top)??e.top),i=Math.min(e.top,(t==null?void 0:t.top)??e.top),a=i+o,u={left:n,right:r,top:i,bottom:a,width:0,height:o,x:i,y:n};return t&&(u.width=Math.abs(r-n)),u},Fne=Nne();class Pne{constructor(t){De(this,"containerEl");De(this,"virtualEl");De(this,"toolbar",null);De(this,"isThinoView");De(this,"tooltipInfo");De(this,"inView",!0);De(this,"defaultPlacement");De(this,"editorMenu");De(this,"cachedRefRect",null);De(this,"readFromDOM",()=>{if(this.tooltipInfo){const{start:t}=this.tooltipInfo;let{end:n}=this.tooltipInfo;n&&t===n&&(n=void 0);const r=this.view.coordsAtPos(t);let o=n?this.view.coordsAtPos(n):null;if(r&&o&&r.top!==o.top){const a=this.view.contentDOM.getBoundingClientRect();o={left:a.right,right:a.right,top:r.top,bottom:r.bottom}}const i=Ane(r,o);i&&(this.cachedRefRect=i,this.computePosition(i))}});this.view=t,this.containerEl=this.view.dom.parentElement,this.defaultPlacement=this.view.state.facet(Ib).defaultPlacement,this.tooltipInfo=t.state.facet(C1),this.virtualEl={rect:Fne,getBoundingClientRect(){return this.rect}},this.maybeMeasure(),this.editorMenu={currMenu:null,evtRef:t.state.field(C.editorInfoField)},this.isThinoView=this.checkThinoView()}get workspace(){return this.view.state.field(C.editorInfoField).app.workspace}checkThinoView(){return this.view.state.field(C.editorInfoField)&&this.view.state.field(C.editorInfoField)instanceof ac}shouldRemoveToolbar(t){const n=t??this.tooltipInfo;return!(n!=null&&n.end||this.editorMenu.currMenu)}onEditorMenuOpen(t){this.editorMenu.currMenu||(this.editorMenu.currMenu=t,this.cachedRefRect?this.computePosition(this.cachedRefRect):this.maybeMeasure(),!C.Platform.isMacOS&&this.tooltipInfo&&(this.createToolbar(),this.maybeMeasure()))}onEditorMenuClose(t){this.editorMenu.currMenu===t&&(this.editorMenu.currMenu=null),!C.Platform.isMacOS&&this.toolbar&&this.shouldRemoveToolbar()&&this.removeToolbar()}createToolbar(t){const n=t??this.tooltipInfo;if(!n)return;this.removeToolbar();const r=n.create(this.containerEl),o=this.view.state.field(C.editorInfoField);if(!o||!(o!=null&&o.editor))return;const i=o.editor.offsetToPos(n.start),a=n.end?o.editor.offsetToPos(n.end):i;this.workspace.trigger(kne,r,{from:i,to:a},o.editor,o),this.toolbar=r}removeToolbar(){this.toolbar&&(this.toolbar.hide(),this.toolbar=null)}update(t){if(!this.isThinoView)return;const n=t.state.facet(C1),r=n!==this.tooltipInfo&&!Tne(n,this.tooltipInfo);r&&(this.tooltipInfo=n,this.shouldRemoveToolbar()?this.removeToolbar():n&&!this.toolbar&&this.createToolbar(n));const o=r||t.geometryChanged,i=t.state.facet(Ib);i.defaultPlacement!=this.defaultPlacement&&(i.defaultPlacement=this.defaultPlacement),o&&this.maybeMeasure()}destroy(){this.editorMenu.currMenu=null,this.removeToolbar(),this.toolbar=null,this.view.state.field(C.editorInfoField).app.workspace.offref(this.editorMenu.evtRef)}async computePosition(t){if(!this.toolbar)return;this.virtualEl.rect=t;const{padding:n}=this.view.state.facet(Ib),{x:r,y:o}=await Sne(this.virtualEl,this.toolbar.dom,{placement:this.defaultPlacement,middleware:[sne({mainAxis:5}),ine({padding:n,boundary:this.view.scrollDOM}),Mne({padding:n,boundary:this.view.scrollDOM,editorMenu:this.editorMenu.currMenu})]});Object.assign(this.toolbar.dom.style,{top:"0",left:"0",transform:`translate(${Math.round(r)}px,${Math.round(o)}px)`})}maybeMeasure(){this.view.inView&&this.toolbar&&this.view.requestMeasure({read:this.readFromDOM}),this.inView!=this.view.inView&&(this.inView=this.view.inView,this.inView||this.removeToolbar())}}const One=ul.ViewPlugin.fromClass(Pne,{eventHandlers:{scroll(){this.maybeMeasure()}}}),C1=Cm.Facet.define({enables:[One],combine:e=>e.filter(t=>t!=null).first()??null}),jne=e=>{const t=Hne(e);t&&window.navigator.clipboard.writeText(t==null?void 0:t.getSelection())},Lne=e=>{e.commands.executeCommandById("editor:toggle-bold",e)},Rne=e=>{e.commands.executeCommandById("editor:toggle-strikethrough",e)},_ne=e=>{e.commands.executeCommandById("editor:toggle-highlight",e)},Bne=e=>{e.commands.executeCommandById("editor:toggle-italics",e)},Hne=e=>{const{editor:t}=e.field(C.editorInfoField);return t},GI=(e,t)=>{const n=e.selection.ranges[0];if(!n)return null;const{anchor:r,head:o,empty:i}=n,[a,u]=[r,o].sort();return{start:a,end:i?void 0:u,create:f=>new Vne(f).addSmallButton(g=>g.setClass("clickable-icon").setIcon("copy").onClick(()=>jne(e))).addSmallButton(g=>g.setClass("clickable-icon").setIcon("bold").onClick(()=>Lne(t))).addSmallButton(g=>g.setClass("clickable-icon").setIcon("italic").onClick(()=>Bne(t))).addSmallButton(g=>g.setClass("clickable-icon").setIcon("strikethrough").onClick(()=>Rne(t))).addSmallButton(g=>g.setClass("clickable-icon").setIcon("highlighter").onClick(()=>_ne(t)))}},Yne=e=>Cm.StateField.define({create:t=>GI(t,e),update:(t,n)=>!n.docChanged&&!n.selection?t:GI(n.state,e),provide:t=>C1.from(t)}),Une=e=>[Yne(e)];class zne extends C.BaseComponent{constructor(n){super();De(this,"button");De(this,"disabled",!1);De(this,"dropdownOptions",[]);De(this,"menu");De(this,"menuOpened",!1);this.button=new C.ButtonComponent(n)}setDisabled(n){return this.button.setDisabled(n),this.disabled=n,this}setIcon(n){return this.button.setIcon(n),this}setClass(n){return this.button.setClass(n),this}setDropdownText(n){var d;const r=this.button.buttonEl.createDiv("mini-toolbar-text"),o=this.button.buttonEl.createDiv("mini-toolbar-icon-with-text");C.setIcon(o,"chevron-down");const i=(d=n.doc.lineAt(n.selection.ranges[0].from))==null?void 0:d.from,a=Lw.syntaxTree(n).resolveInner(i+1),u=a.type.prop(Lw.tokenClassNodeProp);return r.setText(this.detectFormat(u,a)||"Text"),this}setDropdownIcon(){const n=this.button.buttonEl.createDiv("mini-toolbar-highlight-icon"),r=this.button.buttonEl.createDiv("mini-toolbar-icon-with-icon");return C.setIcon(n,"highlighter"),C.setIcon(r,"chevron-down"),this}detectFormat(n,r){var o;if(!n)return"Text";if(n.includes("strong"))return"Bold";if(n.includes("em"))return"Italic";if(n.includes("strikethrough"))return"Strike";if(n.contains("hmd-codeblock"))return"CodeBlock";if(n.contains("hmd-inline-code"))return"Code";if(n.contains("formatting-header")){const i=n.match(/header-\d{1,}/);if(i)return"Heading "+i[0].slice(-1)}if(n.contains("formatting-list")||n.contains("hmd-list-indent")){if(r!=null&&r.parent){const i=(o=r.parent)==null?void 0:o.type.prop(Lw.lineClassNodeProp);if(i!=null&&i.contains("HyperMD-task-line"))return"To-do list"}if(n.contains("formatting-list-ol"))return"Numbered list";if(n.contains("formatting-list-ul"))return"Bulleted list"}}setTooltip(n){return this.button.setTooltip(n),this}setOptionsList(n){return this.dropdownOptions=n,this}onClick(n){return this.dropdownOptions.length>0?(this.button.onClick(r=>this.showEditMenu(r)),this):(this.button.onClick(n),this)}showEditMenu(n){var a,u;if(this.menuOpened=!this.menuOpened,!this.menuOpened)return;this.menu=new C.Menu,this.menu.onHide(()=>{this.menuOpened=!1});const r=n.currentTarget,o=(a=n.currentTarget)==null?void 0:a.getBoundingClientRect(),i={x:o.left-6,y:o.bottom+6};for(let d=0;d<((u=this.dropdownOptions)==null?void 0:u.length);d++)this.menu.addItem(f=>{f.setIcon("zap").setTitle(this.dropdownOptions[d]).onClick(()=>{})});this.menu.setParentElement(r).showAtPosition(i)}then(n){return n(this),this}}class Vne extends C.Component{constructor(n){super();De(this,"dom");De(this,"smallBtnContainer");De(this,"unloading",!1);this.dom=n==null?void 0:n.createDiv({cls:"cm-mini-toolbar"},r=>r.style.position="absolute"),this.smallBtnContainer=this.dom}addSmallButton(n){return n(new zne(this.smallBtnContainer)),this}hide(){return this.unload(),this.unloading?this:(this.unloading=!0,this.dom.detach(),this.unloading=!1,this)}}const Wne=ul.Decoration.line({attributes:{"data-ph":E("What do you think now...")},class:"thino-editor-placeholder"}),Zne=Cm.StateField.define({create(){return ul.Decoration.none},update(e,t){const n=t.state.field(C.editorInfoField);if(!(n!=null&&n.view)&&!((n==null?void 0:n.view)instanceof ac))return e;const r=new Cm.RangeSetBuilder,o=t.state.doc.toString(),i=t.state.doc.lineAt(0);return(o==null?void 0:o.length)==0&&r.add(i.from,i.from,Wne),r.finish()},provide:e=>ul.EditorView.decorations.from(e)});function hk(e){return`userId:${e}`}function $ne(e,t){return`expiryDate:${t}:${e}`}function qne(e){try{const t=hk(e==null?void 0:e.appId);return Wr.get([t])[t]||""}catch(t){return console.error(t),""}}function Gne(e,t){try{const n=hk(t==null?void 0:t.appId);return Wr.set({[n]:e}),{userId:e,key:n}}catch(n){console.error(n)}}function Jne(e,t){try{const n=$ne(qne(t),t==null?void 0:t.appId);Wr.set({[n]:e})}catch(n){console.error(n)}}const Kne=ut.grabImageFromUrl,Qne=require("http"),Xne=require("url");function ere(e){const t=e.indexOf(";base64,"),n=e.substring(5,t),r=e.substr(t+8),o=atob(r),i=new ArrayBuffer(o.length),a=new Uint8Array(i);for(let d=0;d<o.length;d++)a[d]=o.charCodeAt(d);return new Blob([i],{type:n})}const JI=async e=>{const{type:t}=e;if(t.startsWith("image"))try{return`${await W1.upload(e)}`}catch(n){new C.Notice(n)}};function tre(e){const t=Qne.createServer(async function(n,r){r.setHeader("Access-Control-Allow-Origin","*"),r.setHeader("Access-Control-Allow-Methods","GET, HEAD, POST, OPTIONS, PUT, PATCH, DELETE"),r.setHeader("Access-Control-Allow-Headers","Access-Control-Allow-Headers, Origin, Authorization,Accept,x-client-id, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers, hypothesis-client-version"),r.setHeader("Access-Control-Allow-Credentials","true");try{if(n.url){const o=Xne.parse(n.url,!0);if(o.pathname==="/create"&&n.method==="POST"){let i="";n.on("data",a=>{i+=a}),n.on("end",async()=>{const a=JSON.parse(i),{text:u,isList:d,type:f,imageList:m}=a;let g=u;if(!g){r.statusCode=200,r.setHeader("Content-Type","application/json"),r.end(JSON.stringify({status:"success",thino:null,link:null}));return}new RegExp(/(<([^>]+)>)/g).test(u)&&(g=C.htmlToMarkdown(u));let w=[];const D=[];if(e.AutoDownloadImage){const I=g.match(jd)||[];if(I.length>0){for(const k of I)try{const A=await Kne(k);if(A.size===0)continue;const R=new File([A],"image.png",{type:"image/png"}),j=await JI(R);D.push({oldUrl:k,newUrl:j})}catch(A){console.error(A)}D.forEach(k=>{g=g.replace(k.oldUrl,k.newUrl)}),m&&m.length>0&&(w=await Promise.all(m.map(async k=>{const A=ere(k);return new File([A],"image.png",{type:"image/png"})})));for(const k of w){const A=await JI(k);g+=`
|
|
|
${A}`}}}const T=await je.createThino({content:g,isList:d,type:f});T&&(je.pushMemo(T),st.clearQuery()),r.statusCode=200,r.setHeader("Content-Type","application/json"),r.end(JSON.stringify({status:"success",thino:T,link:`obsidian://thino?openId=${T.id}`}))})}else if(o.pathname==="/search"&&n.method==="GET"){const i=o.query,{keyword:a}=i,u=je.getThinoViaKeyword(a);r.statusCode=200,r.setHeader("Content-Type","application/json");const d=JSON.stringify({status:"success",thinos:u});r.end(d)}else r.statusCode=404,r.end()}}catch(o){console.error(o),r.statusCode=500,r.end({status:"error",message:o.message})}});return{listen(n,r){try{t.listen({port:parseInt(r),host:n})}catch(o){console.error(o),new C.Notice(E("Thino - Failed to start HTTP server, please check the port is available."))}new C.Notice(`${E("Thino - Started HTTP server on port")} ${r}`)},close(){t.close(),new C.Notice(E("Thino - Terminated HTTP server"))}}}const{clipboard:tr}=C.Platform.isDesktop?require("electron"):"";class nre{constructor(){De(this,"eventListeners");this.eventListeners={}}on(t,n){this.eventListeners[t]=this.eventListeners[t]||[],this.eventListeners[t].push(n)}once(t,n){n.$emitOnce=!0,this.on(t,n)}removeListener(t,n){if(this.eventListeners[t]){const r=this.eventListeners[t].findIndex(o=>o===n);r>=0&&this.eventListeners[t].splice(r,1)}}removeAllListeners(t){this.eventListeners[t]&&(this.eventListeners[t].length=0)}emit(t,...n){this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r.call(this,...n),r.$emitOnce&&this.removeListener(t,r)})}}const ih=new nre;let hm=null,KI=tr==null?void 0:tr.readText(),QI=tr==null?void 0:tr.readImage();tr&&(tr.on=(e,t)=>(ih.on(e,t),tr),tr.once=(e,t)=>(ih.once(e,t),tr),tr.off=(e,t)=>(t?ih.removeListener(e,t):ih.removeAllListeners(e),tr),tr.startWatching=()=>(hm||(hm=setInterval(()=>{rre(KI,KI=tr==null?void 0:tr.readText())&&ih.emit("text-changed"),ore(QI,QI=tr==null?void 0:tr.readImage())&&ih.emit("image-changed")},500)),tr),tr.stopWatching=()=>(hm&&clearInterval(hm),hm=null,tr));function rre(e,t){return t&&e!==t}function ore(e,t){return!t.isEmpty()&&e.toDataURL()!==t.toDataURL()}var ix;const xb=(ix=require("electron"))==null?void 0:ix.remote;var ax,sx;const XI=(sx=(ax=require("electron"))==null?void 0:ax.remote)==null?void 0:sx.screen;class ire{constructor(t,n){De(this,"isRegisted");De(this,"leaf");De(this,"clipboard");De(this,"isScreenTop",!1);De(this,"currentSplitWindow");De(this,"intervalNum");De(this,"allowsCopy",!1);De(this,"plugin");De(this,"actionEl",null);this.app=t,this.plugin=n,this.isRegisted=!1,this.leaf=null,this.clipboard=tr}async onload(){C.Platform.isDesktop&&(this.initGlobalCopyEvents(),await this.registerAllShortcuts(),this.registerEvents())}registerEvents(){this.plugin.registerEvent(this.app.workspace.on("quit",()=>{xb.globalShortcut.unregister(this.plugin.settings.CaptureKey.OpenThinoGlobally)}))}initGlobalCopyEvents(){this.plugin.addCommand({id:"init-global-copy-events",name:E("Global copy"),callback:()=>{this.allowsCopy=!this.allowsCopy,!this.allowsCopy&&this.clipboard.stopWatching(),this.allowsCopy&&this.clipboard.startWatching(),this.leaf&&this.allowsCopy&&(this.actionEl=this.leaf.view.addAction("clipboard-x","Stop global copying",()=>{var t;this.allowsCopy=!1,this.clipboard.stopWatching(),(t=this.actionEl)==null||t.remove()}))}})}onunload(){this.isRegisted&&(xb.globalShortcut.unregister(this.plugin.settings.CaptureKey.OpenThinoGlobally),this.clipboard.off("text-changed"),this.clipboard.off("image-changed"),this.clipboard.stopWatching(),this.leaf&&this.leaf.detach())}getCurrentLeaf(){var n;return this.leaf?this.app.workspace.getLeavesOfType("thino_view").length>0&&!!this.app.workspace.getLeafById(this.leaf.id)?!0:((n=this.leaf)==null||n.detach(),this.currentSplitWindow.close(),this.currentSplitWindow=null,this.leaf=null,this.isScreenTop=!1,!1):!1}async registerAllShortcuts(){xb.globalShortcut.register(this.plugin.settings.CaptureKey.OpenThinoGlobally,()=>{this.getCurrentLeaf()?this.showThinoView():this.openThinoView()}),this.isRegisted=!0}showThinoView(){var r,o,i,a;const t=XI.getCursorScreenPoint(),n=(a=(i=(o=(r=this.leaf)==null?void 0:r.parent)==null?void 0:o.parent)==null?void 0:i.win)==null?void 0:a.electronWindow;if(n){if(n.setAlwaysOnTop(!this.isScreenTop,"screen"),this.leaf.setPinned(!this.isScreenTop),this.leaf.view.containerEl.toggleClass("thino-float-window",!0),n.isMinimized()&&n.restore(),n.focus(),this.plugin.settings.CaptureKey.ShowNearMouse){const{width:u,height:d}=n.getBounds();n.setBounds({x:t.x,y:t.y,width:u,height:d})}if(this.app.workspace.trigger("focus-on-textarea"),this.isScreenTop){this.isScreenTop=!1,setTimeout(()=>{n.setAlwaysOnTop(!1,"screen")},200);return}this.isScreenTop=!0}}openThinoView(){var i,a,u,d,f;this.leaf=this.app.workspace.openPopoutLeaf({size:{width:400,height:400}});const t=this.leaf;this.leaf.view.containerEl.toggleClass("thino-float-window",!0),this.leaf.setViewState({type:"thino_view"}),setTimeout(()=>{t.view.containerEl.classList.toggle("mobile-view",!0)},0),this.currentSplitWindow=(a=(i=this.leaf)==null?void 0:i.parent)==null?void 0:a.parent;const n=(f=(d=(u=this.leaf)==null?void 0:u.parent)==null?void 0:d.parent)==null?void 0:f.win.electronWindow;if(!n)return;n.setAlwaysOnTop(!this.isScreenTop,"screen"),this.leaf.setPinned(!this.isScreenTop),this.isScreenTop=!0;const r=this.app,o=m=>{var w,D,T;const g=XI.getCursorScreenPoint(),v=(T=(D=(w=t==null?void 0:t.parent)==null?void 0:w.parent)==null?void 0:D.win)==null?void 0:T.electronWindow;if(v){if(v.isMinimized()&&v.restore(),!this.isScreenTop&&this.plugin.settings.CaptureKey.ShowNearMouse){const{width:I,height:k}=v.getBounds();v.setBounds({x:g.x,y:g.y-200,width:I,height:k})}v.setAlwaysOnTop(!0,"screen"),r.workspace.trigger("focus-on-textarea"),r.workspace.trigger("send-to-thino",m,t)}};this.clipboard.on("text-changed",()=>{const m=this.clipboard.readText();o(m)}).on("image-changed",()=>{const m=this.clipboard.readImage();o(m)})}}class ex extends C.EditorSuggest{constructor(n,r){super(n);De(this,"root");De(this,"editor");De(this,"cursor");De(this,"plugin");De(this,"tags");De(this,"type","customTag");De(this,"HASHTAG_REGEX",/(^|\s)#[^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]*$/g);this.plugin=r}checkSettings(){return this.plugin.settings.UseVaultTags}checkInMemosView(n){var i;const r=n.containerEl;if(!r)return!1;const o=(i=r.parentElement)==null?void 0:i.parentElement;return(o==null?void 0:o.classList.contains("common-editor-inputer"))||!1}fuzzySearchItemsOptimized(n,r){const o=C.prepareFuzzySearch(n);return r.map(a=>{const u=o(a);return u?{item:a,match:u}:null}).filter(Boolean)}onTrigger(n,r){if(!this.checkInMemosView(r)||this.checkSettings())return null;this.tags=je.getState().tags,this.cursor=n,this.editor=r;const o=n.line,i=r.getLine(o),a=i.substr(0,n.ch);if(a.match(this.HASHTAG_REGEX)&&i.substr(n.ch,1)!=="#"){const u=a.lastIndexOf("#"),d=a.substr(u+1);return{start:{line:o,ch:u},end:{line:o,ch:n.ch},query:d}}return null}getSuggestions(n){return this.fuzzySearchItemsOptimized(n.query,this.tags).map(r=>r.item).sort((r,o)=>r.localeCompare(o))||[]}renderSuggestion(n,r){r.setText(n)}selectSuggestion(n){if(this.context){const r=this.context.editor,o=this.context.start,i=this.context.end;r.transaction({changes:[{from:o,to:i,text:"#"+n+" "}]}),setTimeout(function(){return r.focus()})}this.close()}}const JS=crypto,pk=e=>e instanceof CryptoKey,Xy=new TextEncoder,KS=new TextDecoder;function are(...e){const t=e.reduce((o,{length:i})=>o+i,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}const sre=e=>{const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n},Eb=e=>{let t=e;t instanceof Uint8Array&&(t=KS.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return sre(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};class G0 extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(t){var n;super(t),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,(n=Error.captureStackTrace)==null||n.call(Error,this,this.constructor)}}class lre extends G0{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED"}static get code(){return"ERR_JOSE_ALG_NOT_ALLOWED"}}class J0 extends G0{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}}class To extends G0{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}}class ure extends G0{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}}function Jl(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function ev(e,t){return e.name===t}function Cb(e){return parseInt(e.name.slice(4),10)}function cre(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function dre(e,t){if(t.length&&!t.some(n=>e.usages.includes(n))){let n="CryptoKey does not support this operation, its usages must include ";if(t.length>2){const r=t.pop();n+=`one of ${t.join(", ")}, or ${r}.`}else t.length===2?n+=`one of ${t[0]} or ${t[1]}.`:n+=`${t[0]}.`;throw new TypeError(n)}}function fre(e,t,...n){switch(t){case"HS256":case"HS384":case"HS512":{if(!ev(e.algorithm,"HMAC"))throw Jl("HMAC");const r=parseInt(t.slice(2),10);if(Cb(e.algorithm.hash)!==r)throw Jl(`SHA-${r}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!ev(e.algorithm,"RSASSA-PKCS1-v1_5"))throw Jl("RSASSA-PKCS1-v1_5");const r=parseInt(t.slice(2),10);if(Cb(e.algorithm.hash)!==r)throw Jl(`SHA-${r}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!ev(e.algorithm,"RSA-PSS"))throw Jl("RSA-PSS");const r=parseInt(t.slice(2),10);if(Cb(e.algorithm.hash)!==r)throw Jl(`SHA-${r}`,"algorithm.hash");break}case"EdDSA":if(e.algorithm.name!=="Ed25519"&&e.algorithm.name!=="Ed448")throw Jl("Ed25519 or Ed448");break;case"ES256":case"ES384":case"ES512":{if(!ev(e.algorithm,"ECDSA"))throw Jl("ECDSA");const r=cre(t);if(e.algorithm.namedCurve!==r)throw Jl(r,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}dre(e,n)}function mk(e,t,...n){var r;if(n.length>2){const o=n.pop();e+=`one of type ${n.join(", ")}, or ${o}.`}else n.length===2?e+=`one of type ${n[0]} or ${n[1]}.`:e+=`of type ${n[0]}.`;return t==null?e+=` Received ${t}`:typeof t=="function"&&t.name?e+=` Received function ${t.name}`:typeof t=="object"&&t!=null&&(r=t.constructor)!=null&&r.name&&(e+=` Received an instance of ${t.constructor.name}`),e}const tx=(e,...t)=>mk("Key must be ",e,...t);function gk(e,t,...n){return mk(`Key for the ${e} algorithm must be `,t,...n)}const yk=e=>pk(e),ll=["CryptoKey"],hre=(...e)=>{const t=e.filter(Boolean);if(t.length===0||t.length===1)return!0;let n;for(const r of t){const o=Object.keys(r);if(!n||n.size===0){n=new Set(o);continue}for(const i of o){if(n.has(i))return!1;n.add(i)}}return!0};function pre(e){return typeof e=="object"&&e!==null}function nx(e){if(!pre(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}const mre=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){const{modulusLength:n}=t.algorithm;if(typeof n!="number"||n<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}},tc=(e,t,n=0)=>{n===0&&(t.unshift(t.length),t.unshift(6));const r=e.indexOf(t[0],n);if(r===-1)return!1;const o=e.subarray(r,r+t.length);return o.length!==t.length?!1:o.every((i,a)=>i===t[a])||tc(e,t,r+1)},rx=e=>{switch(!0){case tc(e,[42,134,72,206,61,3,1,7]):return"P-256";case tc(e,[43,129,4,0,34]):return"P-384";case tc(e,[43,129,4,0,35]):return"P-521";case tc(e,[43,101,110]):return"X25519";case tc(e,[43,101,111]):return"X448";case tc(e,[43,101,112]):return"Ed25519";case tc(e,[43,101,113]):return"Ed448";default:throw new J0("Invalid or unsupported EC Key Curve or OKP Key Sub Type")}},gre=async(e,t,n,r,o)=>{let i,a;const u=new Uint8Array(atob(n.replace(e,"")).split("").map(f=>f.charCodeAt(0))),d=t==="spki";switch(r){case"PS256":case"PS384":case"PS512":i={name:"RSA-PSS",hash:`SHA-${r.slice(-3)}`},a=d?["verify"]:["sign"];break;case"RS256":case"RS384":case"RS512":i={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${r.slice(-3)}`},a=d?["verify"]:["sign"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":i={name:"RSA-OAEP",hash:`SHA-${parseInt(r.slice(-3),10)||1}`},a=d?["encrypt","wrapKey"]:["decrypt","unwrapKey"];break;case"ES256":i={name:"ECDSA",namedCurve:"P-256"},a=d?["verify"]:["sign"];break;case"ES384":i={name:"ECDSA",namedCurve:"P-384"},a=d?["verify"]:["sign"];break;case"ES512":i={name:"ECDSA",namedCurve:"P-521"},a=d?["verify"]:["sign"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":{const f=rx(u);i=f.startsWith("P-")?{name:"ECDH",namedCurve:f}:{name:f},a=d?[]:["deriveBits"];break}case"EdDSA":i={name:rx(u)},a=d?["verify"]:["sign"];break;default:throw new J0('Invalid or unsupported "alg" (Algorithm) value')}return JS.subtle.importKey(t,u,i,(o==null?void 0:o.extractable)??!1,a)},yre=(e,t,n)=>gre(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g,"spki",e,t,n);async function vre(e,t,n){if(typeof e!="string"||e.indexOf("-----BEGIN PUBLIC KEY-----")!==0)throw new TypeError('"spki" must be SPKI formatted string');return yre(e,t,n)}const wre=(e,t)=>{if(!(t instanceof Uint8Array)){if(!yk(t))throw new TypeError(gk(e,t,...ll,"Uint8Array"));if(t.type!=="secret")throw new TypeError(`${ll.join(" or ")} instances for symmetric algorithms must be of type "secret"`)}},bre=(e,t,n)=>{if(!yk(t))throw new TypeError(gk(e,t,...ll));if(t.type==="secret")throw new TypeError(`${ll.join(" or ")} instances for asymmetric algorithms must not be of type "secret"`);if(n==="sign"&&t.type==="public")throw new TypeError(`${ll.join(" or ")} instances for asymmetric algorithm signing must be of type "private"`);if(n==="decrypt"&&t.type==="public")throw new TypeError(`${ll.join(" or ")} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&n==="verify"&&t.type==="private")throw new TypeError(`${ll.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&n==="encrypt"&&t.type==="private")throw new TypeError(`${ll.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`)},Sre=(e,t,n)=>{e.startsWith("HS")||e==="dir"||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?wre(e,t):bre(e,t,n)};function Dre(e,t,n,r,o){if(o.crit!==void 0&&r.crit===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!r||r.crit===void 0)return new Set;if(!Array.isArray(r.crit)||r.crit.length===0||r.crit.some(a=>typeof a!="string"||a.length===0))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let i;n!==void 0?i=new Map([...Object.entries(n),...t.entries()]):i=t;for(const a of r.crit){if(!i.has(a))throw new J0(`Extension Header Parameter "${a}" is not recognized`);if(o[a]===void 0)throw new e(`Extension Header Parameter "${a}" is missing`);if(i.get(a)&&r[a]===void 0)throw new e(`Extension Header Parameter "${a}" MUST be integrity protected`)}return new Set(r.crit)}const Tre=(e,t)=>{if(t!==void 0&&(!Array.isArray(t)||t.some(n=>typeof n!="string")))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};function Ire(e,t){const n=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:n,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:n,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:n,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:n,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new J0(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}function xre(e,t,n){if(pk(t))return fre(t,e,n),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(tx(t,...ll));return JS.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[n])}throw new TypeError(tx(t,...ll,"Uint8Array"))}const Ere=async(e,t,n,r)=>{const o=await xre(e,t,"verify");mre(e,o);const i=Ire(e,o.algorithm);try{return await JS.subtle.verify(i,o,n,r)}catch{return!1}};async function Cre(e,t,n){if(!nx(e))throw new To("Flattened JWS must be an object");if(e.protected===void 0&&e.header===void 0)throw new To('Flattened JWS must have either of the "protected" or "header" members');if(e.protected!==void 0&&typeof e.protected!="string")throw new To("JWS Protected Header incorrect type");if(e.payload===void 0)throw new To("JWS Payload missing");if(typeof e.signature!="string")throw new To("JWS Signature missing or incorrect type");if(e.header!==void 0&&!nx(e.header))throw new To("JWS Unprotected Header incorrect type");let r={};if(e.protected)try{const T=Eb(e.protected);r=JSON.parse(KS.decode(T))}catch{throw new To("JWS Protected Header is invalid")}if(!hre(r,e.header))throw new To("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");const o={...r,...e.header},i=Dre(To,new Map([["b64",!0]]),n==null?void 0:n.crit,r,o);let a=!0;if(i.has("b64")&&(a=r.b64,typeof a!="boolean"))throw new To('The "b64" (base64url-encode payload) Header Parameter must be a boolean');const{alg:u}=o;if(typeof u!="string"||!u)throw new To('JWS "alg" (Algorithm) Header Parameter missing or invalid');const d=n&&Tre("algorithms",n.algorithms);if(d&&!d.has(u))throw new lre('"alg" (Algorithm) Header Parameter value not allowed');if(a){if(typeof e.payload!="string")throw new To("JWS Payload must be a string")}else if(typeof e.payload!="string"&&!(e.payload instanceof Uint8Array))throw new To("JWS Payload must be a string or an Uint8Array instance");let f=!1;typeof t=="function"&&(t=await t(r,e),f=!0),Sre(u,t,"verify");const m=are(Xy.encode(e.protected??""),Xy.encode("."),typeof e.payload=="string"?Xy.encode(e.payload):e.payload);let g;try{g=Eb(e.signature)}catch{throw new To("Failed to base64url decode the signature")}if(!await Ere(u,t,g,m))throw new ure;let w;if(a)try{w=Eb(e.payload)}catch{throw new To("Failed to base64url decode the payload")}else typeof e.payload=="string"?w=Xy.encode(e.payload):w=e.payload;const D={payload:w};return e.protected!==void 0&&(D.protectedHeader=r),e.header!==void 0&&(D.unprotectedHeader=e.header),f?{...D,key:t}:D}async function Mre(e,t,n){if(e instanceof Uint8Array&&(e=KS.decode(e)),typeof e!="string")throw new To("Compact JWS must be a string or Uint8Array");const{0:r,1:o,2:i,length:a}=e.split(".");if(a!==3)throw new To("Invalid Compact JWS");const u=await Cre({payload:o,protected:r,signature:i},t,n),d={payload:u.payload,protectedHeader:u.protectedHeader};return typeof t=="function"?{...d,key:u.key}:d}const kre={webId:"globe-2",pinned:"pin",archived:"archive",visibility:"eye",deleted:"trash"};class Nre extends ul.WidgetType{constructor(n,r,o,i,a){super();De(this,"error",!1);this.view=n,this.plugin=r,this.target=o,this.type=i,this.to=a}eq(n){return this.target===n.target}toDOM(){const n=createSpan();return n.toggleClass("thino-inline-widget",!0),C.setIcon(n,kre[this.type]||"help-circle"),C.setTooltip&&C.setTooltip(n,this.target),n}}function Are(e){class t{constructor(o){De(this,"view");De(this,"match",new ul.MatchDecorator({regexp:/\[(webId|pinned|archived|visibility|deleted)::([^\]]+)\]/g,decorate:(o,i,a,u,d)=>{this.shouldRender(d,i,a)&&o(i,a,ul.Decoration.replace({widget:new Nre(d,e,u[0],u[1],a)}))}}));De(this,"decorations",ul.Decoration.none);this.view=o,this.updateDecorations(o)}update(o){this.updateDecorations(o.view,o)}destroy(){this.decorations=ul.Decoration.none}updateDecorations(o,i){!i||this.decorations.size===0?this.decorations=this.match.createDeco(o):this.decorations=this.match.updateDeco(i,this.decorations)}isLivePreview(o){return o.field(C.editorLivePreviewField)}shouldRender(o,i,a){return!o.state.selection.ranges.some(d=>d.from<=i?d.to>=i:d.from<=a)&&this.isLivePreview(o.state)}}const n={decorations:r=>r.decorations.update({filter:(o,i,a)=>{const u=a.spec.widget;return u&&u.error?!1:o===i||!r.view.state.selection.ranges.filter(d=>{const f=d.from,m=d.to;return f<=o?m>=o:f<=i}).length}})};return ul.ViewPlugin.fromClass(t,n)}const Fre=e=>e.ctrlKey!==void 0||e.metaKey!==void 0||e.shiftKey!==void 0||e.altKey!==void 0,tv=()=>{new C.Notice(E("Open Memos Successfully"))},nv=[{id:"open-thino-in-left-sidebar",shortName:E("Left sidebar"),name:E("Open thino in left sidebar"),icon:"arrow-left",location:"left",cb:tv,modKeys:"shift"},{id:"open-thino-in-right-sidebar",shortName:E("Right sidebar"),name:E("Open thino in right sidebar"),icon:"arrow-right",location:"right",cb:tv,modKeys:["ctrl","meta"]},{id:"open-thino-in-float",shortName:E("Float window"),name:E("Open thino in float window"),icon:"layout",location:"float",cb:tv,modKeys:"alt"},{id:"open-thino-in-center",shortName:E("Center window"),name:E("Open thino in center window"),icon:"tv-2",location:"center",cb:tv,modKeys:void 0}];function ox(e,t,n){return new Promise((r,o)=>{let i="",a="";const u=d=>new Promise((f,m)=>{const g=t.ShareToThinoWithTextNewline===d||t.ShareToThinoWithTextNewline==="both"?`
|
|
|
`:" ";switch(t[d==="prepend"?"SharePrependType":"ShareAppendType"]){case"none":f();break;case"preset":t.ShareToThinoWithText&&(d==="prepend"?i=t.ShareToThinoWithTextPrepend+g:a=g+t.ShareToThinoWithTextAppend),f();break;case"input":{const v="Thino "+E(d==="prepend"?"Prepend text":"Append text");new vk(e,v,w=>{d==="prepend"?i=w.trim()+(w.trim()?g:""):a=(w.trim()?g:"")+w,f()}).open();break}case"selectTags":new hO(e,v=>{const w=v.length>0?v.map(D=>"#"+D).join(" "):"";d==="prepend"?i=w.trim()+(w.trim()?g:""):a=(w.trim()?g:"")+w.trim(),f()}).open();break;default:m(new Error("Invalid configuration type."))}});Promise.all([u("append"),u("prepend")]).then(()=>n(i,a)).then(()=>r()).catch(o)})}class Pre extends C.Plugin{constructor(){super(...arguments);De(this,"settings");De(this,"settingTab");De(this,"triggerBySelf",!1);De(this,"updatedID","");De(this,"debounceTimer",0);De(this,"apiHttpServer",null);De(this,"captureService",null);De(this,"loaded",!1)}async onload(){await this.loadSettings(),Rte(),this.registerRibbon(),await this.verify();try{await this.checkVersionAndShowChangeLog()}catch(n){console.error(n)}this.settingTab=new Jte(this.app,this),this.addSettingTab(this.settingTab),this.initApp(),this.initEditor(),this.initURIHandler(),this.registerMobileEvent(),this.registerCommands(),this.registerCanvasNodeMemos(),this.registerHoverEvent(),this.registerLinkOpen(),this.registerCodeBlocks(),this.registerEditorContextMenu(),this.registerEditorSuggest(new Ote(this.app,this)),this.registerEditorExtension([Zne]),this.app.workspace.onLayoutReady(this.onLayoutReady.bind(this)),this.registerView(Bo,n=>new ac(n,this))}async loadSettings(){this.settings=Object.assign({},cs,await this.loadData()),yt.setSettings(this.settings)}async saveSettings(){await this.saveData(this.settings),yt.setSettings(this.settings)}onunload(){var r;this.app.workspace.detachLeavesOfType(Bo),je.clearMemos(),_e.dispatch({type:"CLEAR_MEMOS",payload:null}),_e.dispatch({type:"CLEAR_FILES",payload:null}),_e.dispatch({type:"CLEAR_VIEW",payload:null});const n=document.body.find(".dialog-wrapper");n&&((r=n.parentElement)==null||r.detach()),this.apiHttpServer&&(this.apiHttpServer.close(),this.apiHttpServer=null),this.captureService&&this.captureService.onunload(),new C.Notice(E("Close Memos Successfully"))}initEditor(){const n=()=>{const r=this.app.embedRegistry;if(!r)return!1;const o=r.embedByExtension.md,i=createEl("div"),a=o({app:this.app,containerEl:i},null,null);if(a.editable=!0,a.set(""),a.showEditor(),!a.editMode)return!1;const u=Object.getPrototypeOf(Object.getPrototypeOf(a.editMode));return yt.setEditor(u),i.detach(),!0};this.app.workspace.onLayoutReady(()=>{n()||this.app.workspace.onLayoutReady(()=>{setTimeout(()=>{n()},100)})}),this.register(Sm(C.MetadataCache.prototype,{getFileCache:r=>function(o){return!(o!=null&&o.path)&&!o?null:r.call(this,o)}}))}initApp(){yt.setApp(this.app)}initURIHandler(){this.registerObsidianProtocolHandler("thino",async n=>{var a,u,d;if(!n)return;if(n.userid)try{const f=n.userid;Gne(f,this.app),Jne(C.moment().add(30,"days").valueOf(),this.app),dt.setRefresh(!0)}catch(f){console.error(f),new C.Notice(E("Failed to verify"))}if(n.token)try{const f=n.token;(a=this.app)==null||a.saveLocalStorage("tokenForSync",f),setTimeout(()=>{this.app.setting.open(),this.app.setting.openTabById(this.manifest.id||"obsidian-memos"),this.settingTab.display()},200),new C.Notice(E("Saved sync token successfully"))}catch(f){console.error(f),new C.Notice(E("Failed to save"))}if(n.copyToken){this.app.setting.open(),this.app.setting.openTabById(this.manifest.id??"obsidian-memos");const f=await ok();await navigator.clipboard.writeText(f),new C.Notice(E("Copied app id successfully"))}const r=(u=yt.getState())==null?void 0:u.verifyState,o=!C.Platform.isDesktop&&await((d=window.Capacitor)==null?void 0:d.Plugins.Device.getId()),i=C.Platform.isDesktop?await Jn():o.identifier||o.uuid;if(!(!r||(r==null?void 0:r.appId)!==i)){if(n.content){const f=n.type,m=decodeURI(n.content)!==n.content?decodeURI(n.content):n.content,g=n.task,v=await je.createThino({content:m,type:f,isList:!!g});if(!v)return;je.pushMemo(v),st.clearQuery()}n.openId&&await je.openThinoByID(n.openId)}})}initGlobalManifest(){dt.setPluginManifest(this.manifest)}stopServer(){this.apiHttpServer&&(this.apiHttpServer.close(),this.apiHttpServer=null)}async stopEnableList(){var i,a;const n=(i=yt.getState())==null?void 0:i.verifyState,r=!C.Platform.isDesktop&&await((a=window.Capacitor)==null?void 0:a.Plugins.Device.getId()),o=C.Platform.isDesktop?await Jn():r.identifier||r.uuid;if(!n||(n==null?void 0:n.appId)!==o){this.settings.EnabledLocationList=[{value:"DAILY",target:"ProcessEntriesBelow",insert:"InsertAfter"}],this.settingTab.debounceApplySettingsUpdate();return}}async initServer(){var i,a;if(C.Platform.isMobile||!this.settings.EnabledHttpApi)return;const n=(i=yt.getState())==null?void 0:i.verifyState,r=!C.Platform.isDesktop&&await((a=window.Capacitor)==null?void 0:a.Plugins.Device.getId()),o=C.Platform.isDesktop?await Jn():r.identifier||r.uuid;!n||(n==null?void 0:n.appId)!==o||(this.apiHttpServer=tre(this.settings),this.initServerPort())}initServerPort(){this.apiHttpServer&&this.settings.EnabledHttpApi&&this.apiHttpServer.listen(this.settings.HttpApiIpType,this.settings.HttpApiPort)}async initCaptureService(){var i,a;if(C.Platform.isMobile||!this.settings.CaptureKey.EnableCaptureKey)return;const n=(i=yt.getState())==null?void 0:i.verifyState,r=!C.Platform.isDesktop&&await((a=window.Capacitor)==null?void 0:a.Plugins.Device.getId()),o=C.Platform.isDesktop?await Jn():r.identifier||r.uuid;!n||(n==null?void 0:n.appId)!==o||(this.captureService=new ire(this.app,this),await this.captureService.onload())}registerMobileEvent(){C.Platform.isMobile&&(this.registerEvent(this.app.workspace.on("receive-text-menu",(n,r)=>{n.addItem(o=>{o.setSection("options").setIcon("popup-open").setTitle(E("Insert as Memo")).onClick(async()=>{let i=r;try{await ox(this.app,this.settings,async(a,u)=>{i=a+i+u;const d=await je.createThino({content:i,type:this.settings.MemoSaveLocation||"DAILY",isList:!0});je.pushMemo(d)})}catch(a){console.error("Configuration failed:",a);return}})})})),this.registerEvent(this.app.workspace.on("receive-files-menu",(n,r)=>{n.addItem(o=>{o.setIcon("popup-open").setTitle(E("Insert file as memo content")).onClick(async()=>{let a=r.map(u=>this.app.fileManager.generateMarkdownLink(u,u.path)).join(`
|
|
|
`);try{await ox(this.app,this.settings,async(u,d)=>{a=u+a+d;const f=await je.createThino({content:a,type:this.settings.MemoSaveLocation||"DAILY",isList:!0});je.pushMemo(f)})}catch(u){console.error("Configuration failed:",u);return}})})})))}registerCommands(){nv.forEach(n=>{this.addCommand({id:n.id,name:n.name,callback:()=>this.openMemos(n.location,n.cb),hotkeys:[]})}),["Modern","Clean","Minimal","Gradient"].forEach(n=>{this.addCommand({id:`share-thino-via-${n.toLowerCase()}`,name:E("Share thino")+` [${E(n)}]`,editorCallback:(r,o)=>{const i=r.getSelection();if(i.length===0)return;const a={id:`temp-${Date.now()}`,content:i,createdAt:C.moment().format("YYYY-MM-DD HH:mm:ss"),updatedAt:C.moment().format("YYYY-MM-DD HH:mm:ss"),deletedAt:"",pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",thinoType:"JOURNAL",hasId:"",linkId:"",resourceList:[],creatorName:"thino",sourceType:"DAILY",path:o.file.path};md(a,n.toLowerCase(),o)}})}),this.addCommand({id:"insert-task",name:E("Insert task"),checkCallback:n=>{const r=this.app.plugins.getPlugin("obsidian-tasks-plugin"),o=this.app.workspace.getLeavesOfType("thino_view").first();if(r&&o)return n||this.app.plugins.plugins["obsidian-tasks-plugin"].apiV1.createTaskLineModal().then(a=>{this.app.workspace.trigger("send-to-thino",a,o)}),!0}}),this.addCommand({id:"show-thino-editor",name:E("Show thino editor"),checkCallback:n=>{if(je.initialized&&yt.initialized){if(!n){if(!yt.getState().view){new C.Notice(E("Please open thino first"));return}new UC(this.app).open()}return!0}}}),this.addCommand({id:"lock-thino",name:E("Lock thino"),checkCallback:n=>{if(this.app.workspace.getActiveViewOfType(ac)&&this.settings.needVerify)return n||dt.setLocked(!0),!0}}),this.addCommand({id:"copy-debug-info",name:E("Copy debug info"),callback:()=>{try{const n=this.app.internalPlugins.plugins["daily-notes"];let r;r={settings:{...this.settings,tokenForVerify:"***"},plugins:Object.keys(this.app.plugins.plugins),manifest:this.manifest,platform:C.Platform.resourcePathPrefix},n&&(r={...r,dailyNotePluginInfo:{options:n.instance.options}}),navigator.clipboard.writeText(`\`\`\`json
|
|
|
${JSON.stringify(r,null,2)}
|
|
|
\`\`\``),new C.Notice(E("Debug info copied to clipboard"))}catch(n){console.error(n)}}}),this.addCommand({id:"insert-editor",name:E("Insert editor"),checkCallback:n=>{const r=this.app.workspace.getActiveViewOfType(C.MarkdownView);if(r&&r.getViewType()==="markdown")return n||r.editor.replaceSelection("\n```thino\n{\n editor: false\n}\n```\n"),!0}}),this.addCommand({id:"toggle-minimal-thino",name:E("Toggle minimal mode"),callback:()=>{const n=document.body.hasClass("minimal-thino");document.body.toggleClass("minimal-thino",!n)}}),this.addCommand({id:"focus-on-thino-editor",name:E("Focus on thino editor"),callback:()=>this.focusOnEditor(),hotkeys:[]}),this.addCommand({id:"reinit-thino-sync",name:E("ReSync web thinos to local"),callback:()=>{Uee(this.app)}}),this.addCommand({id:"init-thino-sync",name:E("Sync local thinos to web"),callback:async()=>{var r;if(!((r=this.app)==null?void 0:r.loadLocalStorage("tokenForSync"))){new C.Notice(E("Please input token first"));return}if(!this.settings.startSync){new C.Notice(E("Please enable sync first"));return}try{await je.initSync()}catch(o){console.error(o),new C.Notice(E("Init Failed"))}}}),this.addCommand({id:"show-daily-thino",name:E("Show daily thino"),callback:()=>this.openDailyMemo(),hotkeys:[]}),this.addCommand({id:"focus-on-search-bar",name:E("Focus on search bar"),callback:()=>this.searchIt(),hotkeys:[]}),this.addCommand({id:"show-thino-in-popover",name:E("Show-thino in popover(Hover editor)"),callback:()=>this.showInPopover(),hotkeys:[]})}async onLayoutReady(){await this.stopEnableList(),await this.initServer(),this.initGlobalManifest(),await this.initMemos(),this.autoOpenMemos(),this.registerThinoWidget(),await this.registerToolbarCheck(),await this.initCaptureService(),yt.setPlugin(this);const n=this.app.workspace.editorSuggest.suggests.findIndex(r=>r.type==="customTag");n!==-1?(this.app.workspace.editorSuggest.suggests.splice(n,1),this.app.workspace.editorSuggest.suggests.unshift(new ex(this.app,this))):this.app.workspace.editorSuggest.suggests.unshift(new ex(this.app,this))}async initMemos(){try{await this.initDailyNotes()}catch(n){console.error(n)}yt.getState(),je.getState(),await je.fetchAllMemos()}async initDailyNotes(){this.settings.EnabledLocationList.find(n=>n.value==="DAILY")&&await yt.fechLocalDailyNotes()}registerCanvasNodeMemos(){if(!C.requireApiVersion("1.2.0")||!this.settings.EnabledLocationList.find(i=>i.value==="CANVAS"))return;const n=i=>{clearTimeout(this.debounceTimer),this.debounceTimer=window.setTimeout(()=>{setTimeout(async()=>{const a=i.canvas.getData(),u=a.nodes.find(d=>d.id===i.id);if(u&&(r(u),i.canvas.setData(a),je.getMemoById(i.id))){const f=await je.updateMemo(i.id,u.text,u.thinoType);je.editMemo(f)}i.canvas.requestSave(!0)},0)},800)},r=i=>{i.createdAt||(i.createdAt=C.moment().format("YYYY-MM-DD HH:mm:ss")),i.updatedAt=C.moment().format("YYYY-MM-DD HH:mm:ss"),i.deletedAt=i.deletedAt?i.deletedAt:"",i.pinned=i.pinned?i.pinned:!1,i.visibility=i.visibility?i.visibility:"PUBLIC",i.rowStatus=i.rowStatus?i.rowStatus:"NORMAL",i.thinoType=i.thinoType?i.thinoType:"JOURNAL",i.hasId=i.hasId?i.hasId:"",i.linkId=i.linkId?i.linkId:"",i.resourceList=[]},o=()=>{var v,w;const i=(v=this.app.workspace.getLeavesOfType("canvas").first())==null?void 0:v.view;if(!i||!(i==null?void 0:i.canvas))return!1;const u=((w=this.app.workspace.getLeavesOfType("canvas").first())==null?void 0:w.view).canvas.nodes.values(),f=Array.from(u).filter(D=>D.text!==void 0);if(!f||f.length===0)return!1;const m=f[0].child;if(!m)return!1;const g=Sm(m.constructor.prototype,{save:D=>function(...T){D.call(this,...T),this.node.isEditing&&n(this.node)}});return this.register(g),!0};this.app.workspace.onLayoutReady(()=>{if(!o()){const i=this.app.workspace.on("layout-change",()=>{o()&&this.app.workspace.offref(i)});this.registerEvent(i)}})}registerLinkOpen(){Sm(C.Workspace.prototype,{openLinkText:n=>async function(...r){const o=je.getState().memos;if(o.find(i=>i.id===r[0]||i.id===r[1])){const i=o.find(a=>a.id===r[0]||a.id===r[1]);if(i){Lh(i);return}}await n.call(this,...r)}})}registerHoverEvent(){this.registerHoverLinkSource("thino",{defaultMod:!0,display:"Thino"})}registerCodeBlocks(){this.registerMarkdownCodeBlockProcessor("thino",async(n,r)=>{var o;if(n){if(!((o=this.app.workspace.getLeavesOfType("thino_view"))!=null&&o.length)){r.toggleClass(["thino-editor-codeblock","view-error"],!0),e7(r,this);return}if(n){const i=C.parseYaml(n);new C.Component,n7(r,i)}}})}registerEditorContextMenu(){this.registerEvent(this.app.workspace.on("editor-menu",(n,r,o)=>{const i=r.getSelection();if(i.length===0)return;const a={id:`temp-${Date.now()}`,content:i,createdAt:C.moment().format("YYYY-MM-DD HH:mm:ss"),updatedAt:C.moment().format("YYYY-MM-DD HH:mm:ss"),deletedAt:"",pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",thinoType:"JOURNAL",hasId:"",linkId:"",resourceList:[],creatorName:"thino",sourceType:"DAILY",path:o.file.path},u=(d,f)=>{d.addItem(m=>{m.setSection("selection").setTitle(f+E("Modern")).setIcon("palette").onClick(async()=>{md(a,"modern",o)})}).addItem(m=>{m.setSection("selection").setTitle(f+E("Clean")).setIcon("palette").onClick(async()=>{md(a,"clean",o)})}).addItem(m=>{m.setSection("selection").setTitle(f+E("Minimal")).setIcon("palette").onClick(async()=>{md(a,"minimal",o)})}).addItem(m=>{m.setSection("selection").setTitle(E("Gradient")).setIcon("palette").onClick(async()=>{md(a,"gradient",o)})})};C.Platform.isDesktop&&n.addItem(d=>{const f=d.setIcon("Memos").setSection("selection").setTitle(E("Thino share")).setSubmenu();u(f,"")}),C.Platform.isMobile&&u(n,E("Thino share")+" ")}))}registerRibbon(){this.addRibbonIcon("Memos",E("ribbonIconTitle"),async n=>{if(n.button===2){n.preventDefault();const r=new C.Menu;nv.forEach(o=>{r.addItem(i=>{i.setTitle(o.shortName).setIcon(o.icon).onClick(async()=>{await this.openMemos(o.location,o.cb)})})}),r.showAtMouseEvent(n);return}for(let r=0;r<nv.length;r++){const o=nv[r];if(!o.modKeys){await this.openMemos(o.location,o.cb);break}if(!Fre(n))continue;const i=a=>n[`${a}Key`];if(typeof o.modKeys=="string"&&i(o.modKeys)||Array.isArray(o.modKeys)&&o.modKeys.some(i)){await this.openMemos(o.location,o.cb);break}}})}registerThinoWidget(){this.registerEditorExtension([Are(this)])}async registerToolbarCheck(){var i,a;if(this.loaded)return;const n=(i=yt.getState())==null?void 0:i.verifyState,r=!C.Platform.isDesktop&&await((a=window.Capacitor)==null?void 0:a.Plugins.Device.getId()),o=C.Platform.isDesktop?await Jn():r.identifier||r.uuid;!n||(n==null?void 0:n.appId)!==o||(this.registerEditorExtension([Une(this.app)]),this.registerEditorSuggest(new jte(this.app,this)),this.loaded=!0)}async verify(){var o;let n="";if(C.Platform.isDesktop)n=await Jn();else{const i=await((o=window.Capacitor.Plugins.Device)==null?void 0:o.getId());if(!i)return;n=i.identifier||i.uuid}async function r(i){if(!i)return yt.setVerifyState(null),!1;const d=await vre(`-----BEGIN PUBLIC KEY-----
|
|
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr+i4MLzI40gGFHl7gdRH
|
|
|
UL1mH0NcWEs1/IBYDDbc9ALbvUGwDaUcVIKke+b+F4T7qISexyGd5qV0s1vNYeCk
|
|
|
iCTq4w3+CFDurIFYAgQYTcV6K5pL8Bpb79FEclsTnAcKgiuzKBxPZ1djKxbgnmFj
|
|
|
+PE+EcmX+JJK9hG1O8X+YFJoPJWl225eCoysONickiI7Ndwu9YLR8pIUb1VMyJSy
|
|
|
cMR87z466Nc5Hx2QhwyuiiQYL3Ru4WkNF3AVWgqeOlhBDybFFwDaV7OOMTiYtH46
|
|
|
3iKx6azEVS8W/gYfrW+hKp2VziPPw3oxouP/wCes/4qRlXkwyjSwtfLtpE4Rsa4+
|
|
|
swIDAQAB
|
|
|
-----END PUBLIC KEY-----`,"RS256");try{const{payload:f}=await Mre(i,d),m=JSON.parse(new TextDecoder().decode(f));return!m||m.iss!=="pkmer"||m.type!=="thino"||m.appId!==n?!1:(yt.setVerifyState(m),!0)}catch(f){console.error(f)}}return await r(this.settings.tokenForVerify[n])}async checkVersionAndShowChangeLog(){const n=this.manifest.version,r=this.settings.LastUpdatedVersion;n!==r&&(this.settings.LastUpdatedVersion=n,await this.saveSettings(),this.showChangeLog())}showChangeLog(){new QS(this.app,this.manifest.version).open()}autoOpenMemos(){this.app.workspace.getLeavesOfType(Bo).length>0||this.settings.MobileAndDesktop==="Mobile"&&C.Platform.isDesktop||this.settings.MobileAndDesktop==="Desktop"&&C.Platform.isMobile||this.settings.OpenMemosAutomatically&&this.openMemos()}async openDailyMemo(){if(this.app.workspace.getLeavesOfType(Bo).length>0){st.setPathname("/daily");return}await this.openMemos(),st.setPathname("/daily")}async openMemos(n="center",r){const o=this.app.workspace;if(o.getLeavesOfType(Bo).length>0){const u=o.getLeavesOfType(Bo)[0];o.setActiveLeaf(u),o.revealLeaf(u);return}o.detachLeavesOfType(Bo);let i;switch(n){case"left":i=o.getLeftLeaf(!1);break;case"right":i=o.getRightLeaf(!1);break;case"float":i=o.getLeaf("window");break;default:i=o.getLeaf(!0);break}i&&(await i.setViewState({type:Bo}),o.revealLeaf(i));const a=i.view.containerEl.querySelector("textarea");a&&a.focus(),r==null||r()}async searchIt(){const n=this.app.workspace,r=n.getLeavesOfType(Bo);if(!(r.length>0)){await this.openMemos(),this.app.workspace.trigger("focus-on-searchbar");return}const o=r[0];n.revealLeaf(o),this.app.workspace.trigger("focus-on-searchbar")}async focusOnEditor(){if(!(this.app.workspace.getLeavesOfType(Bo).length>0)){await this.openMemos();return}this.app.workspace.trigger("focus-on-textarea")}changeStatus(){const n=this.app.workspace,r=n.getLeavesOfType(Bo);if(!(r.length>0)){new C.Notice(E("Please Open Memos First"));return}const o=r[0];n.setActiveLeaf(o),o.view.containerEl.querySelector(".list-or-task").click()}async showInPopover(){var i,a,u;const n=this.app.workspace;if(n.detachLeavesOfType(Bo),!this.app.plugins.getPlugin("obsidian-hover-editor")){new C.Notice(E("Please install obsidian-hover-editor plugin first"));return}const o=await((i=this.app.plugins.getPlugin("obsidian-hover-editor"))==null?void 0:i.spawnPopover());o&&(await o.setViewState({type:Bo}),n.revealLeaf(o),o.view.containerEl.classList.add("mobile-view"),(a=this.settings)!=null&&a.FocusOnEditor&&o.view.containerEl.querySelector("textarea")!==void 0&&((u=o.view.containerEl.querySelector("textarea"))==null||u.focus()))}}class QS extends C.Modal{constructor(n,r){super(n);De(this,"component");this.version=r}async onOpen(){const{contentEl:n}=this;this.containerEl.toggleClass("thino-changelog-modal",!0),n.createEl("h2",{text:E("Thino update info"),cls:"thino-changelog-title"}).createDiv({cls:"thino-changelog-version",text:`${this.version}`});try{n.createEl("h3",{text:E("Latest version")});const o=n.createDiv("current-change-log");n.createEl("hr"),n.createEl("h3",{text:E("Previous version")});const i=n.createDiv("prev-change-log"),u=await C.requestUrl("https://raw.githubusercontent.com/Quorafind/Obsidian-Thino/main/CHANGELOG.md");this.component=new C.Component;const[d,f]=this.getLatestVersionContent(u.text);let m=d,g=f;try{const v=localStorage.getItem("language"),w=v&&(v==="zh"||v==="zh-TW");m=w?d.replaceAll("> [!tips]+","> [!tips]-").replaceAll("> [!note]-","> [!note]+"):d,g=w?f.replaceAll("> [!tips]+","> [!tips]-").replaceAll("> [!note]-","> [!note]+"):f}catch(v){console.error(v)}await C.MarkdownRenderer.render(this.app,m,o,"",this.component),await C.MarkdownRenderer.render(this.app,g,i,"",this.component)}catch(o){console.error(o),n.createEl("p",{text:E("Failed to load changelog")}),n.createEl("a",{text:E("View online"),attr:{href:"https://raw.githubusercontent.com/Quorafind/Obsidian-Thino/main/CHANGELOG.md",target:"_blank"}})}}getLatestVersionContent(n){const r=/^# .+/gm,o=[...n.matchAll(r)];if(o.length===0)return[n,""];const i=o[0].index||0;let a=n.length;o.length>1&&(a=o[1].index||n.length);const u=n.substring(i,a).trim(),d=n.substring(a).trim();return[u,d]}onClose(){var r;const{contentEl:n}=this;n.empty(),(r=this.component)==null||r.unload()}}class vk extends C.Modal{constructor(n,r,o){super(n);De(this,"inputEl");De(this,"callback");this.title=r,this.callback=o}onOpen(){const{contentEl:n}=this;this.setTitle(this.title),this.containerEl.toggleClass(["thino-input-dialog","thino-bulk-action-dialog","tag-actions"],!0),this.inputEl=n.createEl("input",{attr:{type:"text"}}),this.inputEl.focus(),new C.Setting(n).addButton(r=>{r.setButtonText(E("OK")).onClick(()=>{this.close()})})}onClose(){this.contentEl.empty(),this.callback(this.inputEl.value)}}exports.ChangeLogModal=QS;exports.InputModal=vk;exports.default=Pre;
|