"use strict";var YL=Object.defineProperty;var UL=(e,t,n)=>t in e?YL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Se=(e,t,n)=>(UL(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const x=require("obsidian"),vS=require("@codemirror/language"),Zg=require("@codemirror/state"),Wl=require("@codemirror/view");function zL(e,t){for(var n=0;nr[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var dr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var YN={exports:{}},pg={},UN={exports:{}},gn={},EC;function VL(){if(EC)return gn;EC=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),g=Symbol.iterator;function y(X){return X===null||typeof X!="object"?null:(X=g&&X[g]||X["@@iterator"],typeof X=="function"?X:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,D={};function I(X,ae,De){this.props=X,this.context=ae,this.refs=D,this.updater=De||w}I.prototype.isReactComponent={},I.prototype.setState=function(X,ae){if(typeof X!="object"&&typeof X!="function"&&X!=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,X,ae,"setState")},I.prototype.forceUpdate=function(X){this.updater.enqueueForceUpdate(this,X,"forceUpdate")};function M(){}M.prototype=I.prototype;function N(X,ae,De){this.props=X,this.context=ae,this.refs=D,this.updater=De||w}var R=N.prototype=new M;R.constructor=N,S(R,I.prototype),R.isPureReactComponent=!0;var k=Array.isArray,B=Object.prototype.hasOwnProperty,L={current:null},_={key:!0,ref:!0,__self:!0,__source:!0};function V(X,ae,De){var je,Re={},Fe=null,Be=null;if(ae!=null)for(je in ae.ref!==void 0&&(Be=ae.ref),ae.key!==void 0&&(Fe=""+ae.key),ae)B.call(ae,je)&&!_.hasOwnProperty(je)&&(Re[je]=ae[je]);var Xe=arguments.length-2;if(Xe===1)Re.children=De;else if(1{const{children:t,store:n,context:r}=e,[a,o]=P.useState(n.getState());return P.useEffect(()=>{const i=n.subscribe(l=>{o(l)});return()=>{i()}},[]),v.jsx(r.Provider,{value:a,children:t})};function ZL(e){const t=Object.keys(e),n={};for(const r of t)typeof e[r]=="function"&&(n[r]=e[r]);return(r={},a)=>{let o=!1;const i={};for(const l of t){const c=r[l],f=n[l](c,a);i[l]=f,o=o||f!==c}return o?i:r}}function qL(e,t){const n=[];let r=e;return{dispatch:l=>{const c=t(r,l),f=r;r=c;for(const h of n)h(r,f)},getState:()=>r,subscribe:l=>{let c=!0;return n.push(l),()=>{if(!c)return;const f=n.indexOf(l);n.splice(f,1),c=!1}}}}function GL(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 JL={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 KL(e,t){switch(t.type){case"RELOAD":return zN;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_PATH_QUERY":return t.payload.path===e.query.path?e:{...e,query:{...e.query,path:t.payload.path}};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 zN={pathname:"/",hash:"",query:{tag:"",duration:null,type:"",path:"",metadata:{},text:"",filter:""}};var vn={};Object.defineProperty(vn,"__esModule",{value:!0});var Tr=x;const oT="YYYY-MM-DD",iT="gggg-[W]ww",VN="YYYY-MM",WN="YYYY-[Q]Q",$N="YYYY";function Sv(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 Dv(){var e,t,n,r;try{const{internalPlugins:a,plugins:o}=window.app;if(Sv("daily")){const{format:f,folder:h,template:g}=((t=(e=o.getPlugin("periodic-notes"))==null?void 0:e.settings)==null?void 0:t.daily)||{};return{format:f||oT,folder:(h==null?void 0:h.trim())||"",template:(g==null?void 0:g.trim())||""}}const{folder:i,format:l,template:c}=((r=(n=a.getPluginById("daily-notes"))==null?void 0:n.instance)==null?void 0:r.options)||{};return{format:l||oT,folder:(i==null?void 0:i.trim())||"",template:(c==null?void 0:c.trim())||""}}catch{}}function Tv(){var e,t,n,r,a,o,i;try{const l=window.app.plugins,c=(e=l.getPlugin("calendar"))==null?void 0:e.options,f=(n=(t=l.getPlugin("periodic-notes"))==null?void 0:t.settings)==null?void 0:n.weekly;if(Sv("weekly"))return{format:f.format||iT,folder:((r=f.folder)==null?void 0:r.trim())||"",template:((a=f.template)==null?void 0:a.trim())||""};const h=c||{};return{format:h.weeklyNoteFormat||iT,folder:((o=h.weeklyNoteFolder)==null?void 0:o.trim())||"",template:((i=h.weeklyNoteTemplate)==null?void 0:i.trim())||""}}catch{}}function Iv(){var t,n,r,a;const e=window.app.plugins;try{const o=Sv("monthly")&&((n=(t=e.getPlugin("periodic-notes"))==null?void 0:t.settings)==null?void 0:n.monthly)||{};return{format:o.format||VN,folder:((r=o.folder)==null?void 0:r.trim())||"",template:((a=o.template)==null?void 0:a.trim())||""}}catch{}}function Ev(){var t,n,r,a;const e=window.app.plugins;try{const o=Sv("quarterly")&&((n=(t=e.getPlugin("periodic-notes"))==null?void 0:t.settings)==null?void 0:n.quarterly)||{};return{format:o.format||WN,folder:((r=o.folder)==null?void 0:r.trim())||"",template:((a=o.template)==null?void 0:a.trim())||""}}catch{}}function Cv(){var t,n,r,a;const e=window.app.plugins;try{const o=Sv("yearly")&&((n=(t=e.getPlugin("periodic-notes"))==null?void 0:t.settings)==null?void 0:n.yearly)||{};return{format:o.format||$N,folder:((r=o.folder)==null?void 0:r.trim())||"",template:((a=o.template)==null?void 0:a.trim())||""}}catch{}}function ZN(...e){let t=[];for(let r=0,a=e.length;r{const N=r(),R=e.clone().set({hour:N.get("hour"),minute:N.get("minute"),second:N.get("second")});return S&&R.add(parseInt(D,10),I),M?R.format(M.substring(1).trim()):R.format(o)}).replace(/{{\s*yesterday\s*}}/gi,e.clone().subtract(1,"day").format(o)).replace(/{{\s*tomorrow\s*}}/gi,e.clone().add(1,"d").format(o)));return t.foldManager.save(g,c),g}catch(g){console.error(`Failed to create file: '${h}'`,g),new Tr.Notice("Unable to create new file.")}}function r7(e,t){return t[Ws(e,"day")]??null}function a7(){const{vault:e}=window.app,{folder:t}=Dv(),n=e.getAbstractFileByPath(Tr.normalizePath(t));if(!n)throw new n7("Failed to find daily notes folder");const r={};return Tr.Vault.recurseChildren(n,a=>{if(a instanceof Tr.TFile){const o=Op(a,"day");if(o){const i=Ws(o,"day");r[i]=a}}}),r}class o7 extends Error{}function i7(){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 s7(e){return i7().indexOf(e.toLowerCase())}async function KN(e){const{vault:t}=window.app,{template:n,format:r,folder:a}=Tv(),[o,i]=await Fp(n),l=e.format(r),c=await xv(a,l);try{const f=await t.create(c,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(h,g,y,w,S,D)=>{const I=window.moment(),M=e.clone().set({hour:I.get("hour"),minute:I.get("minute"),second:I.get("second")});return y&&M.add(parseInt(w,10),S),D?M.format(D.substring(1).trim()):M.format(r)}).replace(/{{\s*title\s*}}/gi,l).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi,(h,g,y)=>{const w=s7(g);return e.weekday(w).format(y.trim())}));return window.app.foldManager.save(f,i),f}catch(f){console.error(`Failed to create file: '${c}'`,f),new Tr.Notice("Unable to create new file.")}}function l7(e,t){return t[Ws(e,"week")]??null}function u7(){const e={};if(!XN())return e;const{vault:t}=window.app,{folder:n}=Tv(),r=t.getAbstractFileByPath(Tr.normalizePath(n));if(!r)throw new o7("Failed to find weekly notes folder");return Tr.Vault.recurseChildren(r,a=>{if(a instanceof Tr.TFile){const o=Op(a,"week");if(o){const i=Ws(o,"week");e[i]=a}}}),e}class c7 extends Error{}async function QN(e){const{vault:t}=window.app,{template:n,format:r,folder:a}=Iv(),[o,i]=await Fp(n),l=e.format(r),c=await xv(a,l);try{const f=await t.create(c,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(h,g,y,w,S,D)=>{const I=window.moment(),M=e.clone().set({hour:I.get("hour"),minute:I.get("minute"),second:I.get("second")});return y&&M.add(parseInt(w,10),S),D?M.format(D.substring(1).trim()):M.format(r)}).replace(/{{\s*date\s*}}/gi,l).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,l));return window.app.foldManager.save(f,i),f}catch(f){console.error(`Failed to create file: '${c}'`,f),new Tr.Notice("Unable to create new file.")}}function d7(e,t){return t[Ws(e,"month")]??null}function f7(){const e={};if(!eA())return e;const{vault:t}=window.app,{folder:n}=Iv(),r=t.getAbstractFileByPath(Tr.normalizePath(n));if(!r)throw new c7("Failed to find monthly notes folder");return Tr.Vault.recurseChildren(r,a=>{if(a instanceof Tr.TFile){const o=Op(a,"month");if(o){const i=Ws(o,"month");e[i]=a}}}),e}class h7 extends Error{}async function p7(e){const{vault:t}=window.app,{template:n,format:r,folder:a}=Ev(),[o,i]=await Fp(n),l=e.format(r),c=await xv(a,l);try{const f=await t.create(c,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(h,g,y,w,S,D)=>{const I=window.moment(),M=e.clone().set({hour:I.get("hour"),minute:I.get("minute"),second:I.get("second")});return y&&M.add(parseInt(w,10),S),D?M.format(D.substring(1).trim()):M.format(r)}).replace(/{{\s*date\s*}}/gi,l).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,l));return window.app.foldManager.save(f,i),f}catch(f){console.error(`Failed to create file: '${c}'`,f),new Tr.Notice("Unable to create new file.")}}function m7(e,t){return t[Ws(e,"quarter")]??null}function g7(){const e={};if(!tA())return e;const{vault:t}=window.app,{folder:n}=Ev(),r=t.getAbstractFileByPath(Tr.normalizePath(n));if(!r)throw new h7("Failed to find quarterly notes folder");return Tr.Vault.recurseChildren(r,a=>{if(a instanceof Tr.TFile){const o=Op(a,"quarter");if(o){const i=Ws(o,"quarter");e[i]=a}}}),e}class v7 extends Error{}async function y7(e){const{vault:t}=window.app,{template:n,format:r,folder:a}=Cv(),[o,i]=await Fp(n),l=e.format(r),c=await xv(a,l);try{const f=await t.create(c,o.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(h,g,y,w,S,D)=>{const I=window.moment(),M=e.clone().set({hour:I.get("hour"),minute:I.get("minute"),second:I.get("second")});return y&&M.add(parseInt(w,10),S),D?M.format(D.substring(1).trim()):M.format(r)}).replace(/{{\s*date\s*}}/gi,l).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,l));return window.app.foldManager.save(f,i),f}catch(f){console.error(`Failed to create file: '${c}'`,f),new Tr.Notice("Unable to create new file.")}}function w7(e,t){return t[Ws(e,"year")]??null}function b7(){const e={};if(!nA())return e;const{vault:t}=window.app,{folder:n}=Cv(),r=t.getAbstractFileByPath(Tr.normalizePath(n));if(!r)throw new v7("Failed to find yearly notes folder");return Tr.Vault.recurseChildren(r,a=>{if(a instanceof Tr.TFile){const o=Op(a,"year");if(o){const i=Ws(o,"year");e[i]=a}}}),e}function S7(){var r,a;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&&((a=(r=n.settings)==null?void 0:r.daily)==null?void 0:a.enabled)}function XN(){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 eA(){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 tA(){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 nA(){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 D7(e){const t={day:Dv,week:Tv,month:Iv,quarter:Ev,year:Cv}[e];return t()}function T7(e,t){return{day:JN,month:QN,week:KN}[e](t)}vn.DEFAULT_DAILY_NOTE_FORMAT=oT;vn.DEFAULT_MONTHLY_NOTE_FORMAT=VN;vn.DEFAULT_QUARTERLY_NOTE_FORMAT=WN;vn.DEFAULT_WEEKLY_NOTE_FORMAT=iT;vn.DEFAULT_YEARLY_NOTE_FORMAT=$N;var qg=vn.appHasDailyNotesPluginLoaded=S7;vn.appHasMonthlyNotesPluginLoaded=eA;vn.appHasQuarterlyNotesPluginLoaded=tA;vn.appHasWeeklyNotesPluginLoaded=XN;vn.appHasYearlyNotesPluginLoaded=nA;var rA=vn.createDailyNote=JN;vn.createMonthlyNote=QN;vn.createPeriodicNote=T7;vn.createQuarterlyNote=p7;vn.createWeeklyNote=KN;vn.createYearlyNote=y7;var qu=vn.getAllDailyNotes=a7;vn.getAllMonthlyNotes=f7;vn.getAllQuarterlyNotes=g7;vn.getAllWeeklyNotes=u7;vn.getAllYearlyNotes=b7;var fb=vn.getDailyNote=r7,Gc=vn.getDailyNoteSettings=Dv,cp=vn.getDateFromFile=Op;vn.getDateFromPath=t7;vn.getDateUID=Ws;vn.getMonthlyNote=d7;vn.getMonthlyNoteSettings=Iv;vn.getPeriodicNoteSettings=D7;vn.getQuarterlyNote=m7;vn.getQuarterlyNoteSettings=Ev;vn.getTemplateInfo=Fp;vn.getWeeklyNote=l7;vn.getWeeklyNoteSettings=Tv;vn.getYearlyNote=w7;vn.getYearlyNoteSettings=Cv;const I7={},E7={},C7={},x7={},aA={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",PATH:"PATH",METADATA:"METADATA",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 Home","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","Submit issue":"Submit issue","Current version":"Current version","Bug report":"Bug report","Click the button to copy debug info and open the issue page":"Click the button to copy debug info and open the issue page","Copy and go":"Copy and go","Debug info copied":"Debug info copied","Feature request":"Feature request","Submit your feature request to the issue page":"Submit your feature request to the issue page",Go:"Go","Toggle query list visibility":"Toggle query list visibility","Toggle tags visibility":"Toggle tags visibility","Toggle sidebar visibility":"Toggle sidebar visibility",Collapse:"Collapse",Expand:"Expand","Max height for collapse":"Max height for collapse","The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)":"The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)","Render content":"Render content","Optimize for Callout":"Optimize for Callout","Won't render content contains more than 3 callouts automatically. True by default":"Won't render content contains more than 3 callouts automatically. True by default","The value should be greater than":"The value should be greater than","Append Text":"Append Text","Prepend Text":"Prepend Text","Thino height when collapsed":"Thino height when collapsed","The height for thino when it is collapsed, when set 0, thino would not collapse. 100 by default. (This is not lines count, it is height in px.)":"The height for thino when it is collapsed, when set 0, thino would not collapse . 100 by default. (This is not lines count, it is height in px.)","This option will allow you use other views when leaf width is not enough. False by default.":"This option will allow you use other views when leaf width is not enough. False by default.","Can select other views when leaf width is not enough":"Can select other views when leaf width is not enough","TRASH BOX":"TRASH BOX","Wait templater to finish parse before insert thino":"Wait templater to finish parse before insert thino","This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.":"This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.","Get thino capture extension":"Get thino capture extension","You can capture idea/text from chrome now.":"You can capture idea/text from chrome now.","Open File":"Open File","Exported CSV file":"Exported CSV file","Updated At":"Updated At","Export to CSV":"Export to CSV","Quick add button on mobile navbar":"Quick add button on mobile navbar","Always show status text":"Always show status text","Support filter by metadata from file":"Support filter by metadata from file","When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.":"When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.","Show source near timestamp in thino":"Show source near timestamp in thino","When enable this, you can see the source near timestamp in thino. Only available for Thino from FILE. You can set title in metadata to overwrite this. False by default.":"When enable this, you can see the source near timestamp in thino. Only available for Thino from FILE. You can set title in metadata to overwrite this. False by default.","Show Update Message":"Show Update Message","Show update message when Thino is updated. True by default":"Show update message when Thino is updated. True by default"},M7={},k7={},N7={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"},A7={},F7={},O7={},P7={},j7={},L7={},R7={},_7={},B7={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"},H7={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"},Y7={},U7={},z7={},V7={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:"选择",PATH:"路径",METADATA:"元数据","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":"输入高度","Submit issue":"提交问题","Current version":"当前版本","Bug report":"Bug 报告","Click the button to copy debug info and open the issue page":"点击按钮复制调试信息并打开问题页面","Copy and go":"复制并前往","Debug info copied":"调试信息已复制","Feature request":"功能请求","Submit your feature request to the issue page":"提交你的功能请求到问题页面",Go:"前往","Toggle query list visibility":"切换 Query 列表可见性","Toggle tags visibility":"切换标签可见性","Toggle sidebar visibility":"切换侧边栏可见性",Collapse:"收起",Expand:"展开","Max height for collapse":"折叠的最大高度","The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)":"Thino 折叠的最大高度,设置为 0 时,Thino 不会折叠。默认为 0。(这不是行数,而是像素高度值)","Render content":"渲染内容","Optimize for Callout":"优化 Callout 渲染性能问题","Won't render content contains more than 3 callouts automatically. True by default":"不会自动渲染包含超过 3 个 Callout 的内容。默认为开启","The value should be greater than":"值应大于","Append Text":"后置文本","Prepend Text":"前置文本","Thino height when collapsed":"Thino 折叠时的高度","The height for thino when it is collapsed, when set 0, thino would not collapse. 100 by default. (This is not lines count, it is height in px.)":"Thino 折叠时的高度,当设置为 0 时,完全折叠。默认为 100。(这不是行数,而是像素高度值)","This option will allow you use other views when leaf width is not enough. False by default.":"当页面宽度不够时,可以选择其他视图。默认为关闭。","Can select other views when leaf width is not enough":"当页面宽度不够时,可以选择其他视图","TRASH BOX":"回收站","Wait templater to finish parse before insert thino":"在插入 Thino 之前等待 Templater 完成解析","This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.":"此选项将允许您在插入 Thino 之前等待 Templater 完成解析,这可能会导致您在插入 Thino 之间需要确认两次。默认为关闭。","Get thino capture extension":"获取 Thino 剪裁扩展","You can capture idea/text from chrome now.":"你现在可以从 Chrome 中捕获想法/文本。","Open File":"打开文件","Exported CSV file":"导出的 CSV 文件","Updated At":"更新于","Export to CSV":"导出为 CSV","Quick add button on mobile navbar":"移动端导航栏的快速添加按钮","Always show status text":"始终显示状态文本","Support filter by metadata from file":"支持通过文件中的元数据进行筛选","When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.":"启用后,你可以通过文件中的元数据进行筛选,例如文件中的标签。但画布中的 Thino 不支持。默认为关闭。","Show source near timestamp in thino":"在 Thino 时间戳旁显示 Thino 的来源","When enable this, you can see the source near timestamp in thino. Only available for Thino from FILE. You can set title in metadata to overwrite this. False by default.":"启用后,你可以在 Thino 时间戳旁看到 Thino 的来源。仅适用于来自单文件的 Thino。你可以在元数据中设置 title 来覆盖文件名。默认为关闭。","Show Update Message":"显示更新消息","Show update message when Thino is updated. True by default":"Thino 更新时显示更新消息。默认为开启"},W7={},$7={ar:I7,cs:E7,da:C7,de:x7,en:aA,"en-gb":M7,es:k7,fr:N7,hi:A7,id:F7,it:O7,ja:P7,ko:j7,nl:L7,nn:R7,pl:_7,pt:B7,"pt-br":H7,ro:Y7,ru:U7,tr:z7,"zh-cn":V7,"zh-tw":W7},xC=$7[x.moment.locale()];function E(e){const t=xC&&xC[e]||aA[e];return t===null?t:t||e}const Z7=/```([\s\S]*?)```/g,q7=/\*\*(.+?)\*\*/g,G7=/\*(.+?)\*/g,J7=/\[ \] /g,K7=/\[.{1}\] /g,Q7=/^[*-]/g,X7=/(\d+)\. /g,MC=/\[\[([^\]]+)\]\]/g,sT=/\[([^\]]+)\]\((([^\]]+).md)\)/g,eR=(e,t)=>{const n=e.replace(Z7,"
$1
").replace(Q7,"").replace(X7,"$1.").replace(J7,"").replace(K7,"").replace(q7,"$1").replace(G7,"$1").replace(/<br>/g,"

").replace(/&/g,"&");let r=n;if(t){if(MC.test(n)){const a=n.match(MC);for(let o=0;o{const{metadataCache:n}=Le.getState().dailyNotesState.app;return n.getFirstLinkpathDest(decodeURIComponent(e),"")instanceof x.TFile?t?`${t}`:`${e}`:t?`${t}`:`${e}`},tR=e=>{var t;return(t=/\[\[([^\]]+)\]\]/g.exec(e))==null?void 0:t[1]},nR=e=>{var t;return(t=sT.exec(e))==null?void 0:t[1]},rR=e=>{var t;return(t=/\[([^\]]+)\]\((([^\]]+).md)\)/g.exec(e))==null?void 0:t[3]},kC=e=>{const t=document.createElement("div");return t.className="memo-content-text",t.innerHTML=e,t.innerText},aR=e=>e.replace(/\n/g,"
"),oR=e=>{const t=document.createElement("div");return t.textContent=e,t.innerHTML},NC="mobile-show-sidebar",oA=200,ei=3600*24*1e3,$r=/\s#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/g,Wa=/(

|
)#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/g,ua=/^#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/gu,Mf=/(\s|:|\(|>|^)((http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-]))/g,iR=/\[([\s\S]*?)\]\(([\s\S]*?)\)/gu,kf=/([^\s<\\*>'(]+\.(jpeg|jpg|gif|png|svg))(\]\])?(\))?/g,rd=/\[@(.+?)\]\((.+?)\)/g,sR=/[#*"\/\\<>:|\[\]\?]/gim,lR=/^(-|\*|\d\.)\s(\[.\]\s)?(\d{1,2}:\d{2}(:\d{2})?)\s(.*)/g,Gg=[{title:"DAILY",icon:"list"},{title:"CANVAS",icon:"layout-dashboard"},{title:"MULTI",icon:"file-text"},{title:"FILE",icon:"edit"}];var lT;(e=>{function t(){return parseInt(x.moment().format("x"))}e.getNowTimeStamp=t;function n(V){const Y=/'’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,Z=/\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5/.source,Q=/[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5]{1}/.source,K=new RegExp([`(?:[0-9]+(?:(?:,|\\.)[0-9]+)*|[\\-${Y}])+`,Z,Q].join("|"),"g");return(V.match(K)||[]).length}e.getWordCount=n;function r(V){qg()&&(V!=null&&V.EnabledLocationList.some(Y=>Y.value==="DAILY"))&&(V!=null&&V.EnabledLocationList.some(Y=>Y.value==="MULTI"))&&hb().contains(V==null?void 0:V.MemoOtherSaveLocation.MemoDefaultMultiFilePath)&&new x.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 a(){const V=navigator.userAgent;let Y="Unknown";return V.indexOf("Win")!=-1?Y="Windows":V.indexOf("Mac")!=-1?Y="MacOS":V.indexOf("Linux")!=-1&&(Y="Linux"),Y}e.getOSVersion=a;function o(V){return typeof V=="string"&&(V=V.replaceAll("-","/")),new Date(V).getTime()}e.getTimeStampByDate=o;function i(V){const Y=new Date(o(V));return new Date(Y.getFullYear(),Y.getMonth(),Y.getDate()).getTime()}e.getDateStampByDate=i;function l(V){const Y=new Date(o(V)),Z=Y.getFullYear(),Q=Y.getMonth()+1,K=Y.getDate();return`${Z}/${Q}/${K}`}e.getDateString=l;function c(V){const Y=new Date(o(V)),Z=Y.getHours(),Q=Y.getMinutes(),K=Z<10?"0"+Z:Z,se=Q<10?"0"+Q:Q;return`${K}:${se}`}e.getTimeString=c;function f(V){const Y=new Date(o(V)),Z=Y.getFullYear(),Q=Y.getMonth()+1,K=Y.getDate(),se=Y.getHours(),le=Y.getMinutes(),fe=Y.getSeconds(),$=Q<10?"0"+Q:Q,he=K<10?"0"+K:K,ie=se<10?"0"+se:se,ce=le<10?"0"+le:le,X=fe<10?"0"+fe:fe;return`${Z}/${$}/${he} ${ie}:${ce}:${X}`}e.getDateTimeString=f;function h(V){return Array.from(new Set(V))}e.dedupe=h;function g(V){const Y=new Set,Z=[];for(const Q of V)Y.has(Q.id)||(Y.add(Q.id),Z.push(Q));return Z}e.dedupeObjectWithId=g;function y(V,Y){let Z=null;return()=>{Z&&clearTimeout(Z),Z=setTimeout(V,Y)}}e.debounce=y;function w(V,Y,Z=!1,Q){let K=null,se=!1;function le(...fe){if(K&&clearTimeout(K),Z&&!se){const $=V.apply(this,fe);Q&&typeof Q=="function"&&Q($),se=!0}else K=setTimeout(()=>{const $=V.apply(this,fe);Q&&typeof Q=="function"&&Q($),se=!1,K=null},Y)}return le.cancel=function(){K&&clearTimeout(K),K=null,se=!1},le}e.debouncePlus=w;function S(V,Y){let Z=!0;return()=>{if(!Z)return!1;Z=!1,setTimeout(()=>{V(),Z=!0},Y)}}e.throttle=S;function D(V){const Y=[],Z=Object.keys(V).sort();for(const Q of Z){const K=V[Q];K&&(typeof K=="object"?Y.push(...D(K).split("&")):Y.push(`${Q}=${K}`))}return Y.join("&")}e.transformObjectToParamsString=D;function I(V){const Y={},Z=V.split("&");for(const Q of Z){const[K,se]=Q.split("=");K&&se&&(Y[K]=se)}return Y}e.transformParamsStringToObject=I;function M(V){if(!V)return{};const Y={},Z=Object.keys(V).sort();for(const Q of Z){const K=V[Q];if(typeof K=="object"){const se=M(JSON.parse(JSON.stringify(K)));se&&Object.keys(se).length>0&&(Y[Q]=se)}else K&&(Y[Q]=K)}return Y}e.filterObjectNullKeys=M;async function N(V){if(navigator.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(V)}catch(Y){console.warn("Copy to clipboard failed.",Y)}else console.warn("Copy to clipboard failed, methods not supports.")}e.copyTextToClipboard=N;function R(V){return new Promise(Y=>{const Z=new Image;Z.onload=()=>{const{width:Q,height:K}=Z;Q>0&&K>0?Y({width:Q,height:K}):Y({width:0,height:0})},Z.onerror=()=>{Y({width:0,height:0})},Z.className="hidden",Z.src=V,document.body.appendChild(Z),Z.remove()})}e.getImageSize=R;async function k(V){var K,se,le,fe;let Y;const Q=app.plugins.getPlugin("obsidian-memos").settings.UseDailyOrPeriodic==="Daily";try{return!Q&&((fe=(le=(se=(K=window.app.plugins)==null?void 0:K.getPlugin("periodic-notes"))==null?void 0:se.calendarSetManager)==null?void 0:le.getActiveConfig("day"))!=null&&fe.enabled)?(Y=await window.app.plugins.getPlugin("periodic-notes").createPeriodicNote("day",V),Y):(Y=await app.internalPlugins.getPluginById("daily-notes").instance.getDailyNote(V)||await rA(V),Y)}catch($){return console.error($),new x.Notice(E("Failed to create daily note. Please check if you created a folder for daily notes.")),null}}e.createDailyNoteCheck=k;function B(V){const Y=[];let Z=0;for(;Z").map(a=>`

${a!==""?a:"
"}

`).join(""),e=eR(e,t),e=e.replace($r,"#$1").replace(Wa,"

#$2").replace(Mf,"$1$2").replace(iR,"$1").replace(rd,"$1").replace(/\^\S{6}/g,"");const n=document.createElement("div");n.innerHTML=e;for(let a=0;a{const n=window.atob(e),r=new ArrayBuffer(n.length),a=new Uint8Array(r);for(let o=0;otypeof t[n]=="object"&&t[n]!==null&&typeof e[n]=="object"&&e[n]!==null?iA(e[n],t[n]):Object.prototype.hasOwnProperty.call(e,n)&&e[n]===t[n])}function dR(e,t){switch(t.type){case"SET_MEMOS":{const n=t.payload.memos.sort((a,o)=>{const i=ut.getTimeStampByDate(a.createdAt),l=ut.getTimeStampByDate(o.createdAt);return i===l?o.id.localeCompare(a.id):ut.getTimeStampByDate(o.createdAt)-ut.getTimeStampByDate(a.createdAt)}),r=ut.dedupeObjectWithId(n);return{...e,memos:[...r]}}case"SET_COMMENT_MEMOS":{const n=ut.dedupeObjectWithId(t.payload.commentMemos.sort((r,a)=>ut.getTimeStampByDate(a.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,a)=>ut.getTimeStampByDate(a.createdAt)-ut.getTimeStampByDate(r.createdAt)));return{...e,memos:n}}case"INSERT_COMMENT_MEMO":{const n=ut.dedupeObjectWithId([t.payload.memo,...e.commentMemos].sort((r,a)=>ut.getTimeStampByDate(a.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(a=>a.id===r),1)}),{...e,memos:[...n]}}case"REPLACE_MEMO_BY_ID":{const n=e.memos.map(r=>r.id===t.payload.id?t.payload.memo:r);return{...e,memos:[...n]}}case"REMOVE_PREPARE_UPDATE_THINO":return{...e,preparingUpdateMemo:[]};case"REMOVE_PARTICULAR_PREPARE_UPDATE_THINO":return{...e,preparingUpdateMemo:e.preparingUpdateMemo.filter(n=>n.id!==t.payload.id)};case"SET_WAITING_FOR_TEMPLATER":return{...e,preparingUpdateMemo:[...e.preparingUpdateMemo,{origin:t.payload.origin,date:t.payload.date,isList:t.payload.isList,id:t.payload.id,type:t.payload.type}]};case"CLEAR_MEMOS":return{...sA};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(a=>a.path!==t.payload.path),r=ut.dedupeObjectWithId([...t.payload.memos,...n].sort((a,o)=>ut.getTimeStampByDate(o.createdAt)-ut.getTimeStampByDate(a.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(a=>a.id===r.id)?{...r,...t.payload.filter(a=>a.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 sA={memos:[],commentMemos:[],tags:[],tagsNum:{},preparingUpdateMemo:[]};function fR(e,t){switch(t.type){case"SIGN_IN":return{user:t.payload.user};case"SIGN_OUT":return{user:null};default:return e}}const hR={user:null};function pR(e,t){switch(t.type){case"SET_QUERIES":{const n=ut.dedupeObjectWithId(t.payload.queries.sort((r,a)=>ut.getTimeStampByDate(a.createdAt)-ut.getTimeStampByDate(r.createdAt)).sort((r,a)=>ut.getTimeStampByDate(a.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,a)=>ut.getTimeStampByDate(a.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 mR={queries:[]};function gR(e,t){var n,r,a,o;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)===((o=(a=t.payload.view)==null?void 0:a.leaf)==null?void 0:o.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 vR={dailyNotes:null,app:null,view:null,settings:null,editor:null,plugin:null,verifyState:null},Le=qL({globalState:JL,locationState:zN,memoState:sA,userState:hR,queryState:mR,dailyNotesState:vR},ZL({globalState:GL,locationState:KL,memoState:dR,userState:fR,queryState:pR,dailyNotesState:gR})),Lt=P.createContext(Le.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 yR{constructor(){Se(this,"initialized",!1)}getState(){return Le.getState().dailyNotesState}setApp(t){return Le.dispatch({type:"SET_APP",payload:{app:t}}),t}setPlugin(t){return Le.dispatch({type:"SET_PLUGIN",payload:{plugin:t}}),t}setSettings(t){return Le.dispatch({type:"SET_SETTINGS",payload:{settings:t}}),this.initialized||(this.initialized=!0),t}setView(t){return Le.dispatch({type:"SET_VIEW",payload:{view:t}}),t}setEditor(t){return Le.dispatch({type:"SET_EDITOR",payload:{editor:t}}),t}async updateDailyNotes(t,n){const r=this.getState().dailyNotes,a=cp(t,"day");return n?delete r[`day-${a.format("YYYY-MM-DD")}T00:00:00+08:00}`]:r[`day-${a.format("YYYY-MM-DD")}T00:00:00+08:00}`]=t,Le.dispatch({type:"SET_DAILY_NOTES",payload:{dailyNotes:r}}),r}setVerifyState(t){return Le.dispatch({type:"SET_VERIFY_STATE",payload:{verifyState:t}}),t}async fechLocalDailyNotes(){try{const t=qu();return Le.dispatch({type:"SET_DAILY_NOTES",payload:{dailyNotes:t}}),t}catch(t){console.error(t)}}}const ft=new yR;var la;(e=>{function t(o){const i={};for(const l of o)try{const c=localStorage.getItem(l);if(c!==null){const f=JSON.parse(c);i[l]=f}}catch(c){console.error("Get storage failed in ",l,c)}return i}e.get=t;function n(o){for(const i in o)try{const l=JSON.stringify(o[i]);localStorage.setItem(i,l)}catch(l){console.error("Save storage failed in ",i,l)}}e.set=n;function r(o){for(const i of o)try{localStorage.removeItem(i)}catch(l){console.error("Remove storage failed in ",i,l)}}e.remove=r;function a(){var i;const o=document.createElement("iframe");o.style.display="none",document.body.appendChild(o),(i=o.contentWindow)==null||i.localStorage.setItem("t",Date.now().toString()),o.remove()}e.emitStorageChangedEvent=a})(la||(la={}));class wR{constructor(){Se(this,"getState",()=>Le.getState().globalState);Se(this,"setEditMemoId",t=>{Le.dispatch({type:"SET_EDIT_MEMO_ID",payload:{editMemoId:t}})});Se(this,"setRefresh",t=>{Le.dispatch({type:"SET_REFRESH",payload:{refresh:t}})});Se(this,"setCommentMemoId",t=>{Le.dispatch({type:"SET_COMMENT_MEMO_ID",payload:{commentMemoId:t}})});Se(this,"setMarkMemoId",t=>{Le.dispatch({type:"SET_MARK_MEMO_ID",payload:{markMemoId:t}})});Se(this,"setLoaded",t=>{Le.dispatch({type:"SET_LOADED",payload:{loaded:t}})});Se(this,"setGlobalEditorShown",t=>{Le.dispatch({type:"SET_GLOBAL_EDITOR_SHOWN",payload:{globalEditorShown:t}})});Se(this,"setIsMobileView",t=>{Le.dispatch({type:"SET_MOBILE_VIEW",payload:{isMobileView:t}})});Se(this,"setChangedByMemos",t=>{Le.dispatch({type:"SET_CHANGED_BY_MEMOS",payload:{changedByMemos:t}})});Se(this,"setShowSiderbarInMobileView",t=>{Le.dispatch({type:"SET_SHOW_SIDEBAR_IN_MOBILE_VIEW",payload:{showSiderbarInMobileView:t}})});Se(this,"setAppSetting",t=>{Le.dispatch({type:"SET_APP_SETTING",payload:t}),la.set(t)});Se(this,"setMemoListView",t=>{Le.dispatch({type:"SET_MEMO_LIST_VIEW",payload:{memoListView:t}})});Se(this,"setInstance",(t,n)=>{Le.dispatch({type:"SET_INSTANCE",payload:{id:t,instance:n}})});Se(this,"setLocked",t=>{Le.dispatch({type:"SET_LOCKED",payload:{locked:t}})});Se(this,"setExitSteps",t=>{Le.dispatch({type:"SET_EXIT_STEPS",payload:{exited:t}})});Se(this,"setPluginManifest",t=>{Le.dispatch({type:"SET_MEMO_PLUGIN_MANIFEST",payload:{manifest:t}})});const t=la.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 wR;class bR{constructor(){Se(this,"updateStateWithLocation",()=>{const{pathname:t,search:n,hash:r}=window.location,a=new URLSearchParams(n),o={pathname:"/",hash:"",query:{tag:"",duration:null,text:"",type:"",filter:""}};o.query.tag=a.get("tag")||"",o.query.type=a.get("type")??"",o.query.text=a.get("text")??"",o.query.filter=a.get("filter")??"";const i=parseInt(a.get("from")??"0"),l=parseInt(a.get("to")??"0");l>i&&l!==0&&(o.query.duration={from:i,to:l}),o.hash=r,o.pathname=this.getValidPathname(t),Le.dispatch({type:"SET_LOCATION",payload:o})});Se(this,"getState",()=>Le.getState().locationState);Se(this,"clearQuery",()=>{Le.dispatch({type:"SET_QUERY",payload:{tag:"",duration:null,text:"",type:"",filter:""}})});Se(this,"setQuery",t=>{Le.dispatch({type:"SET_QUERY",payload:t})});Se(this,"reloadApp",()=>{Le.dispatch({type:"RELOAD"})});Se(this,"setHash",t=>{Le.dispatch({type:"SET_HASH",payload:{hash:t}})});Se(this,"setPathname",t=>{Le.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})});Se(this,"pushHistory",t=>{Le.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})});Se(this,"replaceHistory",t=>{Le.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})});Se(this,"setMemoTypeQuery",(t="")=>{Le.dispatch({type:"SET_TYPE",payload:{type:t}})});Se(this,"setMemoFilter",t=>{Le.dispatch({type:"SET_QUERY_FILTER",payload:t})});Se(this,"setTextQuery",t=>{Le.dispatch({type:"SET_TEXT",payload:{text:t}})});Se(this,"setTimeQuery",t=>{Le.dispatch({type:"SET_DURATION_QUERY",payload:{duration:t}})});Se(this,"setPathQuery",t=>{Le.dispatch({type:"SET_PATH_QUERY",payload:{path:t}})});Se(this,"setMetadataQuery",(t,n)=>{Le.dispatch({type:"SET_METADATA_QUERY",payload:{name:t,value:n}})});Se(this,"setTagQuery",t=>{Le.dispatch({type:"SET_TAG_QUERY",payload:{tag:t}})});Se(this,"setFromAndToQuery",(t,n)=>{Le.dispatch({type:"SET_DURATION_QUERY",payload:{duration:{from:t,to:n}}})});Se(this,"getValidPathname",t=>["/","/homeboard","/recycle","/setting"].includes(t)?t:"/");this.updateStateWithLocation(),window.onpopstate=()=>{this.updateStateWithLocation()}}}const at=new bR,cf=e=>`${e.vault.configDir}/query.json`,lA=async(e,t)=>{try{return await e.vault.adapter.read(t),!0}catch(n){return console.error(n),!1}},Pp=async e=>(await lA(e,cf(e))||await uA(e),JSON.parse(await e.vault.adapter.read(cf(e))).queries||[]),Mv=async(e,t)=>{await e.vault.adapter.write(cf(e),JSON.stringify({queries:t},null,2))},uA=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(cf(e),JSON.stringify({queries:[]},null,2));else{const o=(await e.vault.read(r)).split(` `);o.length===0&&await e.vault.adapter.write(cf(e),JSON.stringify({queries:[]},null,2));const i=[];for(let l=0;l{const{app:e}=Le.getState().dailyNotesState;return await lA(e,cf(e))||await uA(e),await Pp(e)||[]},DR=(e,t)=>({createdAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),id:e,pinnedAt:"",querystring:t,title:E("Temp Filter"),updatedAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),userId:"Thino"}),TR=async(e,t)=>{const n=await Pp(Le.getState().dailyNotesState.app)||[],r={createdAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),id:x.moment().format("YYYYMMDDHHmmss")+n.length,pinnedAt:"",querystring:t,title:e,updatedAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),userId:"Thino"};return n.push(r),await Mv(Le.getState().dailyNotesState.app,n),r};var Tw={exports:{}};Tw.exports;(function(e,t){(function(){var n,r="4.17.21",a=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",g=1,y=2,w=4,S=1,D=2,I=1,M=2,N=4,R=8,k=16,B=32,L=64,_=128,V=256,Y=512,Z=30,Q="...",K=800,se=16,le=1,fe=2,$=3,he=1/0,ie=9007199254740991,ce=17976931348623157e292,X=NaN,ae=4294967295,De=ae-1,je=ae>>>1,Re=[["ary",_],["bind",I],["bindKey",M],["curry",R],["curryRight",k],["flip",Y],["partial",B],["partialRight",L],["rearg",V]],Fe="[object Arguments]",Be="[object Array]",Xe="[object AsyncFunction]",Ze="[object Boolean]",st="[object Date]",Ct="[object DOMException]",tn="[object Error]",_e="[object Function]",et="[object GeneratorFunction]",nt="[object Map]",ht="[object Number]",St="[object Null]",Tt="[object Object]",Gt="[object Promise]",_t="[object Proxy]",Vt="[object RegExp]",Xt="[object Set]",dn="[object String]",en="[object Symbol]",Zn="[object Undefined]",kn="[object WeakMap]",Er="[object WeakSet]",pt="[object ArrayBuffer]",Mt="[object DataView]",Jt="[object Float32Array]",sn="[object Float64Array]",ln="[object Int8Array]",vr="[object Int16Array]",fr="[object Int32Array]",ha="[object Uint8Array]",jr="[object Uint8ClampedArray]",nr="[object Uint16Array]",Lr="[object Uint32Array]",te=/\b__p \+= '';/g,me=/\b(__p \+=) '' \+/g,xe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ye=/&(?:amp|lt|gt|quot|#39);/g,He=/[&<>"']/g,Qe=RegExp(Ye.source),tt=RegExp(He.source),kt=/<%-([\s\S]+?)%>/g,Yt=/<%([\s\S]+?)%>/g,On=/<%=([\s\S]+?)%>/g,yn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Cr=/^\w*$/,Jn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yr=/[\\^$.*+?()[\]{}|]/g,ta=RegExp(yr.source),Pi=/^\s+/,Nn=/\s/,Aa=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Fa=/\{\n\/\* \[wrapped with (.+)\] \*/,Zr=/,? & /,fo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Oa=/[()=,{}\[\]\/\s]/,au=/\\(\\)?/g,si=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,li=/\w*$/,ec=/^[-+]0x[0-9a-f]+$/i,ou=/^0b[01]+$/i,us=/^\[object .+?Constructor\]$/,ji=/^0o[0-7]+$/i,cs=/^(?:0|[1-9]\d*)$/,iu=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ds=/($^)/,tc=/['\n\r\u2028\u2029\\]/g,An="\\ud800-\\udfff",na="\\u0300-\\u036f",qs="\\ufe20-\\ufe2f",Gs="\\u20d0-\\u20ff",ui=na+qs+Gs,su="\\u2700-\\u27bf",Fo="a-z\\xdf-\\xf6\\xf8-\\xff",ho="\\xac\\xb1\\xd7\\xf7",Pa="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",fs="\\u2000-\\u206f",Rr=" \\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",Js="A-Z\\xc0-\\xd6\\xd8-\\xde",Ks="\\ufe0e\\ufe0f",Qs=ho+Pa+fs+Rr,po="['’]",hs="["+An+"]",ci="["+Qs+"]",mo="["+ui+"]",A="\\d+",U="["+su+"]",J="["+Fo+"]",oe="[^"+An+Qs+A+su+Fo+Js+"]",Ne="\\ud83c[\\udffb-\\udfff]",Ie="(?:"+mo+"|"+Ne+")",Ue="[^"+An+"]",it="(?:\\ud83c[\\udde6-\\uddff]){2}",ct="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+Js+"]",$t="\\u200d",Pn="(?:"+J+"|"+oe+")",Ga="(?:"+Ft+"|"+oe+")",ja="(?:"+po+"(?:d|ll|m|re|s|t|ve))?",ra="(?:"+po+"(?:D|LL|M|RE|S|T|VE))?",Oo=Ie+"?",La="["+Ks+"]?",Ja="(?:"+$t+"(?:"+[Ue,it,ct].join("|")+")"+La+Oo+")*",pa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",go="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ra=La+Oo+Ja,Li="(?:"+[U,it,ct].join("|")+")"+Ra,Ri="(?:"+[Ue+mo+"?",mo,it,ct,hs].join("|")+")",um=RegExp(po,"g"),Lf=RegExp(mo,"g"),ps=RegExp(Ne+"(?="+Ne+")|"+Ri+Ra,"g"),cm=RegExp([Ft+"?"+J+"+"+ja+"(?="+[ci,Ft,"$"].join("|")+")",Ga+"+"+ra+"(?="+[ci,Ft+Pn,"$"].join("|")+")",Ft+"?"+Pn+"+"+ja,Ft+"+"+ra,go,pa,A,Li].join("|"),"g"),Po=RegExp("["+$t+An+ui+Ks+"]"),Xs=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,lu=["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"],Bn=-1,hn={};hn[Jt]=hn[sn]=hn[ln]=hn[vr]=hn[fr]=hn[ha]=hn[jr]=hn[nr]=hn[Lr]=!0,hn[Fe]=hn[Be]=hn[pt]=hn[Ze]=hn[Mt]=hn[st]=hn[tn]=hn[_e]=hn[nt]=hn[ht]=hn[Tt]=hn[Vt]=hn[Xt]=hn[dn]=hn[kn]=!1;var pn={};pn[Fe]=pn[Be]=pn[pt]=pn[Mt]=pn[Ze]=pn[st]=pn[Jt]=pn[sn]=pn[ln]=pn[vr]=pn[fr]=pn[nt]=pn[ht]=pn[Tt]=pn[Vt]=pn[Xt]=pn[dn]=pn[en]=pn[ha]=pn[jr]=pn[nr]=pn[Lr]=!0,pn[tn]=pn[_e]=pn[kn]=!1;var jo={À:"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"},vo={"&":"&","<":"<",">":">",'"':""","'":"'"},nc={"&":"&","<":"<",">":">",""":'"',"'":"'"},ms={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},rc=parseFloat,el=parseInt,tl=typeof dr=="object"&&dr&&dr.Object===Object&&dr,dd=typeof self=="object"&&self&&self.Object===Object&&self,zn=tl||dd||Function("return this")(),nl=t&&!t.nodeType&&t,Lo=nl&&!0&&e&&!e.nodeType&&e,fd=Lo&&Lo.exports===nl,di=fd&&tl.process,qr=function(){try{var we=Lo&&Lo.require&&Lo.require("util").types;return we||di&&di.binding&&di.binding("util")}catch{}}(),rl=qr&&qr.isArrayBuffer,Gr=qr&&qr.isDate,gs=qr&&qr.isMap,_i=qr&&qr.isRegExp,al=qr&&qr.isSet,ac=qr&&qr.isTypedArray;function xr(we,ze,Oe){switch(Oe.length){case 0:return we.call(ze);case 1:return we.call(ze,Oe[0]);case 2:return we.call(ze,Oe[0],Oe[1]);case 3:return we.call(ze,Oe[0],Oe[1],Oe[2])}return we.apply(ze,Oe)}function vs(we,ze,Oe,vt){for(var Qt=-1,Dn=we==null?0:we.length;++Qt-1}function aa(we,ze,Oe){for(var vt=-1,Qt=we==null?0:we.length;++vt-1;);return Oe}function oa(we,ze){for(var Oe=we.length;Oe--&&ys(ze,we[Oe],0)>-1;);return Oe}function Ka(we,ze){for(var Oe=we.length,vt=0;Oe--;)we[Oe]===ze&&++vt;return vt}var Qa=H(jo),fu=H(vo);function gd(we){return"\\"+ms[we]}function Bi(we,ze){return we==null?n:we[ze]}function uc(we){return Po.test(we)}function F1(we){return Xs.test(we)}function O1(we){for(var ze,Oe=[];!(ze=we.next()).done;)Oe.push(ze.value);return Oe}function Bf(we){var ze=-1,Oe=Array(we.size);return we.forEach(function(vt,Qt){Oe[++ze]=[Qt,vt]}),Oe}function dm(we,ze){return function(Oe){return we(ze(Oe))}}function _o(we,ze){for(var Oe=-1,vt=we.length,Qt=0,Dn=[];++Oe-1}function Cy(d,p){var T=this.__data__,j=wa(T,d);return j<0?(++this.size,T.push([d,p])):T[j][1]=p,this}_a.prototype.clear=bc,_a.prototype.delete=to,_a.prototype.get=Xf,_a.prototype.has=Ey,_a.prototype.set=Cy;function Ho(d){var p=-1,T=d==null?0:d.length;for(this.clear();++p=p?d:p)),d}function no(d,p,T,j,z,ee){var de,ve=p&g,Te=p&y,We=p&w;if(T&&(de=z?T(d,j,z,ee):T(d)),de!==n)return de;if(!Sr(d))return d;var $e=an(d);if($e){if(de=Gy(d),!ve)return Ha(d,de)}else{var Je=Ta(d),mt=Je==_e||Je==et;if(_c(d))return Am(d,ve);if(Je==Tt||Je==Fe||mt&&!z){if(de=Te||mt?{}:Fc(d),!ve)return Te?Y1(d,pi(de,d)):By(d,Xn(de,d))}else{if(!pn[Je])return z?d:{};de=Ia(d,Je,ve)}}ee||(ee=new ya);var Nt=ee.get(d);if(Nt)return Nt;ee.set(d,de),cC(d)?d.forEach(function(zt){de.add(no(zt,p,T,zt,d,ee))}):lC(d)&&d.forEach(function(zt,mn){de.set(mn,no(zt,p,T,mn,d,ee))});var Ut=We?Te?Yd:Eh:Te?qo:Ca,cn=$e?n:Ut(d);return wr(cn||d,function(zt,mn){cn&&(mn=zt,zt=d[mn]),bu(de,mn,no(zt,p,T,mn,d,ee))}),de}function Ny(d){var p=Ca(d);return function(T){return Md(T,d,p)}}function Md(d,p,T){var j=T.length;if(d==null)return!j;for(d=Yn(d);j--;){var z=T[j],ee=p[z],de=d[z];if(de===n&&!(z in d)||!ee(de))return!1}return!0}function wm(d,p,T){if(typeof d!="function")throw new Bo(i);return Pc(function(){d.apply(n,T)},p)}function $i(d,p,T,j){var z=-1,ee=ol,de=!0,ve=d.length,Te=[],We=p.length;if(!ve)return Te;T&&(p=jn(p,It(T))),j?(ee=aa,de=!1):p.length>=a&&(ee=Rt,de=!1,p=new vu(p));e:for(;++zz?0:z+T),j=j===n||j>z?z:un(j),j<0&&(j+=z),j=T>j?0:fC(j);T0&&T(ve)?p>1?_r(ve,p-1,T,j,z):Ro(z,ve):j||(z[z.length]=ve)}return z}var kd=Lm(),oh=Lm(!0);function zo(d,p){return d&&kd(d,p,Ca)}function pl(d,p){return d&&oh(d,p,Ca)}function Ba(d,p){return fi(p,function(T){return Nu(d[T])})}function So(d,p){p=Is(p,d);for(var T=0,j=p.length;d!=null&&Tp}function ml(d,p){return d!=null&&Tn.call(d,p)}function bm(d,p){return d!=null&&p in Yn(d)}function Fy(d,p,T){return d>=ma(p,T)&&d=120&&$e.length>=120)?new vu(de&&$e):n}$e=d[0];var Je=-1,mt=ve[0];e:for(;++Je-1;)ve!==d&&$f.call(ve,Te,1),$f.call(d,Te,1);return d}function Od(d,p){for(var T=d?p.length:0,j=T-1;T--;){var z=p[T];if(T==j||z!==ee){var ee=z;Vo(z)?$f.call(d,z,1):Iu(d,z)}}return d}function Pd(d,p){return d+ll(Td()*(p-d+1))}function Mm(d,p,T,j){for(var z=-1,ee=kr(mu((p-d)/(T||1)),0),de=Oe(ee);ee--;)de[j?ee:++z]=d,d+=T;return de}function Ec(d,p){var T="";if(!d||p<1||p>ie)return T;do p%2&&(T+=d),p=ll(p/2),p&&(d+=d);while(p);return T}function rn(d,p){return Nh(Mh(d,p,Go),d+"")}function Tu(d){return Vi(Jh(d))}function or(d,p){var T=Jh(d);return To(T,Ts(p,0,T.length))}function ir(d,p,T,j){if(!Sr(d))return d;p=Is(p,d);for(var z=-1,ee=p.length,de=ee-1,ve=d;ve!=null&&++zz?0:z+p),T=T>z?z:T,T<0&&(T+=z),z=p>T?0:T-p>>>0,p>>>=0;for(var ee=Oe(z);++j>>1,de=d[ee];de!==null&&!Di(de)&&(T?de<=p:de=a){var We=p?null:Ya(d);if(We)return sl(We);de=!1,z=Rt,Te=new vu}else Te=p?[]:ve;e:for(;++j=j?d:Sa(d,p,T)}var xc=Dy||function(d){return zn.clearTimeout(d)};function Am(d,p){if(p)return d.slice();var T=d.length,j=hm?hm(T):new d.constructor(T);return d.copy(j),j}function Mc(d){var p=new d.constructor(d.byteLength);return new Sd(p).set(new Sd(d)),p}function wh(d,p){var T=p?Mc(d.buffer):d.buffer;return new d.constructor(T,d.byteOffset,d.byteLength)}function Ry(d){var p=new d.constructor(d.source,li.exec(d));return p.lastIndex=d.lastIndex,p}function Fm(d){return wo?Yn(wo.call(d)):{}}function Om(d,p){var T=p?Mc(d.buffer):d.buffer;return new d.constructor(T,d.byteOffset,d.length)}function Pm(d,p){if(d!==p){var T=d!==n,j=d===null,z=d===d,ee=Di(d),de=p!==n,ve=p===null,Te=p===p,We=Di(p);if(!ve&&!We&&!ee&&d>p||ee&&de&&Te&&!ve&&!We||j&&de&&Te||!T&&Te||!z)return 1;if(!j&&!ee&&!We&&d=ve)return Te;var We=T[j];return Te*(We=="desc"?-1:1)}}return d.index-p.index}function jm(d,p,T,j){for(var z=-1,ee=d.length,de=T.length,ve=-1,Te=p.length,We=kr(ee-de,0),$e=Oe(Te+We),Je=!j;++ve1?T[z-1]:n,de=z>2?T[2]:n;for(ee=d.length>3&&typeof ee=="function"?(z--,ee):n,de&&Fn(T[0],T[1],de)&&(ee=z<3?n:ee,z=1),p=Yn(p);++j-1?z[ee?p[de]:de]:n}}function Eu(d){return Gi(function(p){var T=p.length,j=T,z=ga.prototype.thru;for(d&&p.reverse();j--;){var ee=p[j];if(typeof ee!="function")throw new Bo(i);if(z&&!de&&zd(ee)=="wrapper")var de=new ga([],!0)}for(j=de?j:T;++j1&&Sn.reverse(),$e&&Teve))return!1;var We=ee.get(d),$e=ee.get(p);if(We&&$e)return We==p&&$e==d;var Je=-1,mt=!0,Nt=T&D?new vu:n;for(ee.set(d,p),ee.set(p,d);++Je1?"& ":"")+p[j],p=p.join(T>2?", ":" "),d.replace(Aa,`{ /* [wrapped with `+p+`] */ `)}function V1(d){return an(d)||Kd(d)||!!(Sy&&d&&d[Sy])}function Vo(d,p){var T=typeof d;return p=p??ie,!!p&&(T=="number"||T!="symbol"&&cs.test(d))&&d>-1&&d%1==0&&d0){if(++p>=K)return arguments[0]}else p=0;return d.apply(n,arguments)}}function To(d,p){var T=-1,j=d.length,z=j-1;for(p=p===n?j:p;++T1?d[p-1]:n;return T=typeof T=="function"?(d.pop(),T):n,og(d,T)});function Eo(d){var p=G(d);return p.__chain__=!0,p}function ig(d,p){return p(d),d}function _h(d,p){return p(d)}var kl=Gi(function(d){var p=d.length,T=p?d[0]:0,j=this.__wrapped__,z=function(ee){return rh(ee,d)};return p>1||this.__actions__.length||!(j instanceof nn)||!Vo(T)?this.thru(z):(j=j.slice(T,+T+(p?1:0)),j.__actions__.push({func:_h,args:[z],thisArg:n}),new ga(j,this.__chain__).thru(function(ee){return p&&!ee.length&&ee.push(n),ee}))});function Bh(){return Eo(this)}function ku(){return new ga(this.value(),this.__chain__)}function Hh(){this.__values__===n&&(this.__values__=dC(this.value()));var d=this.__index__>=this.__values__.length,p=d?n:this.__values__[this.__index__++];return{done:d,value:p}}function sg(){return this}function lg(d){for(var p,T=this;T instanceof Ui;){var j=Gm(T);j.__index__=0,j.__values__=n,p?z.__wrapped__=j:p=j;var z=j;T=T.__wrapped__}return z.__wrapped__=d,p}function eS(){var d=this.__wrapped__;if(d instanceof nn){var p=d;return this.__actions__.length&&(p=new nn(this)),p=p.reverse(),p.__actions__.push({func:_h,args:[Ea],thisArg:n}),new ga(p,this.__chain__)}return this.thru(Ea)}function ug(){return km(this.__wrapped__,this.__actions__)}var tS=Rd(function(d,p,T){Tn.call(d,T)?++d[T]:Wi(d,T,1)});function d0(d,p,T){var j=an(d)?oc:mi;return T&&Fn(d,p,T)&&(p=n),j(d,Ot(p,3))}function f0(d,p){var T=an(d)?fi:Du;return T(d,Ot(p,3))}var Yh=Uy(Lc),Uh=Uy(Il);function h0(d,p){return _r($h(d,p),1)}function cg(d,p){return _r($h(d,p),he)}function nS(d,p,T){return T=T===n?1:un(T),_r($h(d,p),T)}function dg(d,p){var T=an(d)?wr:Zi;return T(d,Ot(p,3))}function zh(d,p){var T=an(d)?uu:Ay;return T(d,Ot(p,3))}var Vh=Rd(function(d,p,T){Tn.call(d,T)?d[T].push(p):Wi(d,T,[p])});function fg(d,p,T,j){d=Zo(d)?d:Jh(d),T=T&&!j?un(T):0;var z=d.length;return T<0&&(T=kr(z+T,0)),g0(d)?T<=z&&d.indexOf(p,T)>-1:!!z&&ys(d,p,T)>-1}var Wh=rn(function(d,p,T){var j=-1,z=typeof p=="function",ee=Zo(d)?Oe(d.length):[];return Zi(d,function(de){ee[++j]=z?xr(p,de,T):vl(de,p,T)}),ee}),p0=Rd(function(d,p,T){Wi(d,T,p)});function $h(d,p){var T=an(d)?jn:Em;return T(d,Ot(p,3))}function Zh(d,p,T,j){return d==null?[]:(an(p)||(p=p==null?[]:[p]),T=j?n:T,an(T)||(T=T==null?[]:[T]),dh(d,p,T))}var rS=Rd(function(d,p,T){d[T?0:1].push(p)},function(){return[[],[]]});function Jd(d,p,T){var j=an(d)?hd:q,z=arguments.length<3;return j(d,Ot(p,4),T,z,Zi)}function aS(d,p,T){var j=an(d)?Rf:q,z=arguments.length<3;return j(d,Ot(p,4),T,z,Ay)}function qh(d,p){var T=an(d)?fi:Du;return T(d,Me(Ot(p,3)))}function s(d){var p=an(d)?Vi:Tu;return p(d)}function u(d,p,T){(T?Fn(d,p,T):p===n)?p=1:p=un(p);var j=an(d)?wu:or;return j(d,p)}function m(d){var p=an(d)?ky:jd;return p(d)}function b(d){if(d==null)return 0;if(Zo(d))return g0(d)?hu(d):d.length;var p=Ta(d);return p==nt||p==Xt?d.size:ch(d).length}function C(d,p,T){var j=an(d)?il:H1;return T&&Fn(d,p,T)&&(p=n),j(d,Ot(p,3))}var O=rn(function(d,p){if(d==null)return[];var T=p.length;return T>1&&Fn(d,p[0],p[1])?p=[]:T>2&&Fn(p[0],p[1],p[2])&&(p=[p[0]]),dh(d,_r(p,1),[])}),W=Kn||function(){return zn.Date.now()};function ue(d,p){if(typeof p!="function")throw new Bo(i);return d=un(d),function(){if(--d<1)return p.apply(this,arguments)}}function ge(d,p,T){return p=T?n:p,p=d&&p==null?d.length:p,qi(d,_,n,n,n,n,p)}function Pe(d,p){var T;if(typeof p!="function")throw new Bo(i);return d=un(d),function(){return--d>0&&(T=p.apply(this,arguments)),d<=1&&(p=n),T}}var Ge=rn(function(d,p,T){var j=I;if(T.length){var z=_o(T,Sl(Ge));j|=B}return qi(d,j,p,T,z)}),rt=rn(function(d,p,T){var j=I|M;if(T.length){var z=_o(T,Sl(rt));j|=B}return qi(p,j,d,T,z)});function qe(d,p,T){p=T?n:p;var j=qi(d,R,n,n,n,n,n,p);return j.placeholder=qe.placeholder,j}function yt(d,p,T){p=T?n:p;var j=qi(d,k,n,n,n,n,n,p);return j.placeholder=yt.placeholder,j}function Dt(d,p,T){var j,z,ee,de,ve,Te,We=0,$e=!1,Je=!1,mt=!0;if(typeof d!="function")throw new Bo(i);p=Ki(p)||0,Sr(T)&&($e=!!T.leading,Je="maxWait"in T,ee=Je?kr(Ki(T.maxWait)||0,p):ee,mt="trailing"in T?!!T.trailing:mt);function Nt(Wr){var As=j,Fu=z;return j=z=n,We=Wr,de=d.apply(Fu,As),de}function Ut(Wr){return We=Wr,ve=Pc(mn,p),$e?Nt(Wr):de}function cn(Wr){var As=Wr-Te,Fu=Wr-We,IC=p-As;return Je?ma(IC,ee-Fu):IC}function zt(Wr){var As=Wr-Te,Fu=Wr-We;return Te===n||As>=p||As<0||Je&&Fu>=ee}function mn(){var Wr=W();if(zt(Wr))return Sn(Wr);ve=Pc(mn,cn(Wr))}function Sn(Wr){return ve=n,mt&&j?Nt(Wr):(j=z=n,de)}function Ti(){ve!==n&&xc(ve),We=0,j=Te=z=ve=n}function Co(){return ve===n?de:Sn(W())}function Ii(){var Wr=W(),As=zt(Wr);if(j=arguments,z=this,Te=Wr,As){if(ve===n)return Ut(Te);if(Je)return xc(ve),ve=Pc(mn,p),Nt(Te)}return ve===n&&(ve=Pc(mn,p)),de}return Ii.cancel=Ti,Ii.flush=Co,Ii}var Et=rn(function(d,p){return wm(d,1,p)}),br=rn(function(d,p,T){return wm(d,Ki(p)||0,T)});function Ce(d){return qi(d,Y)}function ye(d,p){if(typeof d!="function"||p!=null&&typeof p!="function")throw new Bo(i);var T=function(){var j=arguments,z=p?p.apply(this,j):j[0],ee=T.cache;if(ee.has(z))return ee.get(z);var de=d.apply(this,j);return T.cache=ee.set(z,de)||ee,de};return T.cache=new(ye.Cache||Ho),T}ye.Cache=Ho;function Me(d){if(typeof d!="function")throw new Bo(i);return function(){var p=arguments;switch(p.length){case 0:return!d.call(this);case 1:return!d.call(this,p[0]);case 2:return!d.call(this,p[0],p[1]);case 3:return!d.call(this,p[0],p[1],p[2])}return!d.apply(this,p)}}function lt(d){return Pe(2,d)}var xt=Ly(function(d,p){p=p.length==1&&an(p[0])?jn(p[0],It(Ot())):jn(_r(p,1),It(Ot()));var T=p.length;return rn(function(j){for(var z=-1,ee=ma(j.length,T);++z=p}),Kd=Sm(function(){return arguments}())?Sm:function(d){return Ar(d)&&Tn.call(d,"callee")&&!Wf.call(d,"callee")},an=Oe.isArray,MP=rl?It(rl):sh;function Zo(d){return d!=null&&m0(d.length)&&!Nu(d)}function Vr(d){return Ar(d)&&Zo(d)}function kP(d){return d===!0||d===!1||Ar(d)&&ba(d)==Ze}var _c=mm||gS,NP=Gr?It(Gr):Oy;function AP(d){return Ar(d)&&d.nodeType===1&&!hg(d)}function FP(d){if(d==null)return!0;if(Zo(d)&&(an(d)||typeof d=="string"||typeof d.splice=="function"||_c(d)||Gh(d)||Kd(d)))return!d.length;var p=Ta(d);if(p==nt||p==Xt)return!d.size;if(Vd(d))return!ch(d).length;for(var T in d)if(Tn.call(d,T))return!1;return!0}function OP(d,p){return Dc(d,p)}function PP(d,p,T){T=typeof T=="function"?T:n;var j=T?T(d,p):n;return j===n?Dc(d,p,n,T):!!j}function iS(d){if(!Ar(d))return!1;var p=ba(d);return p==tn||p==Ct||typeof d.message=="string"&&typeof d.name=="string"&&!hg(d)}function jP(d){return typeof d=="number"&&hc(d)}function Nu(d){if(!Sr(d))return!1;var p=ba(d);return p==_e||p==et||p==Xe||p==_t}function sC(d){return typeof d=="number"&&d==un(d)}function m0(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=ie}function Sr(d){var p=typeof d;return d!=null&&(p=="object"||p=="function")}function Ar(d){return d!=null&&typeof d=="object"}var lC=gs?It(gs):lh;function LP(d,p){return d===p||uh(d,p,xh(p))}function RP(d,p,T){return T=typeof T=="function"?T:n,uh(d,p,xh(p),T)}function _P(d){return uC(d)&&d!=+d}function BP(d){if(Jy(d))throw new Qt(o);return Tm(d)}function HP(d){return d===null}function YP(d){return d==null}function uC(d){return typeof d=="number"||Ar(d)&&ba(d)==ht}function hg(d){if(!Ar(d)||ba(d)!=Tt)return!1;var p=hi(d);if(p===null)return!0;var T=Tn.call(p,"constructor")&&p.constructor;return typeof T=="function"&&T instanceof T&&yd.call(T)==zf}var sS=_i?It(_i):Py;function UP(d){return sC(d)&&d>=-ie&&d<=ie}var cC=al?It(al):Im;function g0(d){return typeof d=="string"||!an(d)&&Ar(d)&&ba(d)==dn}function Di(d){return typeof d=="symbol"||Ar(d)&&ba(d)==en}var Gh=ac?It(ac):Nd;function zP(d){return d===n}function VP(d){return Ar(d)&&Ta(d)==kn}function WP(d){return Ar(d)&&ba(d)==Er}var $P=Hd(yl),ZP=Hd(function(d,p){return d<=p});function dC(d){if(!d)return[];if(Zo(d))return g0(d)?yo(d):Ha(d);if(Ss&&d[Ss])return O1(d[Ss]());var p=Ta(d),T=p==nt?Bf:p==Xt?sl:Jh;return T(d)}function Au(d){if(!d)return d===0?d:0;if(d=Ki(d),d===he||d===-he){var p=d<0?-1:1;return p*ce}return d===d?d:0}function un(d){var p=Au(d),T=p%1;return p===p?T?p-T:p:0}function fC(d){return d?Ts(un(d),0,ae):0}function Ki(d){if(typeof d=="number")return d;if(Di(d))return X;if(Sr(d)){var p=typeof d.valueOf=="function"?d.valueOf():d;d=Sr(p)?p+"":p}if(typeof d!="string")return d===0?d:+d;d=ot(d);var T=ou.test(d);return T||ji.test(d)?el(d.slice(2),T?2:8):ec.test(d)?X:+d}function hC(d){return wi(d,qo(d))}function qP(d){return d?Ts(un(d),-ie,ie):d===0?d:0}function Un(d){return d==null?"":hr(d)}var GP=kc(function(d,p){if(Vd(p)||Zo(p)){wi(p,Ca(p),d);return}for(var T in p)Tn.call(p,T)&&bu(d,T,p[T])}),pC=kc(function(d,p){wi(p,qo(p),d)}),v0=kc(function(d,p,T,j){wi(p,qo(p),d,j)}),JP=kc(function(d,p,T,j){wi(p,Ca(p),d,j)}),KP=Gi(rh);function QP(d,p){var T=yc(d);return p==null?T:Xn(T,p)}var XP=rn(function(d,p){d=Yn(d);var T=-1,j=p.length,z=j>2?p[2]:n;for(z&&Fn(p[0],p[1],z)&&(j=1);++T1),ee}),wi(d,Yd(d),T),j&&(T=no(T,g|y|w,Wy));for(var z=p.length;z--;)Iu(T,p[z]);return T});function vj(d,p){return gC(d,Me(Ot(p)))}var yj=Gi(function(d,p){return d==null?{}:Ic(d,p)});function gC(d,p){if(d==null)return{};var T=jn(Yd(d),function(j){return[j]});return p=Ot(p),Cm(d,T,function(j,z){return p(j,z[0])})}function wj(d,p,T){p=Is(p,d);var j=-1,z=p.length;for(z||(z=1,d=n);++jp){var j=d;d=p,p=j}if(T||d%1||p%1){var z=Td();return ma(d+z*(p-d+rc("1e-"+((z+"").length-1))),p)}return Pd(d,p)}var Nj=Cs(function(d,p,T){return p=p.toLowerCase(),d+(T?wC(p):p)});function wC(d){return cS(Un(d).toLowerCase())}function bC(d){return d=Un(d),d&&d.replace(iu,Qa).replace(Lf,"")}function Aj(d,p,T){d=Un(d),p=hr(p);var j=d.length;T=T===n?j:Ts(un(T),0,j);var z=T;return T-=p.length,T>=0&&d.slice(T,z)==p}function Fj(d){return d=Un(d),d&&tt.test(d)?d.replace(He,fu):d}function Oj(d){return d=Un(d),d&&ta.test(d)?d.replace(yr,"\\$&"):d}var Pj=Cs(function(d,p,T){return d+(T?"-":"")+p.toLowerCase()}),jj=Cs(function(d,p,T){return d+(T?" ":"")+p.toLowerCase()}),Lj=Rm("toLowerCase");function Rj(d,p,T){d=Un(d),p=un(p);var j=p?hu(d):0;if(!p||j>=p)return d;var z=(p-j)/2;return Bd(ll(z),T)+d+Bd(mu(z),T)}function _j(d,p,T){d=Un(d),p=un(p);var j=p?hu(d):0;return p&&j>>0,T?(d=Un(d),d&&(typeof p=="string"||p!=null&&!sS(p))&&(p=hr(p),!p&&uc(d))?Es(yo(d),0,T):d.split(p,T)):[]}var Wj=Cs(function(d,p,T){return d+(T?" ":"")+cS(p)});function $j(d,p,T){return d=Un(d),T=T==null?0:Ts(un(T),0,d.length),p=hr(p),d.slice(T,T+p.length)==p}function Zj(d,p,T){var j=G.templateSettings;T&&Fn(d,p,T)&&(p=n),d=Un(d),p=v0({},p,j,Hm);var z=v0({},p.imports,j.imports,Hm),ee=Ca(z),de=Kt(z,ee),ve,Te,We=0,$e=p.interpolate||ds,Je="__p += '",mt=vd((p.escape||ds).source+"|"+$e.source+"|"+($e===On?si:ds).source+"|"+(p.evaluate||ds).source+"|$","g"),Nt="//# sourceURL="+(Tn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bn+"]")+` `;d.replace(mt,function(zt,mn,Sn,Ti,Co,Ii){return Sn||(Sn=Ti),Je+=d.slice(We,Ii).replace(tc,gd),mn&&(ve=!0,Je+=`' + __e(`+mn+`) + '`),Co&&(Te=!0,Je+=`'; `+Co+`; __p += '`),Sn&&(Je+=`' + ((__t = (`+Sn+`)) == null ? '' : __t) + '`),We=Ii+zt.length,zt}),Je+=`'; `;var Ut=Tn.call(p,"variable")&&p.variable;if(!Ut)Je=`with (obj) { `+Je+` } `;else if(Oa.test(Ut))throw new Qt(l);Je=(Te?Je.replace(te,""):Je).replace(me,"$1").replace(xe,"$1;"),Je="function("+(Ut||"obj")+`) { `+(Ut?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(ve?", __e = _.escape":"")+(Te?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Je+`return __p }`;var cn=DC(function(){return Dn(ee,Nt+"return "+Je).apply(n,de)});if(cn.source=Je,iS(cn))throw cn;return cn}function qj(d){return Un(d).toLowerCase()}function Gj(d){return Un(d).toUpperCase()}function Jj(d,p,T){if(d=Un(d),d&&(T||p===n))return ot(d);if(!d||!(p=hr(p)))return d;var j=yo(d),z=yo(p),ee=Hn(j,z),de=oa(j,z)+1;return Es(j,ee,de).join("")}function Kj(d,p,T){if(d=Un(d),d&&(T||p===n))return d.slice(0,Yf(d)+1);if(!d||!(p=hr(p)))return d;var j=yo(d),z=oa(j,yo(p))+1;return Es(j,0,z).join("")}function Qj(d,p,T){if(d=Un(d),d&&(T||p===n))return d.replace(Pi,"");if(!d||!(p=hr(p)))return d;var j=yo(d),z=Hn(j,yo(p));return Es(j,z).join("")}function Xj(d,p){var T=Z,j=Q;if(Sr(p)){var z="separator"in p?p.separator:z;T="length"in p?un(p.length):T,j="omission"in p?hr(p.omission):j}d=Un(d);var ee=d.length;if(uc(d)){var de=yo(d);ee=de.length}if(T>=ee)return d;var ve=T-hu(j);if(ve<1)return j;var Te=de?Es(de,0,ve).join(""):d.slice(0,ve);if(z===n)return Te+j;if(de&&(ve+=Te.length-ve),sS(z)){if(d.slice(ve).search(z)){var We,$e=Te;for(z.global||(z=vd(z.source,Un(li.exec(z))+"g")),z.lastIndex=0;We=z.exec($e);)var Je=We.index;Te=Te.slice(0,Je===n?ve:Je)}}else if(d.indexOf(hr(z),ve)!=ve){var mt=Te.lastIndexOf(z);mt>-1&&(Te=Te.slice(0,mt))}return Te+j}function eL(d){return d=Un(d),d&&Qe.test(d)?d.replace(Ye,gy):d}var tL=Cs(function(d,p,T){return d+(T?" ":"")+p.toUpperCase()}),cS=Rm("toUpperCase");function SC(d,p,T){return d=Un(d),p=T?n:p,p===n?F1(d)?L1(d):ic(d):d.match(p)||[]}var DC=rn(function(d,p){try{return xr(d,n,p)}catch(T){return iS(T)?T:new Qt(T)}}),nL=Gi(function(d,p){return wr(p,function(T){T=bi(T),Wi(d,T,Ge(d[T],d))}),d});function rL(d){var p=d==null?0:d.length,T=Ot();return d=p?jn(d,function(j){if(typeof j[1]!="function")throw new Bo(i);return[T(j[0]),j[1]]}):[],rn(function(j){for(var z=-1;++zie)return[];var T=ae,j=ma(d,ae);p=Ot(p),d-=ae;for(var z=Ee(j,p);++T0||p<0)?new nn(T):(d<0?T=T.takeRight(-d):d&&(T=T.drop(d)),p!==n&&(p=un(p),T=p<0?T.dropRight(-p):T.take(p-d)),T)},nn.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},nn.prototype.toArray=function(){return this.take(ae)},zo(nn.prototype,function(d,p){var T=/^(?:filter|find|map|reject)|While$/.test(p),j=/^(?:head|last)$/.test(p),z=G[j?"take"+(p=="last"?"Right":""):p],ee=j||/^find/.test(p);z&&(G.prototype[p]=function(){var de=this.__wrapped__,ve=j?[1]:arguments,Te=de instanceof nn,We=ve[0],$e=Te||an(de),Je=function(mn){var Sn=z.apply(G,Ro([mn],ve));return j&&mt?Sn[0]:Sn};$e&&T&&typeof We=="function"&&We.length!=1&&(Te=$e=!1);var mt=this.__chain__,Nt=!!this.__actions__.length,Ut=ee&&!mt,cn=Te&&!Nt;if(!ee&&$e){de=cn?de:new nn(this);var zt=d.apply(de,ve);return zt.__actions__.push({func:_h,args:[Je],thisArg:n}),new ga(zt,mt)}return Ut&&cn?d.apply(this,ve):(zt=this.thru(Je),Ut?j?zt.value()[0]:zt.value():zt)})}),wr(["pop","push","shift","sort","splice","unshift"],function(d){var p=ws[d],T=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",j=/^(?:pop|shift)$/.test(d);G.prototype[d]=function(){var z=arguments;if(j&&!this.__chain__){var ee=this.value();return p.apply(an(ee)?ee:[],z)}return this[T](function(de){return p.apply(an(de)?de:[],z)})}}),zo(nn.prototype,function(d,p){var T=G[p];if(T){var j=T.name+"";Tn.call(gc,j)||(gc[j]=[]),gc[j].push({name:p,func:T})}}),gc[Nc(n,M).name]=[{name:"wrapper",func:n}],nn.prototype.clone=Qf,nn.prototype.reverse=vm,nn.prototype.value=wc,G.prototype.at=kl,G.prototype.chain=Bh,G.prototype.commit=ku,G.prototype.next=Hh,G.prototype.plant=lg,G.prototype.reverse=eS,G.prototype.toJSON=G.prototype.valueOf=G.prototype.value=ug,G.prototype.first=G.prototype.head,Ss&&(G.prototype[Ss]=sg),G},cc=R1();Lo?((Lo.exports=cc)._=cc,nl._=cc):zn._=cc}).call(dr)})(Tw,Tw.exports);var mb=Tw.exports;const Iw=qt(mb);function y0(e){const t=e.match(/^#+/);return t?t[0].length:0}function AC(e,t){const n=e.split(` `);let r="",a=[],o=!1,i=1;for(let l=0;ly0(t)?a.push(c):(o=!1,a=[])}else o&&a.push(c)}return t?mb.isEmpty(a)?{content:"",startLine:-1}:{content:a.join(` `),startLine:i}:{content:e,startLine:0}}function x2(e){const t={};for(const n of e)n.parent&&n.parent>0&&(t[n.position.start.line]=n.parent);return t}function IR(e,t,n){var g;const r={},a=(y,w)=>{for(;y[w]!==void 0&&y[w]!==w;)w=y[w];return w},o=ft.getState().app,i=n.split(` `),l=t+i.length-1,c=(g=o.metadataCache.getFileCache(e))==null?void 0:g.listItems,f={};if(!c)return[];c.forEach(y=>{var D,I;const w=y.position.start.line,S=y.position.end.line;if(w>=t&&S<=l){const M=w-t,N=S-t,R=i.slice(M,N+1),k=R.join(` `);if(y.parent&&y.parent>0&&(r[y.position.start.line]=y.parent),y.parent&&f[y.parent]){if(w-y.parent===1){const L=(D=i[M])==null?void 0:D.match(/^(\s*)/);L&&(f[y.parent].indent=L[0])}const B=new RegExp("^"+f[y.parent].indent);f[y.parent].content+=` `+k.split(` `).map(L=>L==null?void 0:L.replace(B,"")).join(` `)}else if(y.parent&&f[a(r,y.parent)]){const B=new RegExp("^"+f[a(r,y.parent)].indent);f[a(r,y.parent)].content+=` `+k.split(` `).map(L=>L==null?void 0:L.replace(B,"")).join(` `)}else if(new RegExp(lR).test(k)){f[w]||(f[w]={content:"",blockId:"",indent:""});const B=R.length>1&&((I=R[1])==null?void 0:I.match(/^(\s*)/));B&&(f[w].indent=B[0]),f[w].content=k.split(` `).map(L=>L==null?void 0:L.replace(f[w].indent,"")).join(` `),f[w].blockId=y.id}}});const h=Object.keys(f).map(y=>({line:f[y].content,blockId:f[y].blockId||"",index:parseInt(y)}));return e.path.includes("2024-04-07"),h}async function ER(e,t){let n=t.vault.getAbstractFileByPath(e);return n||(new x.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 CR(e,t){var a;let n;try{n=await t.vault.read(e)}catch(o){console.error(o),n=await t.vault.cachedRead(e)}const r=(a=t.metadataCache.getFileCache(e))==null?void 0:a.frontmatterPosition;return r?n.slice(r.end.offset+1):n}function xR(e){const t=e.split(/\r?\n/),n=[];let r="",a=[],o=0;for(let i=0;i [!thino]")?(r&&(n.push({metadata:o,content:a.join(` `).trim()}),a=[]),r=!0,o=l.replace("> [!thino]","").trim()):r&&l.startsWith(">")?a.push(l.replace(/^> /,"")):r&&!l.startsWith(">")&&(r=!1,n.push({metadata:o,content:a.join(` `).trim()}),a=[],o="")}return r&&n.push({metadata:o,content:a.join(` `).trim()}),n}const kR=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 NR(e,t){if(!t)return 0;const{vault:n}=Le.getState().dailyNotesState.app,r=e==null?void 0:e.DefaultMemoComposition,a=e!=null&&e.ProcessEntriesBelow&&(e==null?void 0:e.ProcessContentTarget)!=="whole"?e==null?void 0:e.ProcessEntriesBelow:"",o=(e==null?void 0:e.ProcessContentTarget)!=="whole"?e!=null&&e.DifferentInsertTarget?e!=null&&e.InsertAfterForTask?e==null?void 0:e.InsertAfterForTask:"":a:"";let i;try{i=await n.read(t)}catch(S){console.error(S),i=await n.cachedRead(t)}let l;r!=""&&/{TIME}/g.test(r)&&/{CONTENT}/g.test(r)?l="(-|\\*) (\\[(.{1})\\]\\s)?"+r.replace(/{TIME}/g,"((\\)?\\d{1,2}:\\d{2}(\\:\\d{2})?)?").replace(/ {CONTENT}/g,""):l="(-|\\*) (\\[(.{1})\\]\\s)?((\\)?\\d{1,2}\\:\\d{2}(\\:\\d{2})?)?";const c=new RegExp(l,"g"),f=(i.match(c)||[]).length,h=new RegExp(a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g"),g=new RegExp(o.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g"),y=(i.match(h)||[]).length,w=(i.match(g)||[]).length;return i=null,y||w?f:0}function FC(e,t,n,r,a){var g,y,w;const o=Le.getState().dailyNotesState.app||window.app,i=cp(a,"day")||x.moment(a.stat.ctime);let l;const c=IR(a,n,t),f=o==null?void 0:o.metadataCache.getFileCache(a),h={frontmatter:(f==null?void 0:f.frontmatter)||{},tags:((g=f==null?void 0:f.frontmatter)==null?void 0:g.tags)||[]};for(const S of c){const D=PR(e.DefaultMemoComposition,S.line),I=jR(e.DefaultMemoComposition,S.line),M=LR(S.line);let N=AR(S.line);if(i.hours(parseInt(D)),i.minutes(parseInt(I)),M&&i.seconds(parseInt(M)),!M&&i.seconds(0),/^\s*[-*]\s(\[(.)\])\s/g.test(S.line)){const Z=RR(S.line);N=FR(S.line),l=kR(Z)}else l="JOURNAL";let R=N.trim().replaceAll(/
/g,` `);const k=new RegExp(/\[(pinned|PINNED)::true\]/,"g").test(N),B=new RegExp(/\[(archived|ARCHIVED)::true\]/,"g").test(N),L=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").test(N),_=(y=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").exec(N))==null?void 0:y[2],V=(w=new RegExp(/\[(webId|WEBID)::([^\]]*)\]/,"g").exec(N))==null?void 0:w[2],Y=new RegExp(/\[(visibility|VISIBILITY)::("PROTECT"|"PUBLIC")\]/,"g").test(N)?"PUBLIC":"PRIVATE";a.path.includes("2024-04-07"),R=R.replace(/\s\[pinned::[^\]]+\]/g,"").replace(/\s\[visibility::[^\]]+\]/g,"").replace(/\s\[archived::[^\]]+\]/g,"").replace(/\s\[deleted::[^\]]+\]/g,"").replace(/\s\[webId::[^\]]+\]/g,""),S.blockId&&(R=R.replace("^"+(S==null?void 0:S.blockId),"")),r.push({id:i.format("YYYYMMDDHHmmss")+`${S.index}`,content:R.trim(),createdAt:i.format("YYYY/MM/DD HH:mm:ss"),updatedAt:i.format("YYYY/MM/DD HH:mm:ss"),thinoType:l,hasId:S.blockId?S.blockId:"",linkId:"",path:a.path,deletedAt:L?x.moment(_,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",rowStatus:B?"ARCHIVED":"NORMAL",visibility:Y,pinned:k,creatorName:"Memo",resourceList:[],sourceType:"DAILY",webId:V,fileInfo:h})}}function AR(e){return e.replace(/^(-|\*|\d\.) (\d{1,2}:\d{2}(:\d{2})?)\s(.*)/g,"$4")}function FR(e){return OR(e)}const OR=e=>{var r;let t;return t="^(-|\\*|\\d\\.)\\s+\\[.\\]\\s(\\d{1,2}:\\d{2}(:\\d{2})?)\\s([\\w\\W]*)",(r=new RegExp(t,"").exec(e))==null?void 0:r[4]},PR=(e,t)=>{var a;let n;return e!=""&&/{TIME}/g.test(e)&&/{CONTENT}/g.test(e)?n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?"+e.replace(/{TIME}/g,"(\\)?(\\d{1,2})\\:(\\d{2})(\\:\\d{2})?").replace(/{CONTENT}/g,"(.*)"):n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\)?(\\d{1,2})\\:(\\d{2})(.*)",(a=new RegExp(n,"").exec(t))==null?void 0:a[6]},jR=(e,t)=>{var a;let n;return e!=""&&/{TIME}/g.test(e)&&/{CONTENT}/g.test(e)?n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?"+e.replace(/{TIME}/g,"(\\)?(\\d{1,2})\\:(\\d{2})(\\:\\d{2})?").replace(/{CONTENT}/g,"(.*)"):n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\)?(\\d{1,2})\\:(\\d{2})(.*)",(a=new RegExp(n,"").exec(t))==null?void 0:a[7]},LR=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]},RR=e=>{var t;return(t=/^\s*[\-\*]\s(\[(.{1})\])\s(.*)/.exec(e))==null?void 0:t[2]},cA=()=>qg()?!0:(new x.Notice(E("Check if you opened Daily Notes Plugin Or Periodic Notes Plugin")),!1);async function dA(e,t){var l;if(!e)return t;const n=Le.getState().dailyNotesState.app||window.app,r=await CR(e,n);let a=x.moment(e.stat.ctime).format("YYYY/MM/DD HH:mm:ss");const o=n==null?void 0:n.metadataCache.getFileCache(e),i={frontmatter:(o==null?void 0:o.frontmatter)||{},tags:((l=o==null?void 0:o.frontmatter)==null?void 0:l.tags)||[]};await n.fileManager.processFrontMatter(e,c=>{if(c.id||(c.id=ut.randomId(16)),c.createdAt?a=x.moment(c.createdAt,"YYYY/MM/DD HH:mm:ss").isValid()?c.createdAt:a:c.createdAt=a,!r.trim())return t;const f=!!c.pinned,h=c.rowStatus&&c.rowStatus==="ARCHIVED",g=!!c.deletedAt,y=c.deletedAt?c.deletedAt:"",w=c.visibility?c.visibility:"PRIVATE",S=c.thinoType?c.thinoType:"JOURNAL",D=c.webId?c.webId:"",I=c.id?c.id:"",M=c.hasId?c.hasId:"",N=c.linkId?c.linkId:"",R=e.path,k="Memo",B="MULTI",L=[];return t.push({id:I,content:r,createdAt:a,updatedAt:a,deletedAt:g?x.moment(y,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",pinned:f,rowStatus:h?"ARCHIVED":"NORMAL",visibility:w,thinoType:S,hasId:M,linkId:N,path:R,creatorName:k,sourceType:B,resourceList:L,webId:D,fileInfo:i}),t})}async function cT(e,t){var I,M,N,R,k,B,L;if(!e)return t;const{vault:n,metadataCache:r}=Le.getState().dailyNotesState.app||window.app;let a;try{a=await n.read(e)}catch(_){console.error(_),a=await n.cachedRead(e)}if(!a)return;const o=x.moment(e.stat.ctime).format("YYYY/MM/DD HH:mm:ss"),i=x.moment(e.stat.mtime).format("YYYY/MM/DD HH:mm:ss"),l=e.path,c="Thino",f="FILE",h="",g="",y=[],w=r.getFileCache(e),S={frontmatter:(w==null?void 0:w.frontmatter)||{},tags:((I=w==null?void 0:w.frontmatter)==null?void 0:I.tags)||[]},D=await xR(a);for(const _ of D){const V=MR(_.content);for(const Y of V){const Z=Y.metadata.match(/\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2}/g);if(!Z)continue;const Q=(N=(M=Y.metadata.match(/id::([^\]]*)/g))==null?void 0:M[0])==null?void 0:N.replace("id::","");if(!Q)continue;const K=Z?Z[0]:o,se=Z?Z[0]:i,le=Y.metadata.match(/webId::([^\]]*)/g)?(k=(R=Y.metadata.match(/webId::([^\]]*)/g))==null?void 0:R[0])==null?void 0:k.replace("webId::",""):"",fe=Y.metadata.contains("[pinned::true]"),$=Y.metadata.contains("[archived::true]"),he=Y.metadata.contains("[deleted::"),ie=(B=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").exec(Y.metadata))==null?void 0:B[2],ce=new RegExp(/\[(visibility|VISIBILITY)::("PROTECT"|"PUBLIC")\]/,"g").test(Y.metadata)?"PUBLIC":"PRIVATE",X=(L=new RegExp(/\[(thinoType|THINOTYPE)::([^\]]*)\]/,"g").exec(Y.metadata))==null?void 0:L[2];t.push({id:Q,content:Y.content,createdAt:K,updatedAt:se,deletedAt:he?x.moment(ie,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",pinned:fe,rowStatus:$?"ARCHIVED":"NORMAL",visibility:ce,thinoType:X||"JOURNAL",hasId:h,linkId:g,path:l,creatorName:c,sourceType:f,resourceList:y,webId:le,fileInfo:S})}}return t}async function fA(e,t){if(!e)return[];const n=Le.getState().dailyNotesState.settings,{vault:r}=Le.getState().dailyNotesState.app||window.app;if(await NR(n,e)===0)return;let o;try{o=await r.read(e)}catch(g){console.error(g),o=await r.cachedRead(e)}const{content:i,startLine:l}=AC(o,(n==null?void 0:n.ProcessContentTarget)==="whole"?"":n.ProcessEntriesBelow);let c="",f=0;if(n.DifferentInsertTarget&&(n==null?void 0:n.ProcessContentTarget)!=="whole"&&n.InsertAfterForTask&&!i.includes(n.InsertAfterForTask)){const{content:g,startLine:y}=AC(o,n.InsertAfterForTask);c=g,f=y}const h=[];FC(n,i,l,h,e),n.DifferentInsertTarget&&c&&FC(n,c,f,h,e),h.length!==0&&t.push(...h.sort((g,y)=>g.createdAt>y.createdAt?-1:1))}async function hA(e,t){const n=Le.getState().dailyNotesState.app||window.app;if(!(e instanceof x.TFile))return;let r;try{r=await n.vault.read(e)}catch(i){console.error(i),r=await n.vault.cachedRead(e)}if(!r)return;const a=JSON.parse(r),o=a==null?void 0:a.nodes;for(const i of o){if(i.type==="group"||i.createdAt===void 0||i.text.trim()==="")continue;const c=x.moment(i==null?void 0:i.createdAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"),f=x.moment(i==null?void 0:i.updatedAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"),h=i!=null&&i.deletedAt?x.moment(i==null?void 0:i.deletedAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",g=!!(i!=null&&i.pinned),y=i!=null&&i.archived?"ARCHIVED":"NORMAL",w=i!=null&&i.visibility?i==null?void 0:i.visibility:"PRIVATE",S=i!=null&&i.thinoType?i==null?void 0:i.thinoType:"JOURNAL",D=i!=null&&i.text?i==null?void 0:i.text:"",I=i!=null&&i.id?i==null?void 0:i.id:"",M=i!=null&&i.hasId?i==null?void 0:i.hasId:"",N=i!=null&&i.linkId?i==null?void 0:i.linkId:"",R=e.path,k="Memo",B="CANVAS",L=[],_=i!=null&&i.webId?i==null?void 0:i.webId:void 0;t.push({id:I,content:D,createdAt:c,updatedAt:f,deletedAt:h,pinned:g,rowStatus:y,visibility:w,thinoType:S,hasId:M,linkId:N,path:R,creatorName:k,sourceType:B,resourceList:L,webId:_,fileInfo:{frontmatter:{},tags:[]}})}}async function OC(e=[]){const t=[],n=[],r=Le.getState().dailyNotesState.app||app,{vault:a}=r,{settings:o}=Le.getState().dailyNotesState,i=r.loadLocalStorage("tokenForSync"),l=async(c,f)=>{for(const h of c)try{await f(h,t,o)}catch(g){console.error(g),new x.Notice(g)}};try{if(e.includes("CANVAS")){const c=_R(a);await l(c,hA)}}catch(c){console.error(c)}try{if(e.includes("MULTI")){const c=BR(a,r,o);await l(c,dA)}}catch(c){console.error(c)}try{if(e.includes("DAILY")){const c=await HR(a);await l(c,fA)}}catch(c){console.error(c)}try{if(e.includes("FILE")||i){const c=YR(a,r,o);await l(c,cT)}}catch(c){console.error(c)}return{memos:t,commentMemos:n}}function _R(e){return e.getAllLoadedFiles().filter(t=>t instanceof x.TFile&&t.extension==="canvas"&&t.name.includes(".thino"))}function BR(e,t,n){const r=e.getMarkdownFiles(),a=r.filter(i=>{var l,c;return((l=i.parent)==null?void 0:l.path.includes(n.MemoOtherSaveLocation.MemoDefaultMultiFilePath.trim()))&&!((c=i.path)!=null&&c.endsWith("thino.md"))}),o=n.TagForMultiTypeFiles?r.filter(i=>{var l,c,f;return!((l=i.parent)!=null&&l.path.includes(n.MemoOtherSaveLocation.MemoDefaultMultiFilePath.trim())&&!((c=i.path)!=null&&c.endsWith("thino.md")))&&((f=x.getAllTags(t.metadataCache.getFileCache(i)))==null?void 0:f.contains("#"+n.TagForMultiTypeFiles.replace("#","")))}):[];return[...a,...o]}async function HR(e){const t=hb();t===void 0&&new x.Notice(E("Please check your daily note plugin OR periodic notes plugin settings")+"folder path is empty or undefined"),e.getAbstractFileByPath(x.normalizePath(t))||new x.Notice(E("Failed to find daily notes folder"));const r=qu();return Object.values(r).filter(a=>a instanceof x.TFile&&a.extension==="md")}function YR(e,t,n){const r=e.getMarkdownFiles(),a=r.filter(i=>i.name.trim().includes("thino")),o=n.TagForFileTypeFiles?r.filter(i=>{var l;return!i.name.trim().includes("thino")&&((l=x.getAllTags(t.metadataCache.getFileCache(i)))==null?void 0:l.contains("#"+n.TagForFileTypeFiles.replace("#","")))}):[];return[...a,...o]}const UR=async(e,t,n)=>{const r=await Pp(Le.getState().dailyNotesState.app)||[],a=r.find(l=>l.id===e),o={...a,title:t,querystring:n},i=r.findIndex(l=>l.id===e);return r[i]=o,await Mv(Le.getState().dailyNotesState.app,r),[a]},zR="https://api.thino.pkmer.cn/test",jp=zR,VR="unknown",WR=/!\[(?[^\]]+)\]\((?[^)]+)\)/g;function $R(e){return e.substring(e.lastIndexOf(".")+1)}function ZR(e){return{id:e.id,createdAt:Date.now().toString(),filename:e.id,type:`${$R(e.id)}`,size:e.size.toString()}}function qR(e){const t=e==null?void 0:e.matchAll(WR);return t?Array.from(t).map(n=>{var r;return ZR({url:(r=n.groups)==null?void 0:r.link,id:VR,size:0,mtime:""})}).filter(n=>n.type!="html"):[]}function kv(e){var t;return{id:e.id,createdAt:x.moment(e.ctime.toString(),"x").format("YYYY/MM/DD HH:mm:ss"),updatedAt:x.moment(e.mtime.toString(),"x").format("YYYY/MM/DD HH:mm:ss"),deletedAt:(t=e.ttime)!=null&&t.toString()?x.moment(e.ttime.toString(),"x").format("YYYY-MM-DD HH:mm:ss"):"",rowStatus:e.rowStatus,content:e.content,pinned:e.pinned,resourceList:qR(e.content),creatorName:"thino",sourceType:(e==null?void 0:e.thinoType)||"FILE",visibility:"PUBLIC",localId:e.originalId,deleted:!!e.dtime}}async function GR(e){const n={url:`${jp}/thino/getThinos${e?`?since=${e}&includeDeleted=true`:""}`,method:"GET",headers:{Authorization:`Bearer ${Lp()}`}};return x.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to fetch memos: ${r.status}`);try{return r.json.payload.map(o=>kv(o))}catch(a){console.error(`Error processing memo response: ${a}`)}}).catch(r=>(console.error(r),[]))}function Lp(){const e=Le.getState().dailyNotesState.app||app;return(e==null?void 0:e.loadLocalStorage("tokenForSync"))||""}async function M2(e){const t=`${jp}/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 ${Lp()}`}};return x.requestUrl(r).then(a=>{a.status>=400&&console.error(`Failed to create memo: ${a.status}`);try{const o=a.json;return kv(o.payload)}catch(o){console.error(`Error processing memo creation response: ${o}`)}}).catch(a=>(console.error(a),null))}function JR(e){return{id:e.id,ctime:x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").valueOf(),mtime:x.moment(e.updatedAt,"YYYY/MM/DD HH:mm:ss").valueOf(),ttime:e.deletedAt?x.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 KR(e){const t=`${jp}/thino/createThinosByData`,n=e.map(a=>JR(a)),r={url:t,method:"POST",contentType:"application/json",body:JSON.stringify(n),headers:{Authorization:`Bearer ${Lp()}`}};return x.requestUrl(r).then(a=>{a.status>=400&&console.error(`Failed to create thinos: ${a.status}`);try{return a.json.payload.map(l=>kv(l))}catch(o){console.error(`Error processing thinos creation response: ${o}`)}}).catch(a=>(console.error(a),[]))}async function wS(e){const n={url:`${jp}/thino/updateThinoById/${e.id}`,method:"POST",contentType:"application/json",body:JSON.stringify(e),headers:{Authorization:`Bearer ${Lp()}`}};return x.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to update memo: ${r.status}`);try{const a=r.json;return kv(a.payload)}catch(a){console.error(`Error processing memo update response: ${a}`)}}).catch(r=>(console.error(r),null))}async function Jg(e){const n={url:`${jp}/thino/recoverThinoFromTrash/${e}`,method:"POST",headers:{Authorization:`Bearer ${Lp()}`}};return x.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to recover memo: ${r.status}`);try{const a=r.json;return kv(a.payload)}catch(a){console.error(`Error processing memo recovery response: ${a}`)}}).catch(r=>(console.error(r),null))}async function k2(e){const n={url:`${jp}/thino/deleteThinoById/${e}`,method:"DELETE",headers:{Authorization:`Bearer ${Lp()}`}};return x.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to delete memo: ${r.status}`)}).catch(r=>(console.error(r),null))}function QR(e){return(e==null?void 0:e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))||e}function XR(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 e_({content:e,isList:t,name:n}){var N;const r=Le.getState().dailyNotesState.settings,a=x.moment(),o=ut.randomId(16),i=(r==null?void 0:r.MemoOtherSaveLocation.MemoDefaultMultiFilePath)||"Thino",l=n||`${a.format("YYYYMMDD")}-${o}`,c=`${i}/${l}.md`,f={id:o,content:e,deletedAt:"",path:c,createdAt:a.format("YYYY/MM/DD HH:mm:ss"),updatedAt:a.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",fileInfo:{tags:[],frontmatter:{}}},h=ft.getState().app||window.app,{vault:g,fileManager:y}=h,w=g.getAbstractFileByPath(i);(!w||!(w instanceof x.TFolder))&&(new x.Notice(E("Folder not found for the given thino path, is creating a new folder")),await g.createFolder(i)),dt.setChangedByMemos(!0);let S;const D=h.vault.getFileByPath(c);D?S=await g.create(`${i}/${a.format("YYYYMMDD")}-${o}.md`,e):S=await g.create(c,e),await y.processFrontMatter(S,R=>{R.id=o,R.createdAt=a.format("YYYY/MM/DD HH:mm:ss"),R.updatedAt=a.format("YYYY/MM/DD HH:mm:ss"),R.thinoType=t?"JOURNAL":"TASK-TODO"}),(!n||D)&&(r!=null&&r.SetFileNameAfterCreate)&&h.fileManager.promptForFileRename(S);const I=h.metadataCache.getFileCache(S),M={tags:((N=I==null?void 0:I.frontmatter)==null?void 0:N.tags)||[],frontmatter:(I==null?void 0:I.frontmatter)||{}};return{...f,fileInfo:M}}async function t_({content:e,isList:t}){var R;const n=Le.getState().dailyNotesState.settings,r=x.moment(),a=ut.randomId(16),o=(n==null?void 0:n.MemoOtherSaveLocation.MemoDefaultSingleFilePath)||"basic.thino.md",i={id:a,content:e,deletedAt:"",path:o,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",fileInfo:{tags:[],frontmatter:{}}},l=ft.getState().app,{vault:c}=l;let f=c.getAbstractFileByPath(o);(!f||!(f instanceof x.TFile))&&(new x.Notice(E("File not found for the given thino path, is creating a new file")),f=await c.create(o,""));const h=l.metadataCache.getFileCache(f),g={tags:((R=h==null?void 0:h.frontmatter)==null?void 0:R.tags)||[],frontmatter:(h==null?void 0:h.frontmatter)||{}};let y="";try{y=await c.read(f)||await c.cachedRead(f)}catch(k){console.error(k),new x.Notice(E("Failed to read current daily note, check if it exists."))}const w=y.indexOf(`# ${r.format("YYYY-MM-DD")}`);let S=y.indexOf(` #`,w+1);S===-1&&(S=y.length);const D=`> [!thino] ${r.format("YYYY/MM/DD HH:mm:ss")} %% [id::${a}] [thinoType::${t?"JOURNAL":"TASK-TODO"}] %%`,I=e.replace(/\n/g,` > `),M=` ${D} > ${I} `;let N;if(w===-1){const k=`# ${r.format("YYYY-MM-DD")}`;N=`${y.substring(0,S)} ${k}${M} ${y.substring(S)}`}else N=`${y.substring(0,S)}${M}${y.substring(S)}`;return setTimeout(async()=>{dt.setChangedByMemos(!0),await c.modify(f,N)},200),{...i,fileInfo:g}}async function PC(e){var N;const t=Le.getState().dailyNotesState.settings,n=x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"),r=e.id,a=(t==null?void 0:t.MemoOtherSaveLocation.MemoDefaultSingleFilePath)||"basic.thino.md",o={id:r,content:e.content,deletedAt:e.deletedAt||"",path:a,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,fileInfo:e==null?void 0:e.fileInfo},i=ft.getState().app,{vault:l}=i;let c=l.getAbstractFileByPath(a);(!c||!(c instanceof x.TFile))&&(new x.Notice(E("File not found for the given thino path, is creating a new file")),c=await l.create(a,""));let f="";try{f=await l.read(c)||await l.cachedRead(c)}catch(R){console.error(R),new x.Notice(E("Failed to read current daily note, check if it exists."))}const h=i.metadataCache.getFileCache(c),g={tags:((N=h==null?void 0:h.frontmatter)==null?void 0:N.tags)||[],frontmatter:(h==null?void 0:h.frontmatter)||{}},y=f.indexOf(`# ${n.format("YYYY-MM-DD")}`);let w=f.indexOf(` #`,y+1);w===-1&&(w=f.length);const S=`> [!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}]`:""} %%`,D=e.content.replace(/\n/g,` > `),I=` ${S} > ${D} `;let M;if(y===-1){const R=`# ${n.format("YYYY-MM-DD")}`;M=`${f.substring(0,w)} ${R}${I} ${f.substring(w)}`}else M=`${f.substring(0,w)}${I}${f.substring(w)}`;return dt.setChangedByMemos(!0),await l.modify(c,M),{...o,fileInfo:g}}async function n_({content:e,isList:t}){const n=Le.getState().dailyNotesState.settings,r=(n==null?void 0:n.MemoOtherSaveLocation.MemoDefaultCanvasPath)||"basic.thino.canvas",a=x.moment(),o=ut.randomId(16),i={id:o,content:e,deletedAt:"",path:r,createdAt:a.format("YYYY/MM/DD HH:mm:ss"),updatedAt:a.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",fileInfo:{tags:[],frontmatter:{}}},l=ft.getState().app,{vault:c}=l,f=await ER(r,l);if(!f||!(f instanceof x.TFile)){new x.Notice(E("File not found for the given thino path, is creating a new file"));return}const h=await c.read(f),g=JSON.parse(h);if(g.nodes.find(I=>I.id===i.id))return;let w;g.nodes.length>0&&(w=[...g.nodes].reduce((I,M)=>{if(!I.createdAt)return M;const N=x.moment(I.createdAt,"YYYY/MM/DD HH:mm:ss"),R=x.moment(M.createdAt,"YYYY/MM/DD HH:mm:ss");return N.isAfter(R)?I:M}));const S=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({...S,type:"text",id:o,text:e,deletedAt:"",createdAt:a.format("YYYY/MM/DD HH:mm:ss"),updatedAt:a.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 D=JSON.stringify(g,null,2);return await c.modify(f,D),i}async function bS(e,t,n){var fe,$;const{vault:r}=Le.getState().dailyNotesState.app||window.app,a=Le.getState().dailyNotesState.app||window.app,o=Le.getState().dailyNotesState.settings,i=a.vault.getConfig("useTab")===void 0||window.app.vault.getConfig("useTab")===!0,l=i?1:a.vault.getConfig("tabSize"),c=(i?" ":" ").repeat(l),f=e.split(` `).join(` `+c),h=n||x.moment(),{DifferentInsertTarget:g,InsertAfterForTask:y,InsertType:w}=o,S=h.format(o.DefaultTimePrefix||"HH:mm"),D=w==="end"?"":t?o.InsertAfter:g&&y||o.InsertAfter,I=a==null?void 0:a.loadLocalStorage("tokenForSync");let M="";try{e&&I&&o.startSync&&(M=(await M2({content:e,thinoType:"DAILY"})).id)}catch(he){console.error(he)}const N=t?"- ":"- [ ] ",R=o!=null&&o.DefaultMemoComposition?`${N}${(fe=o==null?void 0:o.DefaultMemoComposition)==null?void 0:fe.replace(/{TIME}/g,S).replace(/{CONTENT}/g,(f.split(` `).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(f)?` `+c:"")+f)}${f.split(` `).length>1&&/((-|\*|\d\.|>)\s|```)/g.test(f.split(` `)[f.split(` `).length-1])&&M?` `+c:" "}${M?`[webId::${M}]`:""}`:`${N}${S} ${f.split(` `).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(f)?` `+c:""}${f}${f.split(` `).length>1&&/((-|\*|\d\.|>)\s|```)/g.test(f.split(` `)[f.split(` `).length-1])&&M?` `+c:" "}${M?`[webId::${M}]`:""}`,k=qu(),B=fb(h,k),L="fake"+ut.randomId(16);let _=!1;const V=a.plugins.getPlugin("templater-obsidian");let Y;if(B?Y=B:(V!=null&&V.templater&&(V!=null&&V.settings.trigger_on_file_creation)&&(be.setWaitingForTemplater({origin:e,date:h,isList:t,id:L,type:"local"}),_=!0),Y=await ut.createDailyNoteCheck(h)),!Y){new x.Notice(E("Failed to create daily note, check if it exists."));return}if(B||await ft.fechLocalDailyNotes(),V&&(V!=null&&V.templater)&&(V!=null&&V.settings.trigger_on_file_creation)&&_)return dt.setChangedByMemos(!0),{id:L,content:e,deletedAt:"",createdAt:h.format("YYYY/MM/DD HH:mm:ss"),updatedAt:h.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",path:Y.path,hasId:"",linkId:"",webId:M,pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"DAILY",fileInfo:{tags:[],frontmatter:{}}};let Z="";try{Z=await r.read(Y)||await r.cachedRead(Y)}catch(he){console.error(he),new x.Notice(E("Failed to read current daily note, check if it exists."))}const Q=a.metadataCache.getFileCache(Y),K={tags:(($=Q==null?void 0:Q.frontmatter)==null?void 0:$.tags)||[],frontmatter:(Q==null?void 0:Q.frontmatter)||{}},se=await pA(D,R,Z);await r.modify(Y,se.content);const le=se.posNum===-1?mA(se.content).length-(R.split(` `).length-1)-1:se.posNum+1;return dt.setChangedByMemos(!0),{id:h.format("YYYYMMDDHHmm")+"00"+le,content:e,deletedAt:"",createdAt:h.format("YYYY/MM/DD HH:mm:ss"),updatedAt:h.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",path:Y.path,hasId:"",linkId:"",webId:M,pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"DAILY",fileInfo:K}}async function jC(e){var fe;const{vault:t}=Le.getState().dailyNotesState.app||window.app,n=Le.getState().dailyNotesState.app||window.app,{DefaultMemoComposition:r,InsertAfter:a,DefaultTimePrefix:o,DifferentInsertTarget:i,InsertAfterForTask:l,InsertType:c}=Le.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 h=x.moment();if(e.deletedAt){const $=" [deleted::"+h.format("YYYYMMDDHHmmss")+"]";f+=$}const g=n.vault.getConfig("useTab")===void 0||n.vault.getConfig("useTab")===!0,y=g?1:n.vault.getConfig("tabSize"),w=(g?" ":" ").repeat(y),S=e.content.split(` `).join(` `+w),D=x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"),I=D.format(o||"HH:mm"),M=e.thinoType?"- [ ] ":"- ",N=r?`${M}${r==null?void 0:r.replace(/{TIME}/g,I).replace(/{CONTENT}/g,(S.split(` `).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(S)?` `+w:"")+S)}${S.split(` `).length>1&&/```/g.test(S.split(` `)[S.split(` `).length-1])&&f.trim()?` `+w:" "}${f}`:`${M}${I} ${S.split(` `).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(S)?` `+w:""}${S}${S.split(` `).length>1&&/```/g.test(S.split(` `)[S.split(` `).length-1])&&f.trim()?` `+w:" "}${f}`,R=qu(),k=fb(D,R),B="fake"+ut.randomId(16);let L=!1;const _=n.plugins.getPlugin("templater-obsidian");let V;if(k?V=k:(_!=null&&_.templater&&(_!=null&&_.settings.trigger_on_file_creation)&&(be.setWaitingForTemplater({origin:e.content,date:D,isList:e.thinoType&&e.thinoType==="JOURNAL",id:B,type:"web"}),L=!0),V=await ut.createDailyNoteCheck(D)),!V){new x.Notice(E("Failed to create daily note, check if it exists.")),new x.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 $=n.workspace.getLeavesOfType("thino_view").first();n.workspace.trigger("send-to-thino",e.content,$);return}if(k||await ft.fechLocalDailyNotes(),_&&(_!=null&&_.templater)&&(_!=null&&_.settings.trigger_on_file_creation)&&L)return dt.setChangedByMemos(!0),{id:B,content:e.content,deletedAt:e.deletedAt??"",createdAt:D.format("YYYY/MM/DD HH:mm:ss"),updatedAt:D.format("YYYY/MM/DD HH:mm:ss"),thinoType:e.thinoType||"JOURNAL",path:V.path,hasId:"",linkId:"",pinned:e.pinned??!1,visibility:"PUBLIC",rowStatus:e.rowStatus??"NORMAL",webId:e.webId||e.id,creatorName:"Thino",resourceList:[],sourceType:"DAILY",fileInfo:(e==null?void 0:e.fileInfo)||{tags:[],frontmatter:{}}};const Y=n.metadataCache.getFileCache(V),Z={tags:((fe=Y==null?void 0:Y.frontmatter)==null?void 0:fe.tags)||[],frontmatter:(Y==null?void 0:Y.frontmatter)||{}};let Q="";try{Q=await t.read(V)||await t.cachedRead(V)}catch($){console.error($),new x.Notice(E("Failed to read current daily note, check if it exists."))}const K=c==="end"?"":e.thinoType&&i&&l||a,se=await pA(K,N,Q);await t.modify(V,se.content);const le=se.posNum===-1?mA(se.content).length-1:se.posNum+1;return dt.setChangedByMemos(!0),{id:D.format("YYYYMMDDHHmm")+"00"+le,content:e.content,deletedAt:e.deletedAt??"",createdAt:D.format("YYYY/MM/DD HH:mm:ss"),updatedAt:D.format("YYYY/MM/DD HH:mm:ss"),thinoType:e.thinoType||"JOURNAL",path:V.path,hasId:"",linkId:"",pinned:e.pinned??!1,visibility:"PUBLIC",rowStatus:e.rowStatus??"NORMAL",webId:e.id,creatorName:"Thino",resourceList:[],sourceType:"DAILY",fileInfo:Z}}async function pA(e,t,n){const r=new RegExp(`(s*?)${await QR(e)}(s*?)`),a=XR(n),o=a.findIndex(f=>r.test(f)),i=(e==null?void 0:e.trim())===""?!0:o===-1;i&&console.error("unable to find insert after line in file.");const l=a.slice(o+1).findIndex(f=>/(^#+ |---|^\^[a-zA-Z0-9-]{2,}$)/.test(f)),c=l!==-1;if(c){let f;for(let h=l+o;h>o;h--)if(!/^[\s\n ]*$/.test(a[h])){f=h;break}return f||(f=o),await LC(t,n,i?-1:f,c)}else return await LC(t,n,a.length-1,c)}async function LC(e,t,n,r){if(n<-1)throw new Error("Invalid position");if(n===-1)return{content:`${t} ${e}`,posNum:-1};const a=t.split(` `),o=a.slice(0,n+1).join(` `),i=a.slice(n+1).join(` `),l=i.trim().length>0;return{content:`${o}${!l&&!r||!o.endsWith(` `)?` `:""}${e}${(l||r?` `:"")+i}`,posNum:n}}const mA=e=>e.split(/\r?\n/);async function r_(e){const t=Le.getState().dailyNotesState.app,n=t.vault.getAbstractFileByPath(e.path);if(!(n instanceof x.TFile)){new x.Notice(E("File not found for the given thino path"));return}await t.vault.delete(n)}async function a_(e){const t=Le.getState().dailyNotesState.app,n=t.vault.getAbstractFileByPath(e.path);if(!(n instanceof x.TFile)){new x.Notice(E("File not found for the given thino path"));return}const a=(await t.vault.read(n)).split(` `),o=a.findIndex(c=>c.includes(e.id));if(o===-1){new x.Notice(E("Thino not found"));return}const i=a.findIndex((c,f)=>f>o&&c.trim()==="");i===-1?a.splice(o,a.length-o):a.splice(o,i-o);const l=a.join(` `);if(!l){new x.Notice(E("Thino not found"));return}dt.setChangedByMemos(!0),await t.vault.modify(n,l)}async function o_(e){const t=Le.getState().dailyNotesState.app,n=t.metadataCache.getFirstLinkpathDest("",e.path);if(!n){new x.Notice(E("File not found for the given thino path"));return}const r=await t.vault.read(n),a=JSON.parse(r),o=a.nodes,i=o.findIndex(h=>h.id===e.id);if(i===-1){new x.Notice(E("Thino not found"));return}o.splice(i,1);const l=a.edges;l.filter(h=>h.fromNode===e.id||h.toNode===e.id).forEach(h=>{const g=l.findIndex(y=>y.id===h.id);g!==-1&&l.splice(g,1)}),dt.setChangedByMemos(!0);const f=JSON.stringify(a,null,2);await t.vault.modify(n,f)}async function i_(e){cA()||new x.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}=Le.getState().dailyNotesState.app,r=e.path,a=t.getAbstractFileByPath(r);if(!a){new x.Notice(E("Please check your daily note plugin OR periodic notes plugin settings"));return}const o=await t.read(a),i=o.split(` `),l=n.getFileCache(a),c=(l==null?void 0:l.listItems)||[],f=parseInt(e.id.slice(14));let h=f;function g(D,I){const M=[];for(const N in I)I[N]===D&&M.push(parseInt(N),...g(parseInt(N),I));return M}const y=x2(c),w=c.find(D=>D.position.start.line===f),S=g(f,y);if(S.length>0){const D=S.map(I=>{const M=c.find(N=>N.position.start.line===I);return M?M.position.end.line:-1});h=Math.max(...D,w.position.end.line)}else h=w.position.end.line;if(!o){new x.Notice(E("Thino not found"));return}dt.setChangedByMemos(!0),i.splice(f,h-f+1),await t.modify(a,i.join(` `))}async function s_(){const{vault:e,metadataCache:t}=Le.getState().dailyNotesState.app,n=Le.getState().dailyNotesState.settings,a=hb()+"/"+n.DeleteFileName+".md",o=[],i=t.getFirstLinkpathDest("",a);if(i instanceof x.TFile){let l=await e.read(i),c=l_(l);if(c.length===0)return o;for(let f=0;fe.split(/\r?\n/),u_=e=>{var t;return(t=/^- (\d{14})(\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e))==null?void 0:t[1]},c_=e=>{var t;return(t=/^- (\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e))==null?void 0:t[2]},d_=e=>{var t;return(t=/^- (\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e))==null?void 0:t[4]};async function f_(e){const t=await Pp(Le.getState().dailyNotesState.app)||[],n=t.findIndex(r=>r.id===e);t.splice(n,1),await Mv(Le.getState().dailyNotesState.app,t)}const h_=async e=>{const{app:t}=Le.getState().dailyNotesState,n=await Pp(t)||[],r=n.find(a=>a.id===e);if(r){const a=x.moment().format("YYYY/MM/DD HH:mm:ss");return r.pinnedAt=a,await Mv(t,n),a}else{new x.Notice(E("Query not found"));return}},p_=async e=>{const{app:t}=Le.getState().dailyNotesState,n=await Pp(t)||[],r=n.find(a=>a.id===e);if(r){r.pinnedAt="",await Mv(t,n);return}else{new x.Notice(E("Query not found"));return}};function m_(e,t){const n=/%%(.*?)%%/,r=e.match(n);if(!r)return e;const a=r[1].trim(),o={};a.split(" ").forEach(l=>{const[c,f]=l.slice(1,-1).split("::");o[c]=f});for(const l of Object.keys(t))if(l!=="id"&&l!=="content"){if(l==="rowStatus"&&t.rowStatus==="ARCHIVED"){o.archived="true";continue}else if(l==="rowStatus"&&t.rowStatus==="NORMAL"){delete o.archived;continue}if(l==="deleted"&&t.deleted){const c=x.moment().format("YYYYMMDDHHmmss");o.deleted=c}else typeof t[l]=="boolean"?t[l]?o[l]="true":delete o[l]:t[l]&&(o[l]=t[l])}const i=Object.entries(o).map(([l,c])=>`[${l}::${c}]`).join(" ");return e.replace(n,`%% ${i} %%`)}async function js(e,t){if(!e.sourceType||e.sourceType!=="MULTI")return e;const{vault:n,fileManager:r}=Le.getState().dailyNotesState.app,a=n.getAbstractFileByPath(e.path);if(!a)return e;const o=x.moment();if(await r.processFrontMatter(a,i=>{(t.pinned!==void 0||t.thinoType||t.rowStatus||t.visibility||t.deleted)&&dt.setChangedByMemos(!0),t.id&&(i.id=t.id),t.thinoType&&(i.thinoType=t.thinoType),t.rowStatus&&(i.rowStatus=t.rowStatus),t.visibility&&(i.visibility=t.visibility),t.webId&&(i.webId=t.webId),t.pinned!==void 0&&(i.pinned=t.pinned),t.deleted!==void 0&&(i.deletedAt=t.deleted?o.format("YYYY/MM/DD HH:mm:ss"):""),i.createdAt||(i.createdAt=o.format("YYYY/MM/DD HH:mm:ss")),i.updatedAt=o.format("YYYY/MM/DD HH:mm:ss")}),t.content){const i=await n.read(a);let l=i;const c=t.content.replace(/\$/g,"$$$$");l=i.replace(e.content,c),await n.modify(a,l)}return 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:x.moment().format("YYYY/MM/DD HH:mm:ss"),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 Ll(e,t){if(!e.sourceType||e.sourceType!=="FILE")return e;const{vault:n}=Le.getState().dailyNotesState.app,r=n.getAbstractFileByPath(e.path);if(!r)return e;const a=x.moment();let o="";try{o=await n.read(r)}catch(M){console.error(M),o=await n.cachedRead(r)}const i=o.split(/\r?\n/),l=i.findIndex(M=>M.includes(e.id)||e.webId&&M.includes(e.webId)),c=i[l];if(!c)return e;const f=m_(c,t);if(!c)return e;const h=f+` `,g=i.findIndex((M,N)=>N>l&&M.trim()==="");let y="";g===-1&&(y=i.slice(l+1).join(` `)),g!==-1&&(y=i.slice(l+1,g).join(` `));let w=y;t!=null&&t.content&&(w=t.content.split(/\r?\n/).map(k=>"> "+k).join(` `));const D=(h+w).split(/\r?\n/);i.splice(l,g?g-l:i.length-l,...D);const I=i.join(` `);return await n.modify(r,I),dt.setChangedByMemos(!0),{...e,id:t.id||e.id,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt||a.format("YYYY/MM/DD HH:mm:ss"),updatedAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),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?a.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}async function Rl(e,t){if(!e.sourceType||e.sourceType!=="CANVAS")return e;const{vault:n}=Le.getState().dailyNotesState.app,r=n.getAbstractFileByPath(e.path);if(!r)return e;const a=await n.read(r),o=JSON.parse(a),i=o.nodes.find(f=>f.id===e.id);if(!i)return e;t.content&&(i.text=t.content),t.thinoType&&(i.thinoType=t.thinoType),t.rowStatus&&(i.rowStatus=t.rowStatus),t.visibility&&(i.visibility=t.visibility),t.pinned!==void 0&&(i.pinned=t.pinned),t.webId&&(i.webId=t.webId);const l=x.moment();t.deleted!==void 0&&(i.deletedAt=t.deleted?l.format("YYYY/MM/DD HH:mm:ss"):""),i.updatedAt=l.format("YYYY/MM/DD HH:mm:ss");const c=JSON.stringify(o,null,2);return await n.modify(r,c),dt.setChangedByMemos(!0),{...e,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt,updatedAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),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?l.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}async function _l(e,t){var se;cA()||new x.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}=Le.getState().dailyNotesState.app,a=Le.getState().dailyNotesState.app,{settings:o}=Le.getState().dailyNotesState,i=e.id.toString().slice(0,14),l=x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(x.moment(i,"YYYYMMDDHHmmss"))?x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"):x.moment(i,"YYYYMMDDHHmmss"),c=x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(l,"day"),f=e.path,h=n.getAbstractFileByPath(f)||n.getAbstractFileByPath(e.path);if(!h)return new x.Notice(E("Please check your daily note plugin OR periodic notes plugin settings")),e;const y=(await n.read(h)).split(` `),w=r.getFileCache(h),S=(w==null?void 0:w.listItems)||[];if(S.length===0)return new x.Notice(E("Thino not found")),e;const D=parseInt(e.id.slice(14));let I=D;function M(le,fe){const $=[];for(const he in fe)fe[he]===le&&$.push(parseInt(he),...M(parseInt(he),fe));return $}const N=x2(S),R=S.find(le=>le.position.start.line===D);if(!R)return new x.Notice(E("Thino not found")),e;const k=M(D,N);if(k.length>0){const le=k.map(fe=>{const $=S.find(he=>he.position.start.line===fe);return $?$.position.end.line:-1});I=Math.max(...le,R.position.end.line)}else I=R.position.end.line;const B=y.slice(D,I+1);let L=B.join(` `);const _=c?x.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 x.Notice(E("Thino not found")),e;const V=a.vault.getConfig("useTab")===void 0||app.vault.getConfig("useTab")===!0,Y=V?1:a.vault.getConfig("tabSize"),Z=(V?" ":" ").repeat(Y);let Q=_;if(o.DefaultTimePrefix!=="HH:mm"&&(Q=x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format(o.DefaultTimePrefix)),t.content){const le=e.thinoType==="TASK-TODO"?"- [ ] ":e.thinoType==="TASK-DONE"?"- [x] ":e.thinoType.startsWith("TASK")?`- [${e.thinoType.slice(5)}] `:"- ",fe=(e.pinned?" [pinned::true]":"")+(e.deletedAt?` [deleted::${e.deletedAt}]`:"")+(e.rowStatus==="ARCHIVED"?" [archived::true]":"")+(e.webId?" [webId::"+e.webId+"]":""),$=t.content.trim().split(` `)[t.content.trim().split(` `).length-1].trim(),he=e.hasId&&t.content.trim().split(` `).length>1&&new RegExp(/(-|\*|\d{1,2}\.)\s/g).test($)?" ^"+e.hasId:" ";L=`${le}${Q}${he}${t.content.trim().split(` `).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(t.content)?` `+Z:""}${t.content.trim().split(` `).join(` `+Z)}${/((-|\*|\d\.|>)\s|```)/g.test(t.content.split(` `)[t.content.split(` `).length-1])?` `+Z:" "}${fe.trim()}`}if(t.thinoType){const le=t.thinoType==="TASK-TODO"?"- [ ] ":t.thinoType==="TASK-DONE"?"- [x] ":t.thinoType.startsWith("TASK")?`- [${t.thinoType.slice(5)}] `:"- ";L=L.replace(/^((- \[.\] )|((-|\*) ))/,le)}if(t.rowStatus){const le=t.rowStatus==="ARCHIVED"?"[archived::"+(t.rowStatus==="ARCHIVED"?"true":"false")+"]":"";L=L.includes("[archived::")?L.replace(/\[archived::(true|false)\]/,le):L+`${/((-|\*|\d\.|>)\s|```)/g.test(L.split(` `)[L.split(` `).length-1])?` `+Z:" "}`+le}if(t.visibility){const le='[visibility::"'+t.visibility+'"]';L=L.includes("[visibility::")?L.replace(/\[visibility::"(PUBLIC|PROTECTED)"\]/g,le):L+`${/((-|\*|\d\.|>)\s|```)/g.test(L.split(` `)[L.split(` `).length-1])?` `+Z:" "}`+le}if(t.pinned!==void 0){const le=t.pinned?"[pinned::"+(t.pinned?"true":"false")+"]":"";L=L.includes("[pinned::")?L.replace(/\[pinned::(true|false)\]/,t.pinned===!1?"":le):L+`${/((-|\*|\d\.|>)\s|```)/g.test(L.split(` `)[L.split(` `).length-1])?` `+Z:" "}`+le}if(t.webId!==void 0){const le="[webId::"+t.webId+"]";L=L.includes("[webId::")?L.replace(/\[webId::([^\]]+)\]/,t.webId===""?"":le):L+`${/((-|\*|\d\.|>)\s|```)/g.test(L.split(` `)[L.split(` `).length-1])?` `+Z:" "}`+le}const K=x.moment();if(t.deleted!==void 0){const le="[deleted::"+K.format("YYYYMMDDHHmmss")+"]";t.deleted?(L=L.replace(/\[deleted::([^\]]+)\]/,""),L=L+`${/((-|\*|\d\.|>)\s|```)/g.test(L.split(` `)[L.split(` `).length-1])?` `+Z:" "}`+le):t.deleted===!1&&(L=L.replace(/\[deleted::([^\]]+)\]/,""))}if(e.hasId&&((se=t.content)==null?void 0:se.split(` `).length)===1){const le=" ^"+e.hasId;L=L.trim().replace(/\s\^([0-9a-zA-Z-]+)($|\n)/g,"")+`${/((-|\*|\d\.|>)\s|```)/g.test(L.split(` `)[L.split(` `).length-1])?` `+Z:" "}`+le}return L!==B.join(` `)?(y.splice(D,I-R.position.start.line+1,L.trim()),await n.modify(h,y.join(` `)),dt.setChangedByMemos(!0),{...e,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt,updatedAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),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?K.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}):e}async function g_(e,t,n){var M;const{vault:r,metadataCache:a}=Le.getState().dailyNotesState.app||window.app,o=r.getFileByPath(e);if(!o)return;const i=((M=a.getFileCache(o))==null?void 0:M.listItems)||[],l=x2(i),c=[],f=r.getConfig("useTab")===void 0||app.vault.getConfig("useTab")===!0,h=f?1:r.getConfig("tabSize"),g=(f?" ":" ").repeat(h);function y(N,R){const k=[];for(const B in R)R[B]===N&&k.push(parseInt(B),...y(parseInt(B),R));return k}const w=x.moment(),S=t.map(N=>{const R=i.find(_=>_.position.start.line===parseInt(N.id.slice(14))),B=y(parseInt(N.id.slice(14)),l).map(_=>{const V=i.find(Y=>Y.position.start.line===_);return V?V.position.end.line:-1}),L=Math.max(...B,R.position.end.line);return{id:N.id,start:R.position.start.line,end:L}}),I=(await r.read(o)).split(` `);return S.forEach(N=>{const k=I.slice(N.start,N.end+1).join(` `),L=k.split(` `)[k.split(` `).length-1].trim();let _=k;if(n==="delete"){const V="[deleted::"+w.format("YYYYMMDDHHmmss")+"]";_=_.replace(/\[deleted::([^\]]+)\]/,""),_=k+`${k.split(` `).length>1&&/```/g.test(L)?` `+g:" "}`+V}if(n==="restoreFromDelete"&&(_=_.replace(/ ?\[deleted::([^\]]+)\]/,"")),n==="archive"){const V="[archived::true]";_=_.includes("[archived::")?_.replace(/\[archived::(true|false)\]/,V):_+`${_.split(` `).length>1&&/```/g.test(L)?` `+g:" "}`+V}n==="restoreFromArchive"&&(_=_.replace(/ ?\[archived::(true|false)\]/,"")),n==="deleteForever"?I.splice(N.start,N.end-N.start+1):I.splice(N.start,N.end-N.start+1,_),c.push({...t.find(V=>V.id===N.id),deletedAt:n==="delete"?w.format("YYYY/MM/DD HH:mm:ss"):"",rowStatus:n==="archive"?"ARCHIVED":"NORMAL"})}),await r.modify(o,I.join(` `)),dt.setChangedByMemos(!0),c}const v_=e=>{switch(e==null?void 0:e.sourceType){case"CANVAS":return Rl(e,{id:e.id,pinned:!0});case"DAILY":return _l(e,{id:e.id,pinned:!0});case"MULTI":return js(e,{id:e.id,pinned:!0});case"FILE":return Ll(e,{id:e.id,pinned:!0})}},y_=e=>{switch(e==null?void 0:e.sourceType){case"CANVAS":return Rl(e,{id:e.id,pinned:!1});case"DAILY":return _l(e,{id:e.id,pinned:!1});case"MULTI":return js(e,{id:e.id,pinned:!1});case"FILE":return Ll(e,{id:e.id,pinned:!1})}};var dT;(e=>{async function t(D){return await OC(D)}e.getMyMemos=t;async function n(D){return await OC([D])}e.updateSpecificTypeMemo=n;function r(){return s_()}e.getMyDeletedMemos=r;function a(D){const I=be.getMemoById(D);if(I)switch(I==null?void 0:I.sourceType){case"DAILY":return _l(I,{id:I.id,deleted:!1});case"CANVAS":return Rl(I,{id:I.id,deleted:!1});case"MULTI":return js(I,{id:I.id,deleted:!1});case"FILE":return Ll(I,{id:I.id,deleted:!1})}}e.restoreMemo=a;function o(D){return a_(D)}e.deleteMemoInSingleFile=o;function i(D){return r_(D)}e.deleteMemoInMultiFiles=i;function l(D){return i_(D)}e.deleteMemoInDailyNote=l;function c(D){return o_(D)}e.deleteMemoInCanvas=c;function f(){return SR()}e.getMyQueries=f;async function h(D,I){return await TR(D,I)}e.createQuery=h;function g(D,I,M){return UR(D,I,M)}e.updateQuery=g;function y(D){return f_(D)}e.deleteQueryById=y;function w(D){return h_(D)}e.pinQuery=w;function S(D){return p_(D)}e.unpinQuery=S})(dT||(dT={}));const Ko=dT;var Gu={};Object.defineProperty(Gu,"__esModule",{value:!0});class Nf extends Error{}class w_ extends Nf{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class b_ extends Nf{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class S_ extends Nf{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Og extends Nf{}class gA extends Nf{constructor(t){super(`Invalid unit ${t}`)}}class Xi extends Nf{}class Bc extends Nf{constructor(){super("Zone is an abstract class")}}const gt="numeric",zs="short",Mi="long",Ew={year:gt,month:gt,day:gt},vA={year:gt,month:zs,day:gt},D_={year:gt,month:zs,day:gt,weekday:zs},yA={year:gt,month:Mi,day:gt},wA={year:gt,month:Mi,day:gt,weekday:Mi},bA={hour:gt,minute:gt},SA={hour:gt,minute:gt,second:gt},DA={hour:gt,minute:gt,second:gt,timeZoneName:zs},TA={hour:gt,minute:gt,second:gt,timeZoneName:Mi},IA={hour:gt,minute:gt,hourCycle:"h23"},EA={hour:gt,minute:gt,second:gt,hourCycle:"h23"},CA={hour:gt,minute:gt,second:gt,hourCycle:"h23",timeZoneName:zs},xA={hour:gt,minute:gt,second:gt,hourCycle:"h23",timeZoneName:Mi},MA={year:gt,month:gt,day:gt,hour:gt,minute:gt},kA={year:gt,month:gt,day:gt,hour:gt,minute:gt,second:gt},NA={year:gt,month:zs,day:gt,hour:gt,minute:gt},AA={year:gt,month:zs,day:gt,hour:gt,minute:gt,second:gt},T_={year:gt,month:zs,day:gt,weekday:zs,hour:gt,minute:gt},FA={year:gt,month:Mi,day:gt,hour:gt,minute:gt,timeZoneName:zs},OA={year:gt,month:Mi,day:gt,hour:gt,minute:gt,second:gt,timeZoneName:zs},PA={year:gt,month:Mi,day:gt,weekday:Mi,hour:gt,minute:gt,timeZoneName:Mi},jA={year:gt,month:Mi,day:gt,weekday:Mi,hour:gt,minute:gt,second:gt,timeZoneName:Mi};class Nv{get type(){throw new Bc}get name(){throw new Bc}get ianaName(){return this.name}get isUniversal(){throw new Bc}offsetName(t,n){throw new Bc}formatOffset(t,n){throw new Bc}offset(t){throw new Bc}equals(t){throw new Bc}get isValid(){throw new Bc}}let SS=null;class gb extends Nv{static get instance(){return SS===null&&(SS=new gb),SS}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return RA(t,n,r)}formatOffset(t,n){return Hg(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let tw={};function I_(e){return tw[e]||(tw[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"})),tw[e]}const E_={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function C_(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,a,o,i,l,c,f,h]=r;return[i,a,o,l,c,f,h]}function x_(e,t){const n=e.formatToParts(t),r=[];for(let a=0;a=0?S:1e3+S,(y-w)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let RC={};function M_(e,t={}){const n=JSON.stringify([e,t]);let r=RC[n];return r||(r=new Intl.ListFormat(e,t),RC[n]=r),r}let fT={};function hT(e,t={}){const n=JSON.stringify([e,t]);let r=fT[n];return r||(r=new Intl.DateTimeFormat(e,t),fT[n]=r),r}let pT={};function k_(e,t={}){const n=JSON.stringify([e,t]);let r=pT[n];return r||(r=new Intl.NumberFormat(e,t),pT[n]=r),r}let mT={};function N_(e,t={}){const{base:n,...r}=t,a=JSON.stringify([e,r]);let o=mT[a];return o||(o=new Intl.RelativeTimeFormat(e,t),mT[a]=o),o}let Pg=null;function A_(){return Pg||(Pg=new Intl.DateTimeFormat().resolvedOptions().locale,Pg)}function F_(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,a;try{r=hT(e).resolvedOptions(),a=e}catch{const c=e.substring(0,n);r=hT(c).resolvedOptions(),a=c}const{numberingSystem:o,calendar:i}=r;return[a,o,i]}}function O_(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function P_(e){const t=[];for(let n=1;n<=12;n++){const r=At.utc(2016,n,1);t.push(e(r))}return t}function j_(e){const t=[];for(let n=1;n<=7;n++){const r=At.utc(2016,11,13+n);t.push(e(r))}return t}function b0(e,t,n,r,a){const o=e.listingMode(n);return o==="error"?null:o==="en"?r(t):a(t)}function L_(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 R_{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:a,floor:o,...i}=r;if(!n||Object.keys(i).length>0){const l={useGrouping:!1,...r};r.padTo>0&&(l.minimumIntegerDigits=r.padTo),this.inf=k_(t,l)}}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):A2(t,3);return Xr(n,this.padTo)}}}class __{constructor(t,n,r){this.opts=r;let a;if(t.zone.isUniversal){const i=-1*(t.offset/60),l=i>=0?`Etc/GMT+${i}`:`Etc/GMT${i}`;t.offset!==0&&Yu.create(l).valid?(a=l,this.dt=t):(a="UTC",r.timeZoneName?this.dt=t:this.dt=t.offset===0?t:At.fromMillis(t.ts+t.offset*60*1e3))}else t.zone.type==="system"?this.dt=t:(this.dt=t,a=t.zone.name);const o={...this.opts};o.timeZone=o.timeZone||a,this.dtf=hT(n,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class B_{constructor(t,n,r){this.opts={style:"long",...r},!n&&LA()&&(this.rtf=N_(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):nB(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}class ur{static fromOpts(t){return ur.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,n,r,a=!1){const o=t||Qr.defaultLocale,i=o||(a?"en-US":A_()),l=n||Qr.defaultNumberingSystem,c=r||Qr.defaultOutputCalendar;return new ur(i,l,c,o)}static resetCache(){Pg=null,fT={},pT={},mT={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r}={}){return ur.create(t,n,r)}constructor(t,n,r,a){const[o,i,l]=F_(t);this.locale=o,this.numberingSystem=n||i||null,this.outputCalendar=r||l||null,this.intl=O_(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=L_(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:ur.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 b0(this,t,r,HA,()=>{const a=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=P_(i=>this.extract(i,a,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1,r=!0){return b0(this,t,r,zA,()=>{const a=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=j_(i=>this.extract(i,a,"weekday"))),this.weekdaysCache[o][t]})}meridiems(t=!0){return b0(this,void 0,t,()=>VA,()=>{if(!this.meridiemCache){const n={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[At.utc(2016,11,13,9),At.utc(2016,11,13,19)].map(r=>this.extract(r,n,"dayperiod"))}return this.meridiemCache})}eras(t,n=!0){return b0(this,t,n,WA,()=>{const r={era:t};return this.eraCache[t]||(this.eraCache[t]=[At.utc(-40,1,1),At.utc(2017,1,1)].map(a=>this.extract(a,r,"era"))),this.eraCache[t]})}extract(t,n,r){const a=this.dtFormatter(t,n),o=a.formatToParts(),i=o.find(l=>l.type.toLowerCase()===r);return i?i.value:null}numberFormatter(t={}){return new R_(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new __(t,this.intl,n)}relFormatter(t={}){return new B_(this.intl,this.isEnglish(),t)}listFormatter(t={}){return M_(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 DS=null;class ko extends Nv{static get utcInstance(){return DS===null&&(DS=new ko(0)),DS}static instance(t){return t===0?ko.utcInstance:new ko(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new ko(yb(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Hg(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Hg(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Hg(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 H_ extends Nv{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 qc(e,t){if(Cn(e)||e===null)return t;if(e instanceof Nv)return e;if(Y_(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?gb.instance:n==="utc"||n==="gmt"?ko.utcInstance:ko.parseSpecifier(n)||Yu.create(e)}else return df(e)?ko.instance(e):typeof e=="object"&&e.offset&&typeof e.offset=="number"?e:new H_(e)}let _C=()=>Date.now(),BC="system",HC=null,YC=null,UC=null,zC=60,VC;class Qr{static get now(){return _C}static set now(t){_C=t}static set defaultZone(t){BC=t}static get defaultZone(){return qc(BC,gb.instance)}static get defaultLocale(){return HC}static set defaultLocale(t){HC=t}static get defaultNumberingSystem(){return YC}static set defaultNumberingSystem(t){YC=t}static get defaultOutputCalendar(){return UC}static set defaultOutputCalendar(t){UC=t}static get twoDigitCutoffYear(){return zC}static set twoDigitCutoffYear(t){zC=t%100}static get throwOnInvalid(){return VC}static set throwOnInvalid(t){VC=t}static resetCaches(){ur.resetCache(),Yu.resetCache()}}function Cn(e){return typeof e>"u"}function df(e){return typeof e=="number"}function vb(e){return typeof e=="number"&&e%1===0}function Y_(e){return typeof e=="string"}function U_(e){return Object.prototype.toString.call(e)==="[object Date]"}function LA(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function z_(e){return Array.isArray(e)?e:[e]}function WC(e,t,n){if(e.length!==0)return e.reduce((r,a)=>{const o=[t(a),a];return r&&n(r[0],o[0])===r[0]?r:o},null)[1]}function V_(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function vp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Bu(e,t,n){return vb(e)&&e>=t&&e<=n}function W_(e,t){return e-t*Math.floor(e/t)}function Xr(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function Zc(e){if(!(Cn(e)||e===null||e===""))return parseInt(e,10)}function Qd(e){if(!(Cn(e)||e===null||e===""))return parseFloat(e)}function N2(e){if(!(Cn(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function A2(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function Av(e){return e%4===0&&(e%100!==0||e%400===0)}function Bg(e){return Av(e)?366:365}function Cw(e,t){const n=W_(t-1,12)+1,r=e+(t-n)/12;return n===2?Av(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function F2(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 xw(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 gT(e){return e>99?e:e>Qr.twoDigitCutoffYear?1900+e:2e3+e}function RA(e,t,n,r=null){const a=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(o.timeZone=r);const i={timeZoneName:t,...o},l=new Intl.DateTimeFormat(n,i).formatToParts(a).find(c=>c.type.toLowerCase()==="timezonename");return l?l.value:null}function yb(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,a=n<0||Object.is(n,-0)?-r:r;return n*60+a}function _A(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new Xi(`Invalid unit value ${e}`);return t}function Mw(e,t){const n={};for(const r in e)if(vp(e,r)){const a=e[r];if(a==null)continue;n[t(r)]=_A(a)}return n}function Hg(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),a=e>=0?"+":"-";switch(t){case"short":return`${a}${Xr(n,2)}:${Xr(r,2)}`;case"narrow":return`${a}${n}${r>0?`:${r}`:""}`;case"techie":return`${a}${Xr(n,2)}${Xr(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function wb(e){return V_(e,["hour","minute","second","millisecond"])}const $_=["January","February","March","April","May","June","July","August","September","October","November","December"],BA=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Z_=["J","F","M","A","M","J","J","A","S","O","N","D"];function HA(e){switch(e){case"narrow":return[...Z_];case"short":return[...BA];case"long":return[...$_];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 YA=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],UA=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],q_=["M","T","W","T","F","S","S"];function zA(e){switch(e){case"narrow":return[...q_];case"short":return[...UA];case"long":return[...YA];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const VA=["AM","PM"],G_=["Before Christ","Anno Domini"],J_=["BC","AD"],K_=["B","A"];function WA(e){switch(e){case"narrow":return[...K_];case"short":return[...J_];case"long":return[...G_];default:return null}}function Q_(e){return VA[e.hour<12?0:1]}function X_(e,t){return zA(t)[e.weekday-1]}function eB(e,t){return HA(t)[e.month-1]}function tB(e,t){return WA(t)[e.year<0?0:1]}function nB(e,t,n="always",r=!1){const a={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."]},o=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&o){const g=e==="days";switch(t){case 1:return g?"tomorrow":`next ${a[e][0]}`;case-1:return g?"yesterday":`last ${a[e][0]}`;case 0:return g?"today":`this ${a[e][0]}`}}const i=Object.is(t,-0)||t<0,l=Math.abs(t),c=l===1,f=a[e],h=r?c?f[1]:f[2]||f[1]:c?a[e][0]:e;return i?`${l} ${h} ago`:`in ${l} ${h}`}function $C(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const rB={D:Ew,DD:vA,DDD:yA,DDDD:wA,t:bA,tt:SA,ttt:DA,tttt:TA,T:IA,TT:EA,TTT:CA,TTTT:xA,f:MA,ff:NA,fff:FA,ffff:PA,F:kA,FF:AA,FFF:OA,FFFF:jA};class uo{static create(t,n={}){return new uo(t,n)}static parseFormat(t){let n=null,r="",a=!1;const o=[];for(let i=0;i0&&o.push({literal:a,val:r}),n=null,r="",a=!a):a||l===n?r+=l:(r.length>0&&o.push({literal:!1,val:r}),r=l,n=l)}return r.length>0&&o.push({literal:a,val:r}),o}static macroTokenToFormatOpts(t){return rB[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 Xr(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",a=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(w,S)=>this.loc.extract(t,w,S),i=w=>t.isOffsetFixed&&t.offset===0&&w.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,w.format):"",l=()=>r?Q_(t):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(w,S)=>r?eB(t,w):o(S?{month:w}:{month:w,day:"numeric"},"month"),f=(w,S)=>r?X_(t,w):o(S?{weekday:w}:{weekday:w,month:"long",day:"numeric"},"weekday"),h=w=>{const S=uo.macroTokenToFormatOpts(w);return S?this.formatWithSystemDefault(t,S):w},g=w=>r?tB(t,w):o({era:w},"era"),y=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 i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({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 l();case"d":return a?o({day:"numeric"},"day"):this.num(t.day);case"dd":return a?o({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 a?o({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return a?o({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return a?o({month:"numeric"},"month"):this.num(t.month);case"MM":return a?o({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return a?o({year:"numeric"},"year"):this.num(t.year);case"yy":return a?o({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return a?o({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return a?o({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 h(w)}};return $C(uo.parseFormat(n),y)}formatDurationFromString(t,n){const r=c=>{switch(c[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}},a=c=>f=>{const h=r(f);return h?this.num(c.get(h),f.length):f},o=uo.parseFormat(n),i=o.reduce((c,{literal:f,val:h})=>f?c:c.concat(h),[]),l=t.shiftTo(...i.map(r).filter(c=>c));return $C(o,a(l))}}class Bs{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const $A=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Rp(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function _p(...e){return t=>e.reduce(([n,r,a],o)=>{const[i,l,c]=o(t,a);return[{...n,...i},l||r,c]},[{},null,1]).slice(0,2)}function Bp(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const a=n.exec(e);if(a)return r(a)}return[null,null]}function ZA(...e){return(t,n)=>{const r={};let a;for(a=0;aw!==void 0&&(S||w&&h)?-w:w;return[{years:y(Qd(n)),months:y(Qd(r)),weeks:y(Qd(a)),days:y(Qd(o)),hours:y(Qd(i)),minutes:y(Qd(l)),seconds:y(Qd(c),c==="-0"),milliseconds:y(N2(f),g)}]}const gB={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 j2(e,t,n,r,a,o,i){const l={year:t.length===2?gT(Zc(t)):Zc(t),month:BA.indexOf(n)+1,day:Zc(r),hour:Zc(a),minute:Zc(o)};return i&&(l.second=Zc(i)),e&&(l.weekday=e.length>3?YA.indexOf(e)+1:UA.indexOf(e)+1),l}const vB=/^(?:(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 yB(e){const[,t,n,r,a,o,i,l,c,f,h,g]=e,y=j2(t,a,r,n,o,i,l);let w;return c?w=gB[c]:f?w=0:w=yb(h,g),[y,new ko(w)]}function wB(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const bB=/^(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$/,SB=/^(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$/,DB=/^(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 ZC(e){const[,t,n,r,a,o,i,l]=e;return[j2(t,a,r,n,o,i,l),ko.utcInstance]}function TB(e){const[,t,n,r,a,o,i,l]=e;return[j2(t,l,n,r,a,o,i),ko.utcInstance]}const IB=Rp(oB,P2),EB=Rp(iB,P2),CB=Rp(sB,P2),xB=Rp(GA),KA=_p(fB,Hp,Fv,Ov),MB=_p(lB,Hp,Fv,Ov),kB=_p(uB,Hp,Fv,Ov),NB=_p(Hp,Fv,Ov);function AB(e){return Bp(e,[IB,KA],[EB,MB],[CB,kB],[xB,NB])}function FB(e){return Bp(wB(e),[vB,yB])}function OB(e){return Bp(e,[bB,ZC],[SB,ZC],[DB,TB])}function PB(e){return Bp(e,[pB,mB])}const jB=_p(Hp);function LB(e){return Bp(e,[hB,jB])}const RB=Rp(cB,dB),_B=Rp(JA),BB=_p(Hp,Fv,Ov);function HB(e){return Bp(e,[RB,KA],[_B,BB])}const YB="Invalid Duration",QA={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}},UB={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},...QA},Qi=146097/400,Kh=146097/4800,zB={years:{quarters:4,months:12,weeks:Qi/7,days:Qi,hours:Qi*24,minutes:Qi*24*60,seconds:Qi*24*60*60,milliseconds:Qi*24*60*60*1e3},quarters:{months:3,weeks:Qi/28,days:Qi/4,hours:Qi*24/4,minutes:Qi*24*60/4,seconds:Qi*24*60*60/4,milliseconds:Qi*24*60*60*1e3/4},months:{weeks:Kh/7,days:Kh,hours:Kh*24,minutes:Kh*24*60,seconds:Kh*24*60*60,milliseconds:Kh*24*60*60*1e3},...QA},nf=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],VB=nf.slice(0).reverse();function Hc(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 bt(r)}function WB(e){return e<0?Math.floor(e):Math.ceil(e)}function XA(e,t,n,r,a){const o=e[a][n],i=t[n]/o,l=Math.sign(i)===Math.sign(r[a]),c=!l&&r[a]!==0&&Math.abs(i)<=1?WB(i):Math.trunc(i);r[a]+=c,t[n]-=c*o}function $B(e,t){VB.reduce((n,r)=>Cn(t[r])?n:(n&&XA(e,t,n,t,r),r),null)}function ZB(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class bt{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?zB:UB;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||ur.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return bt.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new Xi(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new bt({values:Mw(t,bt.normalizeUnit),loc:ur.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(df(t))return bt.fromMillis(t);if(bt.isDuration(t))return t;if(typeof t=="object")return bt.fromObject(t);throw new Xi(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=PB(t);return r?bt.fromObject(r,n):bt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=LB(t);return r?bt.fromObject(r,n):bt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new Xi("need to specify a reason the Duration is invalid");const r=t instanceof Bs?t:new Bs(t,n);if(Qr.throwOnInvalid)throw new S_(r);return new bt({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 gA(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?uo.create(this.loc,r).formatDurationFromString(this,t):YB}toHuman(t={}){const n=nf.map(r=>{const a=this.values[r];return Cn(a)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(a)}).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+=A2(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 a=t.format==="basic"?"hhmm":"hh:mm";(!t.suppressSeconds||r.seconds!==0||r.milliseconds!==0)&&(a+=t.format==="basic"?"ss":":ss",(!t.suppressMilliseconds||r.milliseconds!==0)&&(a+=".SSS"));let o=r.toFormat(a);return t.includePrefix&&(o="T"+o),o}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=bt.fromDurationLike(t),r={};for(const a of nf)(vp(n.values,a)||vp(this.values,a))&&(r[a]=n.get(a)+this.get(a));return Hc(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=bt.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]=_A(t(this.values[r],r));return Hc(this,{values:n},!0)}get(t){return this[bt.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...Mw(t,bt.normalizeUnit)};return Hc(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:a}={}){const i={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:a,conversionAccuracy:r};return Hc(this,i)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return $B(this.matrix,t),Hc(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=ZB(this.normalize().shiftToAll().toObject());return Hc(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(i=>bt.normalizeUnit(i));const n={},r={},a=this.toObject();let o;for(const i of nf)if(t.indexOf(i)>=0){o=i;let l=0;for(const f in r)l+=this.matrix[f][i]*r[f],r[f]=0;df(a[i])&&(l+=a[i]);const c=Math.trunc(l);n[i]=c,r[i]=(l*1e3-c*1e3)/1e3;for(const f in a)nf.indexOf(f)>nf.indexOf(i)&&XA(this.matrix,a,f,n,i)}else df(a[i])&&(r[i]=a[i]);for(const i in r)r[i]!==0&&(n[o]+=i===o?r[i]:r[i]/this.matrix[o][i]);return Hc(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 Hc(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,a){return r===void 0||r===0?a===void 0||a===0:r===a}for(const r of nf)if(!n(this.values[r],t.values[r]))return!1;return!0}}const Qh="Invalid Interval";function qB(e,t){return!e||!e.isValid?Or.invalid("missing or invalid start"):!t||!t.isValid?Or.invalid("missing or invalid end"):tt:!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?Or.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(vg).filter(i=>this.contains(i)).sort(),r=[];let{s:a}=this,o=0;for(;a+this.e?this.e:i;r.push(Or.fromDateTimes(a,l)),a=l,o+=1}return r}splitBy(t){const n=bt.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,a=1,o;const i=[];for(;rc*a));o=+l>+this.e?this.e:l,i.push(Or.fromDateTimes(r,o)),r=o,a+=1}return i}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=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=r?null:Or.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.st.e?this.e:t.e;return Or.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((a,o)=>a.s-o.s).reduce(([a,o],i)=>o?o.overlaps(i)||o.abutsStart(i)?[a,o.union(i)]:[a.concat([o]),i]:[a,i],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const a=[],o=t.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),i=Array.prototype.concat(...o),l=i.sort((c,f)=>c.time-f.time);for(const c of l)r+=c.type==="s"?1:-1,r===1?n=c.time:(n&&+n!=+c.time&&a.push(Or.fromDateTimes(n,c.time)),n=null);return Or.merge(a)}difference(...t){return Or.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Qh}toLocaleString(t=Ew,n={}){return this.isValid?uo.create(this.s.loc.clone(n),t).formatInterval(this):Qh}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Qh}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Qh}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Qh}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Qh}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):bt.invalid(this.invalidReason)}mapEndpoints(t){return Or.fromDateTimes(t(this.s),t(this.e))}}class S0{static hasDST(t=Qr.defaultZone){const n=At.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Yu.isValidZone(t)}static normalizeZone(t){return qc(t,Qr.defaultZone)}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:a=null,outputCalendar:o="gregory"}={}){return(a||ur.create(n,r,o)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:a=null,outputCalendar:o="gregory"}={}){return(a||ur.create(n,r,o)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:a=null}={}){return(a||ur.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:a=null}={}){return(a||ur.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return ur.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return ur.create(n,null,"gregory").eras(t)}static features(){return{relative:LA()}}}function qC(e,t){const n=a=>a.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(bt.fromMillis(r).as("days"))}function GB(e,t,n){const r=[["years",(c,f)=>f.year-c.year],["quarters",(c,f)=>f.quarter-c.quarter+(f.year-c.year)*4],["months",(c,f)=>f.month-c.month+(f.year-c.year)*12],["weeks",(c,f)=>{const h=qC(c,f);return(h-h%7)/7}],["days",qC]],a={},o=e;let i,l;for(const[c,f]of r)n.indexOf(c)>=0&&(i=c,a[c]=f(e,t),l=o.plus(a),l>t?(a[c]--,e=o.plus(a)):e=l);return[e,a,l,i]}function JB(e,t,n,r){let[a,o,i,l]=GB(e,t,n);const c=t-a,f=n.filter(g=>["hours","minutes","seconds","milliseconds"].indexOf(g)>=0);f.length===0&&(i0?bt.fromMillis(c,r).shiftTo(...f).plus(h):h}const L2={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},GC={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]},KB=L2.hanidec.replace(/[\[|\]]/g,"").split("");function QB(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=o&&r<=i&&(t+=r-o)}}return parseInt(t,10)}else return t}function Fs({numberingSystem:e},t=""){return new RegExp(`${L2[e||"latn"]}${t}`)}const XB="missing Intl.DateTimeFormat.formatToParts support";function Ln(e,t=n=>n){return{regex:e,deser:([n])=>t(QB(n))}}const eH=" ",e6=`[ ${eH}]`,t6=new RegExp(e6,"g");function tH(e){return e.replace(/\./g,"\\.?").replace(t6,e6)}function JC(e){return e.replace(/\./g,"").replace(t6," ").toLowerCase()}function Os(e,t){return e===null?null:{regex:RegExp(e.map(tH).join("|")),deser:([n])=>e.findIndex(r=>JC(n)===JC(r))+t}}function KC(e,t){return{regex:e,deser:([,n,r])=>yb(n,r),groups:t}}function TS(e){return{regex:e,deser:([t])=>t}}function nH(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function rH(e,t){const n=Fs(t),r=Fs(t,"{2}"),a=Fs(t,"{3}"),o=Fs(t,"{4}"),i=Fs(t,"{6}"),l=Fs(t,"{1,2}"),c=Fs(t,"{1,3}"),f=Fs(t,"{1,6}"),h=Fs(t,"{1,9}"),g=Fs(t,"{2,4}"),y=Fs(t,"{4,6}"),w=I=>({regex:RegExp(nH(I.val)),deser:([M])=>M,literal:!0}),D=(I=>{if(e.literal)return w(I);switch(I.val){case"G":return Os(t.eras("short",!1),0);case"GG":return Os(t.eras("long",!1),0);case"y":return Ln(f);case"yy":return Ln(g,gT);case"yyyy":return Ln(o);case"yyyyy":return Ln(y);case"yyyyyy":return Ln(i);case"M":return Ln(l);case"MM":return Ln(r);case"MMM":return Os(t.months("short",!0,!1),1);case"MMMM":return Os(t.months("long",!0,!1),1);case"L":return Ln(l);case"LL":return Ln(r);case"LLL":return Os(t.months("short",!1,!1),1);case"LLLL":return Os(t.months("long",!1,!1),1);case"d":return Ln(l);case"dd":return Ln(r);case"o":return Ln(c);case"ooo":return Ln(a);case"HH":return Ln(r);case"H":return Ln(l);case"hh":return Ln(r);case"h":return Ln(l);case"mm":return Ln(r);case"m":return Ln(l);case"q":return Ln(l);case"qq":return Ln(r);case"s":return Ln(l);case"ss":return Ln(r);case"S":return Ln(c);case"SSS":return Ln(a);case"u":return TS(h);case"uu":return TS(l);case"uuu":return Ln(n);case"a":return Os(t.meridiems(),0);case"kkkk":return Ln(o);case"kk":return Ln(g,gT);case"W":return Ln(l);case"WW":return Ln(r);case"E":case"c":return Ln(n);case"EEE":return Os(t.weekdays("short",!1,!1),1);case"EEEE":return Os(t.weekdays("long",!1,!1),1);case"ccc":return Os(t.weekdays("short",!0,!1),1);case"cccc":return Os(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return KC(new RegExp(`([+-]${l.source})(?::(${r.source}))?`),2);case"ZZZ":return KC(new RegExp(`([+-]${l.source})(${r.source})?`),2);case"z":return TS(/[a-z_+-/]{1,256}?/i);default:return w(I)}})(e)||{invalidReason:XB};return D.token=e,D}const aH={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 oH(e,t){const{type:n,value:r}=e;if(n==="literal")return{literal:!0,val:r};const a=t[n];let o=aH[n];if(typeof o=="object"&&(o=o[a]),o)return{literal:!1,val:o}}function iH(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function sH(e,t,n){const r=e.match(t);if(r){const a={};let o=1;for(const i in n)if(vp(n,i)){const l=n[i],c=l.groups?l.groups+1:1;!l.literal&&l.token&&(a[l.token.val[0]]=l.deser(r.slice(o,o+c))),o+=c}return[r,a]}else return[r,{}]}function lH(e){const t=o=>{switch(o){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 Cn(e.z)||(n=Yu.create(e.z)),Cn(e.Z)||(n||(n=new ko(e.Z)),r=e.Z),Cn(e.q)||(e.M=(e.q-1)*3+1),Cn(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),Cn(e.u)||(e.S=N2(e.u)),[Object.keys(e).reduce((o,i)=>{const l=t(i);return l&&(o[l]=e[i]),o},{}),n,r]}let IS=null;function uH(){return IS||(IS=At.fromMillis(1555555555555)),IS}function cH(e,t){if(e.literal)return e;const n=uo.macroTokenToFormatOpts(e.val),r=a6(n,t);return r==null||r.includes(void 0)?e:r}function n6(e,t){return Array.prototype.concat(...e.map(n=>cH(n,t)))}function r6(e,t,n){const r=n6(uo.parseFormat(n),e),a=r.map(i=>rH(i,e)),o=a.find(i=>i.invalidReason);if(o)return{input:t,tokens:r,invalidReason:o.invalidReason};{const[i,l]=iH(a),c=RegExp(i,"i"),[f,h]=sH(t,c,l),[g,y,w]=h?lH(h):[null,null,void 0];if(vp(h,"a")&&vp(h,"H"))throw new Og("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:c,rawMatches:f,matches:h,result:g,zone:y,specificOffset:w}}}function dH(e,t,n){const{result:r,zone:a,specificOffset:o,invalidReason:i}=r6(e,t,n);return[r,a,o,i]}function a6(e,t){return e?uo.create(t,e).formatDateTimeParts(uH()).map(a=>oH(a,e)):null}const o6=[0,31,59,90,120,151,181,212,243,273,304,334],i6=[0,31,60,91,121,152,182,213,244,274,305,335];function es(e,t){return new Bs("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function s6(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const a=r.getUTCDay();return a===0?7:a}function l6(e,t,n){return n+(Av(e)?i6:o6)[t-1]}function u6(e,t){const n=Av(e)?i6:o6,r=n.findIndex(o=>oxw(t)?(l=t+1,i=1):l=t,{weekYear:l,weekNumber:i,weekday:o,...wb(e)}}function QC(e){const{weekYear:t,weekNumber:n,weekday:r}=e,a=s6(t,1,4),o=Bg(t);let i=n*7+r-a-3,l;i<1?(l=t-1,i+=Bg(l)):i>o?(l=t+1,i-=Bg(t)):l=t;const{month:c,day:f}=u6(l,i);return{year:l,month:c,day:f,...wb(e)}}function ES(e){const{year:t,month:n,day:r}=e,a=l6(t,n,r);return{year:t,ordinal:a,...wb(e)}}function XC(e){const{year:t,ordinal:n}=e,{month:r,day:a}=u6(t,n);return{year:t,month:r,day:a,...wb(e)}}function fH(e){const t=vb(e.weekYear),n=Bu(e.weekNumber,1,xw(e.weekYear)),r=Bu(e.weekday,1,7);return t?n?r?!1:es("weekday",e.weekday):es("week",e.week):es("weekYear",e.weekYear)}function hH(e){const t=vb(e.year),n=Bu(e.ordinal,1,Bg(e.year));return t?n?!1:es("ordinal",e.ordinal):es("year",e.year)}function c6(e){const t=vb(e.year),n=Bu(e.month,1,12),r=Bu(e.day,1,Cw(e.year,e.month));return t?n?r?!1:es("day",e.day):es("month",e.month):es("year",e.year)}function d6(e){const{hour:t,minute:n,second:r,millisecond:a}=e,o=Bu(t,0,23)||t===24&&n===0&&r===0&&a===0,i=Bu(n,0,59),l=Bu(r,0,59),c=Bu(a,0,999);return o?i?l?c?!1:es("millisecond",a):es("second",r):es("minute",n):es("hour",t)}const CS="Invalid DateTime",ex=864e13;function D0(e){return new Bs("unsupported zone",`the zone "${e.name}" is not supported`)}function xS(e){return e.weekData===null&&(e.weekData=vT(e.c)),e.weekData}function mg(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new At({...n,...t,old:n})}function f6(e,t,n){let r=e-t*60*1e3;const a=n.offset(r);if(t===a)return[r,t];r-=(a-t)*60*1e3;const o=n.offset(r);return a===o?[r,a]:[e-Math.min(a,o)*60*1e3,Math.max(a,o)]}function tx(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 nw(e,t,n){return f6(F2(e),t,n)}function nx(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),a=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,o={...e.c,year:r,month:a,day:Math.min(e.c.day,Cw(r,a))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},i=bt.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"),l=F2(o);let[c,f]=f6(l,n,e.zone);return i!==0&&(c+=i,f=e.zone.offset(c)),{ts:c,o:f}}function gg(e,t,n,r,a,o){const{setZone:i,zone:l}=n;if(e&&Object.keys(e).length!==0){const c=t||l,f=At.fromObject(e,{...n,zone:c,specificOffset:o});return i?f:f.setZone(l)}else return At.invalid(new Bs("unparsable",`the input "${a}" can't be parsed as ${r}`))}function T0(e,t,n=!0){return e.isValid?uo.create(ur.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function MS(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Xr(e.c.year,n?6:4),t?(r+="-",r+=Xr(e.c.month),r+="-",r+=Xr(e.c.day)):(r+=Xr(e.c.month),r+=Xr(e.c.day)),r}function rx(e,t,n,r,a,o){let i=Xr(e.c.hour);return t?(i+=":",i+=Xr(e.c.minute),(e.c.second!==0||!n)&&(i+=":")):i+=Xr(e.c.minute),(e.c.second!==0||!n)&&(i+=Xr(e.c.second),(e.c.millisecond!==0||!r)&&(i+=".",i+=Xr(e.c.millisecond,3))),a&&(e.isOffsetFixed&&e.offset===0&&!o?i+="Z":e.o<0?(i+="-",i+=Xr(Math.trunc(-e.o/60)),i+=":",i+=Xr(Math.trunc(-e.o%60))):(i+="+",i+=Xr(Math.trunc(e.o/60)),i+=":",i+=Xr(Math.trunc(e.o%60)))),o&&(i+="["+e.zone.ianaName+"]"),i}const h6={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},pH={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},mH={ordinal:1,hour:0,minute:0,second:0,millisecond:0},p6=["year","month","day","hour","minute","second","millisecond"],gH=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],vH=["year","ordinal","hour","minute","second","millisecond"];function ax(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 gA(e);return t}function ox(e,t){const n=qc(t.zone,Qr.defaultZone),r=ur.fromObject(t),a=Qr.now();let o,i;if(Cn(e.year))o=a;else{for(const f of p6)Cn(e[f])&&(e[f]=h6[f]);const l=c6(e)||d6(e);if(l)return At.invalid(l);const c=n.offset(a);[o,i]=nw(e,c,n)}return new At({ts:o,zone:n,loc:r,o:i})}function ix(e,t,n){const r=Cn(n.round)?!0:n.round,a=(i,l)=>(i=A2(i,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(i,l)),o=i=>n.calendary?t.hasSame(e,i)?0:t.startOf(i).diff(e.startOf(i),i).get(i):t.diff(e,i).get(i);if(n.unit)return a(o(n.unit),n.unit);for(const i of n.units){const l=o(i);if(Math.abs(l)>=1)return a(l,i)}return a(e>t?-0:0,n.units[n.units.length-1])}function sx(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 At{constructor(t){const n=t.zone||Qr.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new Bs("invalid input"):null)||(n.isValid?null:D0(n));this.ts=Cn(t.ts)?Qr.now():t.ts;let a=null,o=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[a,o]=[t.old.c,t.old.o];else{const l=n.offset(this.ts);a=tx(this.ts,l),r=Number.isNaN(a.year)?new Bs("invalid input"):null,a=r?null:a,o=r?null:l}this._zone=n,this.loc=t.loc||ur.create(),this.invalid=r,this.weekData=null,this.c=a,this.o=o,this.isLuxonDateTime=!0}static now(){return new At({})}static local(){const[t,n]=sx(arguments),[r,a,o,i,l,c,f]=n;return ox({year:r,month:a,day:o,hour:i,minute:l,second:c,millisecond:f},t)}static utc(){const[t,n]=sx(arguments),[r,a,o,i,l,c,f]=n;return t.zone=ko.utcInstance,ox({year:r,month:a,day:o,hour:i,minute:l,second:c,millisecond:f},t)}static fromJSDate(t,n={}){const r=U_(t)?t.valueOf():NaN;if(Number.isNaN(r))return At.invalid("invalid input");const a=qc(n.zone,Qr.defaultZone);return a.isValid?new At({ts:r,zone:a,loc:ur.fromObject(n)}):At.invalid(D0(a))}static fromMillis(t,n={}){if(df(t))return t<-ex||t>ex?At.invalid("Timestamp out of range"):new At({ts:t,zone:qc(n.zone,Qr.defaultZone),loc:ur.fromObject(n)});throw new Xi(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(df(t))return new At({ts:t*1e3,zone:qc(n.zone,Qr.defaultZone),loc:ur.fromObject(n)});throw new Xi("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=qc(n.zone,Qr.defaultZone);if(!r.isValid)return At.invalid(D0(r));const a=Qr.now(),o=Cn(n.specificOffset)?r.offset(a):n.specificOffset,i=Mw(t,ax),l=!Cn(i.ordinal),c=!Cn(i.year),f=!Cn(i.month)||!Cn(i.day),h=c||f,g=i.weekYear||i.weekNumber,y=ur.fromObject(n);if((h||l)&&g)throw new Og("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&l)throw new Og("Can't mix ordinal dates with month/day");const w=g||i.weekday&&!h;let S,D,I=tx(a,o);w?(S=gH,D=pH,I=vT(I)):l?(S=vH,D=mH,I=ES(I)):(S=p6,D=h6);let M=!1;for(const V of S){const Y=i[V];Cn(Y)?M?i[V]=D[V]:i[V]=I[V]:M=!0}const N=w?fH(i):l?hH(i):c6(i),R=N||d6(i);if(R)return At.invalid(R);const k=w?QC(i):l?XC(i):i,[B,L]=nw(k,o,r),_=new At({ts:B,zone:r,o:L,loc:y});return i.weekday&&h&&t.weekday!==_.weekday?At.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${_.toISO()}`):_}static fromISO(t,n={}){const[r,a]=AB(t);return gg(r,a,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,a]=FB(t);return gg(r,a,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,a]=OB(t);return gg(r,a,n,"HTTP",n)}static fromFormat(t,n,r={}){if(Cn(t)||Cn(n))throw new Xi("fromFormat requires an input string and a format");const{locale:a=null,numberingSystem:o=null}=r,i=ur.fromOpts({locale:a,numberingSystem:o,defaultToEN:!0}),[l,c,f,h]=dH(i,t,n);return h?At.invalid(h):gg(l,c,r,`format ${n}`,t,f)}static fromString(t,n,r={}){return At.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,a]=HB(t);return gg(r,a,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new Xi("need to specify a reason the DateTime is invalid");const r=t instanceof Bs?t:new Bs(t,n);if(Qr.throwOnInvalid)throw new w_(r);return new At({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=a6(t,ur.fromObject(n));return r?r.map(a=>a?a.val:null).join(""):null}static expandFormat(t,n={}){return n6(uo.parseFormat(t),ur.fromObject(n)).map(a=>a.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?xS(this).weekYear:NaN}get weekNumber(){return this.isValid?xS(this).weekNumber:NaN}get weekday(){return this.isValid?xS(this).weekday:NaN}get ordinal(){return this.isValid?ES(this.c).ordinal:NaN}get monthShort(){return this.isValid?S0.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?S0.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?S0.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?S0.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 Av(this.year)}get daysInMonth(){return Cw(this.year,this.month)}get daysInYear(){return this.isValid?Bg(this.year):NaN}get weeksInWeekYear(){return this.isValid?xw(this.weekYear):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:a}=uo.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:a}}toUTC(t=0,n={}){return this.setZone(ko.instance(t),n)}toLocal(){return this.setZone(Qr.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=qc(t,Qr.defaultZone),t.equals(this.zone))return this;if(t.isValid){let a=this.ts;if(n||r){const o=t.offset(this.ts),i=this.toObject();[a]=nw(i,o,t)}return mg(this,{ts:a,zone:t})}else return At.invalid(D0(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const a=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return mg(this,{loc:a})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=Mw(t,ax),r=!Cn(n.weekYear)||!Cn(n.weekNumber)||!Cn(n.weekday),a=!Cn(n.ordinal),o=!Cn(n.year),i=!Cn(n.month)||!Cn(n.day),l=o||i,c=n.weekYear||n.weekNumber;if((l||a)&&c)throw new Og("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(i&&a)throw new Og("Can't mix ordinal dates with month/day");let f;r?f=QC({...vT(this.c),...n}):Cn(n.ordinal)?(f={...this.toObject(),...n},Cn(n.day)&&(f.day=Math.min(Cw(f.year,f.month),f.day))):f=XC({...ES(this.c),...n});const[h,g]=nw(f,this.o,this.zone);return mg(this,{ts:h,o:g})}plus(t){if(!this.isValid)return this;const n=bt.fromDurationLike(t);return mg(this,nx(this,n))}minus(t){if(!this.isValid)return this;const n=bt.fromDurationLike(t).negate();return mg(this,nx(this,n))}startOf(t){if(!this.isValid)return this;const n={},r=bt.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 a=Math.ceil(this.month/3);n.month=(a-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?uo.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):CS}toLocaleString(t=Ew,n={}){return this.isValid?uo.create(this.loc.clone(n),t).formatDateTime(this):CS}toLocaleParts(t={}){return this.isValid?uo.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:a=!0,extendedZone:o=!1}={}){if(!this.isValid)return null;const i=t==="extended";let l=MS(this,i);return l+="T",l+=rx(this,i,n,r,a,o),l}toISODate({format:t="extended"}={}){return this.isValid?MS(this,t==="extended"):null}toISOWeekDate(){return T0(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:a=!1,extendedZone:o=!1,format:i="extended"}={}){return this.isValid?(a?"T":"")+rx(this,i==="extended",n,t,r,o):null}toRFC2822(){return T0(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return T0(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?MS(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let a="HH:mm:ss.SSS";return(n||t)&&(r&&(a+=" "),n?a+="z":t&&(a+="ZZ")),T0(this,a,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():CS}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 bt.invalid("created by diffing an invalid DateTime");const a={locale:this.locale,numberingSystem:this.numberingSystem,...r},o=z_(n).map(bt.normalizeUnit),i=t.valueOf()>this.valueOf(),l=i?this:t,c=i?t:this,f=JB(l,c,o,a);return i?f.negate():f}diffNow(t="milliseconds",n={}){return this.diff(At.now(),t,n)}until(t){return this.isValid?Or.fromDateTimes(this,t):this}hasSame(t,n){if(!this.isValid)return!1;const r=t.valueOf(),a=this.setZone(t.zone,{keepLocalTime:!0});return a.startOf(n)<=r&&r<=a.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||At.fromObject({},{zone:this.zone}),r=t.padding?thisn.valueOf(),Math.min)}static max(...t){if(!t.every(At.isDateTime))throw new Xi("max requires all arguments be DateTimes");return WC(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:a=null,numberingSystem:o=null}=r,i=ur.fromOpts({locale:a,numberingSystem:o,defaultToEN:!0});return r6(i,t,n)}static fromStringExplain(t,n,r={}){return At.fromFormatExplain(t,n,r)}static get DATE_SHORT(){return Ew}static get DATE_MED(){return vA}static get DATE_MED_WITH_WEEKDAY(){return D_}static get DATE_FULL(){return yA}static get DATE_HUGE(){return wA}static get TIME_SIMPLE(){return bA}static get TIME_WITH_SECONDS(){return SA}static get TIME_WITH_SHORT_OFFSET(){return DA}static get TIME_WITH_LONG_OFFSET(){return TA}static get TIME_24_SIMPLE(){return IA}static get TIME_24_WITH_SECONDS(){return EA}static get TIME_24_WITH_SHORT_OFFSET(){return CA}static get TIME_24_WITH_LONG_OFFSET(){return xA}static get DATETIME_SHORT(){return MA}static get DATETIME_SHORT_WITH_SECONDS(){return kA}static get DATETIME_MED(){return NA}static get DATETIME_MED_WITH_SECONDS(){return AA}static get DATETIME_MED_WITH_WEEKDAY(){return T_}static get DATETIME_FULL(){return FA}static get DATETIME_FULL_WITH_SECONDS(){return OA}static get DATETIME_HUGE(){return PA}static get DATETIME_HUGE_WITH_SECONDS(){return jA}}function vg(e){if(At.isDateTime(e))return e;if(e&&e.valueOf&&df(e.valueOf()))return At.fromJSDate(e);if(e&&typeof e=="object")return At.fromObject(e);throw new Xi(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const R2={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},yH={allowHtml:!0};({...R2,...yH});class _2{constructor(t){this.value=t,this.successful=!0}map(t){return new _2(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 B2{constructor(t){this.error=t,this.successful=!1}map(t){return this}flatMap(t){return this}mapErr(t){return new B2(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 kw;(function(e){function t(o){return new _2(o)}e.success=t;function n(o){return new B2(o)}e.failure=n;function r(o,i,l){return o.successful?i.successful?l(o.value,i.value):n(i.error):n(o.error)}e.flatMap2=r;function a(o,i,l){return r(o,i,(c,f)=>t(l(c,f)))}e.map2=a})(kw||(kw={}));var wH=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof dr<"u"?dr:typeof self<"u"?self:{},pe={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof self<"u"?self:wH,function(){return function(n){var r={};function a(o){if(r[o])return r[o].exports;var i=r[o]={i:o,l:!1,exports:{}};return n[o].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=n,a.c=r,a.d=function(o,i,l){a.o(o,i)||Object.defineProperty(o,i,{configurable:!1,enumerable:!0,get:l})},a.r=function(o){Object.defineProperty(o,"__esModule",{value:!0})},a.n=function(o){var i=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(i,"a",i),i},a.o=function(o,i){return Object.prototype.hasOwnProperty.call(o,i)},a.p="",a(a.s=0)}([function(n,r,a){function o(te){if(!(this instanceof o))return new o(te);this._=te}var i=o.prototype;function l(te,me){for(var xe=0;xe>7),buf:function(He){var Qe=c(function(tt,kt,Yt,On){return tt.concat(Yt===On.length-1?Buffer.from([kt,0]).readUInt16BE(0):On.readUInt16BE(Yt))},[],He);return Buffer.from(f(function(tt){return(tt<<1&65535)>>8},Qe))}(xe.buf)}}),xe}function g(){return typeof Buffer<"u"}function y(){if(!g())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function w(te){y();var me=c(function(Qe,tt){return Qe+tt},0,te);if(me%8!=0)throw new Error("The bits ["+te.join(", ")+"] add up to "+me+" which is not an even number of bytes; the total should be divisible by 8");var xe,Ye=me/8,He=(xe=function(Qe){return Qe>48},c(function(Qe,tt){return Qe||(xe(tt)?tt:Qe)},null,te));if(He)throw new Error(He+" bit range requested exceeds 48 bit (6 byte) Number max.");return new o(function(Qe,tt){var kt=Ye+tt;return kt>Qe.length?V(tt,Ye.toString()+" bytes"):_(kt,c(function(Yt,On){var yn=h(On,Yt.buf);return{coll:Yt.coll.concat(yn.v),buf:yn.buf}},{coll:[],buf:Qe.slice(tt,kt)},te).coll)})}function S(te,me){return new o(function(xe,Ye){return y(),Ye+me>xe.length?V(Ye,me+" bytes for "+te):_(Ye+me,xe.slice(Ye,Ye+me))})}function D(te,me){if(typeof(xe=me)!="number"||Math.floor(xe)!==xe||me<0||me>6)throw new Error(te+" requires integer length in range [0, 6].");var xe}function I(te){return D("uintBE",te),S("uintBE("+te+")",te).map(function(me){return me.readUIntBE(0,te)})}function M(te){return D("uintLE",te),S("uintLE("+te+")",te).map(function(me){return me.readUIntLE(0,te)})}function N(te){return D("intBE",te),S("intBE("+te+")",te).map(function(me){return me.readIntBE(0,te)})}function R(te){return D("intLE",te),S("intLE("+te+")",te).map(function(me){return me.readIntLE(0,te)})}function k(te){return te instanceof o}function B(te){return{}.toString.call(te)==="[object Array]"}function L(te){return g()&&Buffer.isBuffer(te)}function _(te,me){return{status:!0,index:te,value:me,furthest:-1,expected:[]}}function V(te,me){return B(me)||(me=[me]),{status:!1,index:-1,value:null,furthest:te,expected:me}}function Y(te,me){if(!me||te.furthest>me.furthest)return te;var xe=te.furthest===me.furthest?function(Ye,He){if(function(){if(o._supportsSet!==void 0)return o._supportsSet;var yr=typeof Set<"u";return o._supportsSet=yr,yr}()&&Array.from){for(var Qe=new Set(Ye),tt=0;tt=0;){if(tt in xe){Ye=xe[tt].line,Qe===0&&(Qe=xe[tt].lineStart);break}(te.charAt(tt)===` `||te.charAt(tt)==="\r"&&te.charAt(tt+1)!==` `)&&(He++,Qe===0&&(Qe=tt+1)),tt--}var kt=Ye+He,Yt=me-Qe;return xe[me]={line:kt,lineStart:Qe},{offset:me,line:kt+1,column:Yt+1}}function K(te){if(!k(te))throw new Error("not a parser: "+te)}function se(te,me){return typeof te=="string"?te.charAt(me):te[me]}function le(te){if(typeof te!="number")throw new Error("not a number: "+te)}function fe(te){if(typeof te!="function")throw new Error("not a function: "+te)}function $(te){if(typeof te!="string")throw new Error("not a string: "+te)}var he=2,ie=3,ce=8,X=5*ce,ae=4*ce,De=" ";function je(te,me){return new Array(me+1).join(te)}function Re(te,me,xe){var Ye=me-te.length;return Ye<=0?te:je(xe,Ye)+te}function Fe(te,me,xe,Ye){return{from:te-me>0?te-me:0,to:te+xe>Ye?Ye:te+xe}}function Be(te,me){var xe,Ye,He,Qe,tt,kt=me.index,Yt=kt.offset,On=1;if(Yt===te.length)return"Got the end of the input";if(L(te)){var yn=Yt-Yt%ce,Cr=Yt-yn,Jn=Fe(yn,X,ae+ce,te.length),yr=f(function(Nn){return f(function(Aa){return Re(Aa.toString(16),2,"0")},Nn)},function(Nn,Aa){var Fa=Nn.length,Zr=[],fo=0;if(Fa<=Aa)return[Nn.slice()];for(var Oa=0;Oa=4&&(xe+=1),On=2,He=f(function(Nn){return Nn.length<=4?Nn.join(" "):Nn.slice(0,4).join(" ")+" "+Nn.slice(4).join(" ")},yr),(tt=(8*(Qe.to>0?Qe.to-1:Qe.to)).toString(16).length)<2&&(tt=2)}else{var ta=te.split(/\r\n|[\n\r\u2028\u2029]/);xe=kt.column-1,Ye=kt.line-1,Qe=Fe(Ye,he,ie,ta.length),He=ta.slice(Qe.from,Qe.to),tt=Qe.to.toString().length}var Pi=Ye-Qe.from;return L(te)&&(tt=(8*(Qe.to>0?Qe.to-1:Qe.to)).toString(16).length)<2&&(tt=2),c(function(Nn,Aa,Fa){var Zr,fo=Fa===Pi,Oa=fo?"> ":De;return Zr=L(te)?Re((8*(Qe.from+Fa)).toString(16),tt,"0"):Re((Qe.from+Fa+1).toString(),tt," "),[].concat(Nn,[Oa+Zr+" | "+Aa],fo?[De+je(" ",tt)+" | "+Re("",xe," ")+je("^",On)]:[])},[],He).join(` `)}function Xe(te,me){return[` `,"-- PARSING FAILED "+je("-",50),` `,Be(te,me),` `,(xe=me.expected,xe.length===1?`Expected: `+xe[0]:`Expected one of the following: `+xe.join(", ")),` `].join("");var xe}function Ze(te){return te.flags!==void 0?te.flags:[te.global?"g":"",te.ignoreCase?"i":"",te.multiline?"m":"",te.unicode?"u":"",te.sticky?"y":""].join("")}function st(){for(var te=[].slice.call(arguments),me=te.length,xe=0;xe=2?le(me):me=0;var xe=function(He){return RegExp("^(?:"+He.source+")",Ze(He))}(te),Ye=""+te;return o(function(He,Qe){var tt=xe.exec(He.slice(Qe));if(tt){if(0<=me&&me<=tt.length){var kt=tt[0],Yt=tt[me];return _(Qe+kt.length,Yt)}return V(Qe,"valid match group (0 to "+tt.length+") in "+Ye)}return V(Qe,Ye)})}function St(te){return o(function(me,xe){return _(xe,te)})}function Tt(te){return o(function(me,xe){return V(xe,te)})}function Gt(te){if(k(te))return o(function(me,xe){var Ye=te._(me,xe);return Ye.index=xe,Ye.value="",Ye});if(typeof te=="string")return Gt(nt(te));if(te instanceof RegExp)return Gt(ht(te));throw new Error("not a string, regexp, or parser: "+te)}function _t(te){return K(te),o(function(me,xe){var Ye=te._(me,xe),He=me.slice(xe,Ye.index);return Ye.status?V(xe,'not "'+He+'"'):_(xe,null)})}function Vt(te){return fe(te),o(function(me,xe){var Ye=se(me,xe);return xe=te.length?V(me,"any character/byte"):_(me+1,se(te,me))}),kn=o(function(te,me){return _(te.length,te.slice(me))}),Er=o(function(te,me){return me=0}).desc(me)},o.optWhitespace=ln,o.Parser=o,o.range=function(te,me){return Vt(function(xe){return te<=xe&&xe<=me}).desc(te+"-"+me)},o.regex=ht,o.regexp=ht,o.sepBy=_e,o.sepBy1=et,o.seq=st,o.seqMap=Ct,o.seqObj=function(){for(var te,me={},xe=0,Ye=(te=arguments,Array.prototype.slice.call(te)),He=Ye.length,Qe=0;Qe255)throw new Error("Value specified to byte constructor ("+te+"=0x"+te.toString(16)+") is larger in value than a single byte.");var me=(te>15?"0x":"0x0")+te.toString(16);return o(function(xe,Ye){var He=se(xe,Ye);return He===te?_(Ye+1,He):V(Ye,me)})},buffer:function(te){return S("buffer",te).map(function(me){return Buffer.from(me)})},encodedString:function(te,me){return S("string",me).map(function(xe){return xe.toString(te)})},uintBE:I,uint8BE:I(1),uint16BE:I(2),uint32BE:I(4),uintLE:M,uint8LE:M(1),uint16LE:M(2),uint32LE:M(4),intBE:N,int8BE:N(1),int16BE:N(2),int32BE:N(4),intLE:R,int8LE:R(1),int16LE:R(2),int32LE:R(4),floatBE:S("floatBE",4).map(function(te){return te.readFloatBE(0)}),floatLE:S("floatLE",4).map(function(te){return te.readFloatLE(0)}),doubleBE:S("doubleBE",8).map(function(te){return te.readDoubleBE(0)}),doubleLE:S("doubleLE",8).map(function(te){return te.readDoubleLE(0)})},n.exports=o}])})})(pe);var H2=()=>/(?:[#*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 m6(e){return e==null?e:e.shiftToAll().normalize()}function lx(e){return e.includes("/")&&(e=e.substring(e.lastIndexOf("/")+1)),e.endsWith(".md")&&(e=e.substring(0,e.length-3)),e}pe.exports.alt(pe.exports.regex(new RegExp(H2(),"")),pe.exports.regex(/[0-9\p{Letter}_-]+/u).map(e=>e.toLocaleLowerCase()),pe.exports.whitespace.map(e=>"-"),pe.exports.any.map(e=>"")).many().map(e=>e.join(""));const bH=pe.exports.alt(pe.exports.regex(new RegExp(H2(),"")),pe.exports.regex(/[0-9\p{Letter}_-]+/u),pe.exports.whitespace.map(e=>" "),pe.exports.any.map(e=>" ")).many().map(e=>e.join("").split(/\s+/).join(" ").trim());function SH(e){return bH.tryParse(e)}function DH(e){return e=m6(e),e=bt.fromObject(Object.fromEntries(Object.entries(e.toObject()).filter(([,t])=>t>0))),e.toHuman()}var Kg;(function(e){function t(k,B=R2,L=!1){let _=n(k);if(!_)return B.renderNullAs;switch(_.type){case"null":return B.renderNullAs;case"string":return _.value;case"number":case"boolean":return""+_.value;case"html":return _.value.outerHTML;case"widget":return _.value.markdown();case"link":return _.value.markdown();case"function":return"";case"array":let V="";return L&&(V+="["),V+=_.value.map(Y=>t(Y,B,!0)).join(", "),L&&(V+="]"),V;case"object":return"{ "+Object.entries(_.value).map(Y=>Y[0]+": "+t(Y[1],B,!0)).join(", ")+" }";case"date":return _.value.second==0&&_.value.hour==0&&_.value.minute==0?_.value.toFormat(B.defaultDateFormat):_.value.toFormat(B.defaultDateTimeFormat);case"duration":return DH(_.value)}}e.toString=t;function n(k){return y(k)?{type:"null",value:k}:f(k)?{type:"number",value:k}:c(k)?{type:"string",value:k}:S(k)?{type:"boolean",value:k}:g(k)?{type:"duration",value:k}:h(k)?{type:"date",value:k}:I(k)?{type:"widget",value:k}:w(k)?{type:"array",value:k}:D(k)?{type:"link",value:k}:R(k)?{type:"function",value:k}:M(k)?{type:"html",value:k}:N(k)?{type:"object",value:k}:void 0}e.wrapValue=n;function r(k,B){if(N(k)){let L={};for(let[_,V]of Object.entries(k))L[_]=r(V,B);return L}else if(w(k)){let L=[];for(let _ of k)L.push(r(_,B));return L}else return B(k)}e.mapLeaves=r;function a(k,B,L){var _,V;if(k===void 0&&(k=null),B===void 0&&(B=null),k===null&&B===null)return 0;if(k===null)return-1;if(B===null)return 1;let Y=n(k),Z=n(B);if(Y===void 0&&Z===void 0)return 0;if(Y===void 0)return-1;if(Z===void 0)return 1;if(Y.type!=Z.type)return Y.type.localeCompare(Z.type);if(Y.value===Z.value)return 0;switch(Y.type){case"string":return Y.value.localeCompare(Z.value);case"number":return Y.valueje),le=se(Q.path).localeCompare(se(K.path));if(le!=0)return le;let fe=Q.type.localeCompare(K.type);return fe!=0?fe:Q.subpath&&!K.subpath?1:!Q.subpath&&K.subpath?-1:!Q.subpath&&!K.subpath?0:((_=Q.subpath)!==null&&_!==void 0?_:"").localeCompare((V=K.subpath)!==null&&V!==void 0?V:"");case"date":return Y.value0;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=i;function l(k){if(k==null)return k;if(e.isArray(k))return[].concat(k.map(B=>l(B)));if(e.isObject(k)){let B={};for(let[L,_]of Object.entries(k))B[L]=l(_);return B}else return k}e.deepCopy=l;function c(k){return typeof k=="string"}e.isString=c;function f(k){return typeof k=="number"}e.isNumber=f;function h(k){return k instanceof At}e.isDate=h;function g(k){return k instanceof bt}e.isDuration=g;function y(k){return k==null}e.isNull=y;function w(k){return Array.isArray(k)}e.isArray=w;function S(k){return typeof k=="boolean"}e.isBoolean=S;function D(k){return k instanceof so}e.isLink=D;function I(k){return k instanceof Y2}e.isWidget=I;function M(k){return typeof HTMLElement<"u"?k instanceof HTMLElement:!1}e.isHtml=M;function N(k){return typeof k=="object"&&!M(k)&&!I(k)&&!w(k)&&!g(k)&&!h(k)&&!D(k)&&k!==void 0&&!y(k)}e.isObject=N;function R(k){return typeof k=="function"}e.isFunction=R})(Kg||(Kg={}));var ux;(function(e){function t(a){return Kg.isObject(a)&&Object.keys(a).length==2&&"key"in a&&"rows"in a}e.isElementGroup=t;function n(a){for(let o of a)if(!t(o))return!1;return!0}e.isGrouping=n;function r(a){if(n(a)){let o=0;for(let i of a)o+=r(i.rows);return o}else return a.length}e.count=r})(ux||(ux={}));class so{constructor(t){Object.assign(this,t)}static file(t,n=!1,r){return new so({path:t,embed:n,display:r,subpath:void 0,type:"file"})}static infer(t,n=!1,r){if(t.includes("#^")){let a=t.split("#^");return so.block(a[0],a[1],n,r)}else if(t.includes("#")){let a=t.split("#");return so.header(a[0],a[1],n,r)}else return so.file(t,n,r)}static header(t,n,r,a){return new so({path:t,embed:r,display:a,subpath:SH(n),type:"header"})}static block(t,n,r,a){return new so({path:t,embed:r,display:a,subpath:n,type:"block"})}static fromObject(t){return new so(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 so(Object.assign({},this,{path:t}))}withDisplay(t){return new so(Object.assign({},this,{display:t}))}withHeader(t){return so.header(this.path,t,this.embed,this.display)}toFile(){return so.file(this.path,this.embed,this.display)}toEmbed(){if(this.embed)return this;{let t=new so(this);return t.embed=!0,t}}fromEmbed(){if(this.embed){let t=new so(this);return t.embed=!1,t}else return this}markdown(){let t=(this.embed?"!":"")+"[["+this.obsidianLink();return this.display?t+="|"+this.display:(t+="|"+lx(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 lx(this.path).replace(".md","")}}class Y2{constructor(t){this.$widget=t}}class TH extends Y2{constructor(t,n){super("dataview:list-pair"),this.key=t,this.value=n}markdown(){return`${Kg.toString(this.key)}: ${Kg.toString(this.value)}`}}class IH extends Y2{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 cx;(function(e){function t(i,l){return new TH(i,l)}e.listPair=t;function n(i,l){return new IH(i,l)}e.externalLink=n;function r(i){return i.$widget==="dataview:list-pair"}e.isListPair=r;function a(i){return i.$widget==="dataview:external-link"}e.isExternalLink=a;function o(i){return r(i)||a(i)}e.isBuiltin=o})(cx||(cx={}));var Fr;(function(e){function t(y){return{type:"variable",name:y}}e.variable=t;function n(y){return{type:"literal",value:y}}e.literal=n;function r(y,w,S){return{type:"binaryop",left:y,op:w,right:S}}e.binaryOp=r;function a(y,w){return{type:"index",object:y,index:w}}e.index=a;function o(y){let w=y.split("."),S=e.variable(w[0]);for(let D=1;D"||y==">="||y=="!="||y=="="}e.isCompareOp=g,e.NULL=e.literal(null)})(Fr||(Fr={}));var Bl;(function(e){function t(h){return{type:"tag",tag:h}}e.tag=t;function n(h){return{type:"csv",path:h}}e.csv=n;function r(h){return{type:"folder",folder:h}}e.folder=r;function a(h,g){return{type:"link",file:h,direction:g?"incoming":"outgoing"}}e.link=a;function o(h,g,y){return{type:"binaryop",left:h,op:g,right:y}}e.binaryOp=o;function i(h,g){return{type:"binaryop",left:h,op:"&",right:g}}e.and=i;function l(h,g){return{type:"binaryop",left:h,op:"|",right:g}}e.or=l;function c(h){return{type:"negate",child:h}}e.negate=c;function f(){return{type:"empty"}}e.empty=f})(Bl||(Bl={}));const dx=new RegExp(H2(),""),yT={year:bt.fromObject({years:1}),years:bt.fromObject({years:1}),yr:bt.fromObject({years:1}),yrs:bt.fromObject({years:1}),month:bt.fromObject({months:1}),months:bt.fromObject({months:1}),mo:bt.fromObject({months:1}),mos:bt.fromObject({months:1}),week:bt.fromObject({weeks:1}),weeks:bt.fromObject({weeks:1}),wk:bt.fromObject({weeks:1}),wks:bt.fromObject({weeks:1}),w:bt.fromObject({weeks:1}),day:bt.fromObject({days:1}),days:bt.fromObject({days:1}),d:bt.fromObject({days:1}),hour:bt.fromObject({hours:1}),hours:bt.fromObject({hours:1}),hr:bt.fromObject({hours:1}),hrs:bt.fromObject({hours:1}),h:bt.fromObject({hours:1}),minute:bt.fromObject({minutes:1}),minutes:bt.fromObject({minutes:1}),min:bt.fromObject({minutes:1}),mins:bt.fromObject({minutes:1}),m:bt.fromObject({minutes:1}),second:bt.fromObject({seconds:1}),seconds:bt.fromObject({seconds:1}),sec:bt.fromObject({seconds:1}),secs:bt.fromObject({seconds:1}),s:bt.fromObject({seconds:1})},wT={now:()=>At.local(),today:()=>At.local().startOf("day"),yesterday:()=>At.local().startOf("day").minus(bt.fromObject({days:1})),tomorrow:()=>At.local().startOf("day").plus(bt.fromObject({days:1})),sow:()=>At.local().startOf("week"),"start-of-week":()=>At.local().startOf("week"),eow:()=>At.local().endOf("week"),"end-of-week":()=>At.local().endOf("week"),soy:()=>At.local().startOf("year"),"start-of-year":()=>At.local().startOf("year"),eoy:()=>At.local().endOf("year"),"end-of-year":()=>At.local().endOf("year"),som:()=>At.local().startOf("month"),"start-of-month":()=>At.local().startOf("month"),eom:()=>At.local().endOf("month"),"end-of-month":()=>At.local().endOf("month")},bT=["FROM","WHERE","LIMIT","GROUP","FLATTEN"];function EH(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 CH(e){let[t,n]=EH(e);return so.infer(t,!1,n)}function yg(e,t,n){return pe.exports.seqMap(e,pe.exports.seq(pe.exports.optWhitespace,t,pe.exports.optWhitespace,e).many(),(r,a)=>{if(a.length==0)return r;let o=n(r,a[0][1],a[0][3]);for(let i=1;i(a,o)=>{let i=e._(a,o);if(!i.status)return i;for(let l of t){let c=l(i.value)._(a,i.index);if(!c.status)return i;i=c}return i})}const Ps=pe.exports.createLanguage({number:e=>pe.exports.regexp(/-?[0-9]+(\.[0-9]+)?/).map(t=>Number.parseFloat(t)).desc("number"),string:e=>pe.exports.string('"').then(pe.exports.alt(e.escapeCharacter,pe.exports.noneOf('"\\')).atLeast(0).map(t=>t.join(""))).skip(pe.exports.string('"')).desc("string"),escapeCharacter:e=>pe.exports.string("\\").then(pe.exports.any).map(t=>t==='"'?'"':t==="\\"?"\\":"\\"+t),bool:e=>pe.exports.regexp(/true|false|True|False/).map(t=>t.toLowerCase()=="true").desc("boolean ('true' or 'false')"),tag:e=>pe.exports.seqMap(pe.exports.string("#"),pe.exports.alt(pe.exports.regexp(/[^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]/).desc("text")).many(),(t,n)=>t+n.join("")).desc("tag ('#hello/stuff')"),identifier:e=>pe.exports.seqMap(pe.exports.alt(pe.exports.regexp(new RegExp("\\p{Letter}","u")),pe.exports.regexp(dx).desc("text")),pe.exports.alt(pe.exports.regexp(/[0-9\p{Letter}_-]/u),pe.exports.regexp(dx).desc("text")).many(),(t,n)=>t+n.join("")).desc("variable identifier"),link:e=>pe.exports.regexp(/\[\[([^\[\]]*?)\]\]/u,1).map(t=>CH(t)).desc("file link"),embedLink:e=>pe.exports.seqMap(pe.exports.string("!").atMost(1),e.link,(t,n)=>(t.length>0&&(n.embed=!0),n)).desc("file link"),binaryPlusMinus:e=>pe.exports.regexp(/\+|-/).map(t=>t).desc("'+' or '-'"),binaryMulDiv:e=>pe.exports.regexp(/\*|\/|%/).map(t=>t).desc("'*' or '/' or '%'"),binaryCompareOp:e=>pe.exports.regexp(/>=|<=|!=|>|<|=/).map(t=>t).desc("'>=' or '<=' or '!=' or '=' or '>' or '<'"),binaryBooleanOp:e=>pe.exports.regexp(/and|or|&|\|/i).map(t=>t.toLowerCase()=="and"?"&":t.toLowerCase()=="or"?"|":t).desc("'and' or 'or'"),rootDate:e=>pe.exports.seqMap(pe.exports.regexp(/\d{4}/),pe.exports.string("-"),pe.exports.regexp(/\d{2}/),(t,n,r)=>At.fromObject({year:Number.parseInt(t),month:Number.parseInt(r)})).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),dateShorthand:e=>pe.exports.alt(...Object.keys(wT).sort((t,n)=>n.length-t.length).map(pe.exports.string)),date:e=>xH(e.rootDate,t=>pe.exports.seqMap(pe.exports.string("-"),pe.exports.regexp(/\d{2}/),(n,r)=>t.set({day:Number.parseInt(r)})),t=>pe.exports.seqMap(pe.exports.string("T"),pe.exports.regexp(/\d{2}/),(n,r)=>t.set({hour:Number.parseInt(r)})),t=>pe.exports.seqMap(pe.exports.string(":"),pe.exports.regexp(/\d{2}/),(n,r)=>t.set({minute:Number.parseInt(r)})),t=>pe.exports.seqMap(pe.exports.string(":"),pe.exports.regexp(/\d{2}/),(n,r)=>t.set({second:Number.parseInt(r)})),t=>pe.exports.alt(pe.exports.seqMap(pe.exports.string("."),pe.exports.regexp(/\d{3}/),(n,r)=>t.set({millisecond:Number.parseInt(r)})),pe.exports.succeed(t)),t=>pe.exports.alt(pe.exports.seqMap(pe.exports.string("+").or(pe.exports.string("-")),pe.exports.regexp(/\d{1,2}(:\d{2})?/),(n,r)=>t.setZone("UTC"+n+r,{keepLocalTime:!0})),pe.exports.seqMap(pe.exports.string("Z"),()=>t.setZone("utc",{keepLocalTime:!0})),pe.exports.seqMap(pe.exports.string("["),pe.exports.regexp(/[0-9A-Za-z+-\/]+/u),pe.exports.string("]"),(n,r,a)=>t.setZone(r,{keepLocalTime:!0})))).assert(t=>t.isValid,"valid date").desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),datePlus:e=>pe.exports.alt(e.dateShorthand.map(t=>wT[t]()),e.date).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS] or in shorthand"),durationType:e=>pe.exports.alt(...Object.keys(yT).sort((t,n)=>n.length-t.length).map(pe.exports.string)),duration:e=>pe.exports.seqMap(e.number,pe.exports.optWhitespace,e.durationType,(t,n,r)=>yT[r].mapUnits(a=>a*t)).sepBy1(pe.exports.string(",").trim(pe.exports.optWhitespace).or(pe.exports.optWhitespace)).map(t=>t.reduce((n,r)=>n.plus(r))).desc("duration like 4hr2min"),rawNull:e=>pe.exports.string("null"),tagSource:e=>e.tag.map(t=>Bl.tag(t)),csvSource:e=>pe.exports.seqMap(pe.exports.string("csv(").skip(pe.exports.optWhitespace),e.string,pe.exports.string(")"),(t,n,r)=>Bl.csv(n)),linkIncomingSource:e=>e.link.map(t=>Bl.link(t.path,!0)),linkOutgoingSource:e=>pe.exports.seqMap(pe.exports.string("outgoing(").skip(pe.exports.optWhitespace),e.link,pe.exports.string(")"),(t,n,r)=>Bl.link(n.path,!1)),folderSource:e=>e.string.map(t=>Bl.folder(t)),parensSource:e=>pe.exports.seqMap(pe.exports.string("("),pe.exports.optWhitespace,e.source,pe.exports.optWhitespace,pe.exports.string(")"),(t,n,r,a,o)=>r),negateSource:e=>pe.exports.seqMap(pe.exports.alt(pe.exports.string("-"),pe.exports.string("!")),e.atomSource,(t,n)=>Bl.negate(n)),atomSource:e=>pe.exports.alt(e.parensSource,e.negateSource,e.linkOutgoingSource,e.linkIncomingSource,e.folderSource,e.tagSource,e.csvSource),binaryOpSource:e=>yg(e.atomSource,e.binaryBooleanOp.map(t=>t),Bl.binaryOp),source:e=>e.binaryOpSource,variableField:e=>e.identifier.chain(t=>bT.includes(t.toUpperCase())?pe.exports.fail("Variable fields cannot be a keyword ("+bT.join(" or ")+")"):pe.exports.succeed(Fr.variable(t))).desc("variable"),numberField:e=>e.number.map(t=>Fr.literal(t)).desc("number"),stringField:e=>e.string.map(t=>Fr.literal(t)).desc("string"),boolField:e=>e.bool.map(t=>Fr.literal(t)).desc("boolean"),dateField:e=>pe.exports.seqMap(pe.exports.string("date("),pe.exports.optWhitespace,e.datePlus,pe.exports.optWhitespace,pe.exports.string(")"),(t,n,r,a,o)=>Fr.literal(r)).desc("date"),durationField:e=>pe.exports.seqMap(pe.exports.string("dur("),pe.exports.optWhitespace,e.duration,pe.exports.optWhitespace,pe.exports.string(")"),(t,n,r,a,o)=>Fr.literal(r)).desc("duration"),nullField:e=>e.rawNull.map(t=>Fr.NULL),linkField:e=>e.link.map(t=>Fr.literal(t)),listField:e=>e.field.sepBy(pe.exports.string(",").trim(pe.exports.optWhitespace)).wrap(pe.exports.string("[").skip(pe.exports.optWhitespace),pe.exports.optWhitespace.then(pe.exports.string("]"))).map(t=>Fr.list(t)).desc("list ('[1, 2, 3]')"),objectField:e=>pe.exports.seqMap(e.identifier.or(e.string),pe.exports.string(":").trim(pe.exports.optWhitespace),e.field,(t,n,r)=>({name:t,value:r})).sepBy(pe.exports.string(",").trim(pe.exports.optWhitespace)).wrap(pe.exports.string("{").skip(pe.exports.optWhitespace),pe.exports.optWhitespace.then(pe.exports.string("}"))).map(t=>{let n={};for(let r of t)n[r.name]=r.value;return Fr.object(n)}).desc("object ('{ a: 1, b: 2 }')"),atomInlineField:e=>pe.exports.alt(e.date,e.duration.map(t=>m6(t)),e.string,e.tag,e.embedLink,e.bool,e.number,e.rawNull),inlineFieldList:e=>e.atomInlineField.sepBy(pe.exports.string(",").trim(pe.exports.optWhitespace).lookahead(e.atomInlineField)),inlineField:e=>pe.exports.alt(pe.exports.seqMap(e.atomInlineField,pe.exports.string(",").trim(pe.exports.optWhitespace),e.inlineFieldList,(t,n,r)=>[t].concat(r)),e.atomInlineField),atomField:e=>pe.exports.alt(e.embedLink.map(t=>Fr.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=>pe.exports.seqMap(e.atomField,pe.exports.alt(e.dotPostfix,e.indexPostfix,e.functionPostfix).many(),(t,n)=>{let r=t;for(let a of n)switch(a.type){case"dot":r=Fr.index(r,Fr.literal(a.field));break;case"index":r=Fr.index(r,a.field);break;case"function":r=Fr.func(r,a.fields);break}return r}),negatedField:e=>pe.exports.seqMap(pe.exports.string("!"),e.indexField,(t,n)=>Fr.negate(n)).desc("negated field"),parensField:e=>pe.exports.seqMap(pe.exports.string("("),pe.exports.optWhitespace,e.field,pe.exports.optWhitespace,pe.exports.string(")"),(t,n,r,a,o)=>r),lambdaField:e=>pe.exports.seqMap(e.identifier.sepBy(pe.exports.string(",").trim(pe.exports.optWhitespace)).wrap(pe.exports.string("(").trim(pe.exports.optWhitespace),pe.exports.string(")").trim(pe.exports.optWhitespace)),pe.exports.string("=>").trim(pe.exports.optWhitespace),e.field,(t,n,r)=>({type:"lambda",arguments:t,value:r})),dotPostfix:e=>pe.exports.seqMap(pe.exports.string("."),e.identifier,(t,n)=>({type:"dot",field:n})),indexPostfix:e=>pe.exports.seqMap(pe.exports.string("["),pe.exports.optWhitespace,e.field,pe.exports.optWhitespace,pe.exports.string("]"),(t,n,r,a,o)=>({type:"index",field:r})),functionPostfix:e=>pe.exports.seqMap(pe.exports.string("("),pe.exports.optWhitespace,e.field.sepBy(pe.exports.string(",").trim(pe.exports.optWhitespace)),pe.exports.optWhitespace,pe.exports.string(")"),(t,n,r,a,o)=>({type:"function",fields:r})),binaryMulDivField:e=>yg(e.indexField,e.binaryMulDiv,Fr.binaryOp),binaryPlusMinusField:e=>yg(e.binaryMulDivField,e.binaryPlusMinus,Fr.binaryOp),binaryCompareField:e=>yg(e.binaryPlusMinusField,e.binaryCompareOp,Fr.binaryOp),binaryBooleanField:e=>yg(e.binaryCompareField,e.binaryBooleanOp,Fr.binaryOp),binaryOpField:e=>e.binaryBooleanField,field:e=>e.binaryOpField});function MH(e){try{return kw.success(Ps.field.tryParse(e))}catch(t){return kw.failure(""+t)}}var Nw;(function(e){function t(r,a){return{name:r,field:a}}e.named=t;function n(r,a){return{field:r,direction:a}}e.sortBy=n})(Nw||(Nw={}));function kH(e){return pe.exports.custom((t,n)=>(r,a)=>{let o=e._(r,a);return o.status?Object.assign({},o,{value:[o.value,r.substring(a,o.index)]}):o})}function NH(e){return e.split(/[\r\n]+/).map(t=>t.trim()).join("")}const AH=pe.exports.createLanguage({queryType:e=>pe.exports.alt(pe.exports.regexp(/TABLE|LIST|TASK|CALENDAR/i)).map(t=>t.toLowerCase()).desc("query type ('TABLE', 'LIST', 'TASK', or 'CALENDAR')"),explicitNamedField:e=>pe.exports.seqMap(Ps.field.skip(pe.exports.whitespace),pe.exports.regexp(/AS/i).skip(pe.exports.whitespace),Ps.identifier.or(Ps.string),(t,n,r)=>Nw.named(r,t)),namedField:e=>pe.exports.alt(e.explicitNamedField,kH(Ps.field).map(([t,n])=>Nw.named(NH(n),t))),sortField:e=>pe.exports.seqMap(Ps.field.skip(pe.exports.optWhitespace),pe.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(pe.exports.whitespace).chain(t=>{switch(t){case"table":return pe.exports.seqMap(pe.exports.regexp(/WITHOUT\s+ID/i).skip(pe.exports.optWhitespace).atMost(1),pe.exports.sepBy(e.namedField,pe.exports.string(",").trim(pe.exports.optWhitespace)),(n,r)=>({type:"table",fields:r,showId:n.length==0}));case"list":return pe.exports.seqMap(pe.exports.regexp(/WITHOUT\s+ID/i).skip(pe.exports.optWhitespace).atMost(1),Ps.field.atMost(1),(n,r)=>({type:"list",format:r.length==1?r[0]:void 0,showId:n.length==0}));case"task":return pe.exports.succeed({type:"task"});case"calendar":return pe.exports.seqMap(e.namedField,n=>({type:"calendar",showId:!0,field:n}));default:return pe.exports.fail(`Unrecognized query type '${t}'`)}}).desc("TABLE or LIST or TASK or CALENDAR"),fromClause:e=>pe.exports.seqMap(pe.exports.regexp(/FROM/i),pe.exports.whitespace,Ps.source,(t,n,r)=>r),whereClause:e=>pe.exports.seqMap(pe.exports.regexp(/WHERE/i),pe.exports.whitespace,Ps.field,(t,n,r)=>({type:"where",clause:r})).desc("WHERE "),sortByClause:e=>pe.exports.seqMap(pe.exports.regexp(/SORT/i),pe.exports.whitespace,e.sortField.sepBy1(pe.exports.string(",").trim(pe.exports.optWhitespace)),(t,n,r)=>({type:"sort",fields:r})).desc("SORT field [ASC/DESC]"),limitClause:e=>pe.exports.seqMap(pe.exports.regexp(/LIMIT/i),pe.exports.whitespace,Ps.field,(t,n,r)=>({type:"limit",amount:r})).desc("LIMIT "),flattenClause:e=>pe.exports.seqMap(pe.exports.regexp(/FLATTEN/i).skip(pe.exports.whitespace),e.namedField,(t,n)=>({type:"flatten",field:n})).desc("FLATTEN [AS ]"),groupByClause:e=>pe.exports.seqMap(pe.exports.regexp(/GROUP BY/i).skip(pe.exports.whitespace),e.namedField,(t,n)=>({type:"group",field:n})).desc("GROUP BY [AS ]"),clause:e=>pe.exports.alt(e.fromClause,e.whereClause,e.sortByClause,e.limitClause,e.groupByClause,e.flattenClause),query:e=>pe.exports.seqMap(e.headerClause.trim(pe.exports.optWhitespace),e.fromClause.trim(pe.exports.optWhitespace).atMost(1),e.clause.trim(pe.exports.optWhitespace).many(),(t,n,r)=>({header:t,source:n.length==0?Bl.folder(""):n[0],operations:r,settings:R2}))}),FH=e=>{var t;return e?(t=e.plugins.plugins.dataview)===null||t===void 0?void 0:t.api:window.DataviewAPI},OH=e=>e.plugins.enabledPlugins.has("dataview");Gu.DATE_SHORTHANDS=wT;Gu.DURATION_TYPES=yT;Gu.EXPRESSION=Ps;Gu.KEYWORDS=bT;Gu.QUERY_LANGUAGE=AH;var PH=Gu.getAPI=FH;Gu.isPluginEnabled=OH;Gu.parseField=MH;async function jH(e,t,n,r,a){var I,M;const{vault:o,metadataCache:i}=Le.getState().dailyNotesState.app===void 0?app:Le.getState().dailyNotesState.app,l=Le.getState().dailyNotesState.settings,c=e.replace(/\n/g,"
");if(n===void 0)return;const f=i.getFirstLinkpathDest("",n),h=x.moment(),g=h.format("YYYYMMDDHHmmss"),y=r.slice(14),w=" ",S=g+" "+c.trim(),D=w+"- "+g+" "+c.trim();if(f){let N;if(l!=null&&l.CommentOnMemos&&(l!=null&&l.CommentsInOriginalNotes)){const L=PH();if(L!==void 0)try{N=(M=(I=L.page(f.path))==null?void 0:I.file.lists.values)==null?void 0:M.filter(_=>_.line===parseInt(y))}catch(_){console.error(_)}}const R=await o.read(f);let k=0;N[0].children.values.length>0?k=N[0].children.values[N[0].children.values.length-1].line:k=N[0].line;const B=await LH(D,R,k);if(await o.modify(f,B.content),t)return{id:g+(k+1),content:S,deletedAt:"",createdAt:h.format("YYYY/MM/DD HH:mm:ss"),updatedAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),thinoType:"JOURNAL",path:f.path,hasId:"",linkId:a}}}async function LH(e,t,n){if(n===-1)return{content:`${t} ${e}`,posNum:-1};const r=t.split(` `),a=r.slice(0,n+1).join(` `),o=r.slice(n+1).join(` `);return/^\s*$/g.test(r[n+1])?{content:`${a} ${e} ${o}`,posNum:n}:{content:`${a} ${e} ${o}`,posNum:n}}function RH(e,t,n){var a;const r=t.workspace.getLeavesOfType("markdown");for(const o of r){const i=o.view;if(((a=i==null?void 0:i.file)==null?void 0:a.path)===e){t.workspace.revealLeaf(o);try{return o.view.setEphemeralState({line:n}),!0}catch(l){return console.error(l),!1}}}return!1}const U2=async e=>{var o;const t=ft.getState().app,n=t.workspace.getLeavesOfType("markdown");for(const i of n){const l=i.view;if(((o=l==null?void 0:l.file)==null?void 0:o.path)===e){t.workspace.revealLeaf(i);return}}const r=t.metadataCache.getFirstLinkpathDest("",e);if(!r){new x.Notice(E("File not found for the given thino path"));return}await t.workspace.getLeaf(!0).openFile(r)},z2=async(e,t)=>{const{app:n}=ft.getState(),r=parseInt(e.slice(14));if(RH(t,n,r))return;const a=n.metadataCache.getFirstLinkpathDest("",t);if(!x.Platform.isMobile)await n.workspace.getLeaf(!0).openFile(a,{eState:{line:r}});else{let o=n.workspace.activeLeaf;o===null&&(o=n.workspace.getLeaf(!0)),await o.openFile(a,{eState:{line:r}})}},V2=async(e,t)=>{var f,h,g;const n=ft.getState().app,r=n.metadataCache.getFirstLinkpathDest("",t);if(!r){new x.Notice(E("File not found for the given thino path"));return}let a="";try{a=await n.vault.read(r)}catch(y){console.error(y),a=await n.vault.cachedRead(r)}const i=a.split(/\r?\n/).findIndex(y=>y.contains(e)),l=n.workspace.getLeavesOfType("markdown");for(const y of l){const w=y.view;if(((f=w==null?void 0:w.file)==null?void 0:f.path)===r.path){n.workspace.revealLeaf(y);try{(h=y.view.editor)==null||h.setCursor({line:i,ch:1});return}catch(S){console.error(S)}}}const c=n.workspace.getLeaf(!0);await c.openFile(r,{eState:{line:i}});try{(g=c.view.editor)==null||g.setCursor({line:i,ch:1})}catch(y){console.error(y)}},W2=async(e,t)=>{var l;const n=ft.getState().app,r=(c,f)=>{var g;const h=(g=Array.from(c.nodes.values()))==null?void 0:g.find(y=>y.id===f);return h?(c.selectOnly(h),c.zoomToSelection(),!0):!1},a=n.workspace.getLeavesOfType("canvas");for(const c of a){const f=c.view;if(((l=f==null?void 0:f.file)==null?void 0:l.path)===t&&(n.workspace.revealLeaf(c),r(f.canvas,e)))return}const o=n.metadataCache.getFirstLinkpathDest("",t);if(!o){new x.Notice(E("File not found for the given thino path"));return}const i=n.workspace.getLeaf(!0);await i.openFile(o),setTimeout(()=>{var c;r((c=i.view)==null?void 0:c.canvas,e)},10)};class _H{constructor(){Se(this,"initialized",!1)}getState(){return Le.getState().memoState}async fetchAllMemos(){const t=ft.getState().settings;ut.checkDailyInMulti(t);const n=await Ko.getMyMemos(t.EnabledLocationList.map(o=>o.value)),r=[...n.memos],a=[...n.commentMemos];return Le.dispatch({type:"SET_MEMOS",payload:{memos:r}}),Le.dispatch({type:"SET_COMMENT_MEMOS",payload:{commentMemos:a}}),this.initialized||(this.initialized=!0,dt.setLoaded(!0)),r}async updateTypeMemos(t){const n=await Ko.updateSpecificTypeMemo(t),r=this.getState().memos.filter(a=>a.sourceType!==t);Le.dispatch({type:"SET_MEMOS",payload:{memos:[...r,...n.memos]}})}async removeTypeMemos(t){const n=this.getState().memos.filter(r=>r.sourceType!==t);Le.dispatch({type:"SET_MEMOS",payload:{memos:[...n]}})}async fetchDeletedMemos(){const t=await Ko.getMyDeletedMemos();return t.sort((n,r)=>ut.getTimeStampByDate(r.deletedAt)-ut.getTimeStampByDate(n.deletedAt)),t}pushMemo(t){Le.dispatch({type:"INSERT_MEMO",payload:{memo:{...t}}})}pushCommentMemo(t){Le.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 finishWaitingForTemplaterThinos(){const t=this.getState().preparingUpdateMemo;if(t.length!==0)for(const n of t){const r=this.getMemoById(n.id),a=n.type==="local"?await bS(n.origin,n.isList,n.date):await jC(r);await this.replaceOldThinoWithNewThino(n.id,a),Le.dispatch({type:"REMOVE_PARTICULAR_PREPARE_UPDATE_THINO",payload:{id:n.id}})}}async replaceOldThinoWithNewThino(t,n){this.getMemoById(t)&&Le.dispatch({type:"REPLACE_MEMO_BY_ID",payload:{id:t,memo:n}})}async updateMemoById(t,n,r){const a=this.getMemoByWebId(t);if(!a)return;let o=null;const i=r?{}:{content:n.content,rowStatus:n.rowStatus,pinned:n.pinned,deleted:!!n.deletedAt,thinoType:n.thinoType||"JOURNAL"};if(iA({...a,deleted:!!n.deletedAt},{...i,webId:n.id}))return a;switch(a.sourceType){case"DAILY":o=await _l(a,{id:a.id,webId:n.id,...i});break;case"CANVAS":o=await Rl(a,{id:a.id,webId:n.id,...i});break;case"MULTI":o=await js(a,{id:a.id,webId:n.id,...i});break;case"FILE":o=await Ll(a,{id:a.id,webId:n.id,...i});break}if(!o)return a;Le.dispatch({type:"EDIT_MEMO",payload:o})}async archiveThinoBulk(t){const n=[];for(const r of t){let a;switch(r.sourceType){case"DAILY":a=await _l(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(a);break;case"CANVAS":a=await Rl(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(a);break;case"MULTI":a=await js(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(a);break;case"FILE":a=await Ll(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(a);break}}return n.length>0?(Le.dispatch({type:"ARCHIVE_MEMO_BY_ID_BULK",payload:n}),n):t}async dealWithDailyThinoBulk(t,n,r){const a=await g_(t,n,r);return r==="deleteForever"?await this.deleteThinosWithIdBulk(a.map(o=>o.id)):this.editMemoBulk(a),a}async deleteThinosWithIdBulk(t){for(const n of t)Le.dispatch({type:"DELETE_MEMO_BY_ID",payload:{id:n}})}async archiveMemo(t){let n=null;switch(t.sourceType){case"DAILY":n=await _l(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"CANVAS":n=await Rl(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"MULTI":n=await js(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"FILE":n=await Ll(t,{id:t.id,rowStatus:"ARCHIVED"});break}return n?(Le.dispatch({type:"ARCHIVE_MEMO_BY_ID",payload:n}),n):t}async pushToUpdateList(t,n){Le.dispatch({type:"PREPARE_UPDATE_THINO",payload:{thino:t,originalId:n}})}async removePrepareUpdateThinoById(t){Le.dispatch({type:"REMOVE_PARTICULAR_PREPARE_UPDATE_THINO",payload:{id:t}})}async removePrepareUpdateThino(){Le.dispatch({type:"REMOVE_PREPARE_UPDATE_THINO",payload:null})}async unarchiveThinoBulk(t){const n=[];for(const r of t){let a;switch(r.sourceType){case"DAILY":a=await _l(r,{id:r.id,rowStatus:"NORMAL"}),n.push(a);break;case"CANVAS":a=await Rl(r,{id:r.id,rowStatus:"NORMAL"}),n.push(a);break;case"MULTI":a=await js(r,{id:r.id,rowStatus:"NORMAL"}),n.push(a);break;case"FILE":a=await Ll(r,{id:r.id,rowStatus:"NORMAL"}),n.push(a);break}}return n.length>0?(Le.dispatch({type:"ARCHIVE_MEMO_BY_ID_BULK",payload:n}),n):t}async unarchiveMemo(t){let n=null;switch(t.sourceType){case"DAILY":n=await _l(t,{id:t.id,rowStatus:"NORMAL"});break;case"CANVAS":n=await Rl(t,{id:t.id,rowStatus:"NORMAL"});break;case"MULTI":n=await js(t,{id:t.id,rowStatus:"NORMAL"});break;case"FILE":n=await Ll(t,{id:t.id,rowStatus:"NORMAL"});break}return Le.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 _l(n,{id:n.id,deleted:!0});break;case"CANVAS":r=await Rl(n,{id:n.id,deleted:!0});break;case"MULTI":r=await js(n,{id:n.id,deleted:!0});break;case"FILE":r=await Ll(n,{id:n.id,deleted:!0});break}if(!r)return n;if(r)return r}async restoreMemoById(t){return await Ko.restoreMemo(t)}async deleteMemoById(t,n){const r=this.getMemoById(t);try{switch(r.sourceType){case"DAILY":await Ko.deleteMemoInDailyNote(r);break;case"CANVAS":await Ko.deleteMemoInCanvas(r);break;case"MULTI":await Ko.deleteMemoInMultiFiles(r);break;case"FILE":await Ko.deleteMemoInSingleFile(r);break}Le.dispatch({type:"DELETE_MEMO_BY_ID",payload:{id:t}})}catch(l){console.error(l),new x.Notice(E("Failed to delete memo"))}if(n&&n==="local")return;const a=ft.getState().settings,o=ft.getState().app;!(o!=null&&o.loadLocalStorage("tokenForSync"))||!a.startSync||r.webId&&await k2(r.webId)}async removeMemosInFile(t,n){var a,o;const r=[];try{if(t.path.endsWith(".md")&&!t.path.contains(".thino")&&!n){const l=this.getState().memos.filter(c=>c.path.trim()===t.path.trim());r.push(...l)}else if(t.path.contains("thino.canvas")){const l=this.getState().memos.filter(c=>c.path.trim()===t.path.trim());r.push(...l)}else if((a=t==null?void 0:t.parent)!=null&&a.path.contains(n)||!(t!=null&&t.parent)&&!((o=t==null?void 0:t.parent)!=null&&o.path)){const l=this.getState().memos.filter(c=>c.path.trim()===t.path.trim());l.length>0&&r.push(...l)}else t.path.endsWith(".md")&&t.path.contains(".thino")&&await cT(t,r);const i=r.map(l=>l.id);Le.dispatch({type:"DELETE_MEMO_BY_ID_BATCH",payload:{ids:i}})}catch(i){console.error(i)}}async removeThinosByPath(t){const r=this.getState().memos.filter(a=>a.path===t).map(a=>a.id);Le.dispatch({type:"DELETE_MEMO_BY_ID_BATCH",payload:{ids:r}})}async updateMemosInFile(t,n){const r=[],a=async()=>{var o;if(t.path.endsWith(".md")&&!t.path.contains(".thino")&&!n){await fA(t,r);return}else if(t.path.contains("thino.canvas")){await hA(t,r);return}else if((o=t==null?void 0:t.parent)!=null&&o.path.contains(n)&&!t.path.endsWith(".thino.md")){await dA(t,r);return}else if(t.path.endsWith(".thino.md")){console.error(t),await cT(t,r);return}};try{await a(),Le.dispatch({type:"UPDATE_MEMO_BATCH",payload:{memos:r,path:t.path}})}catch(o){console.error(o)}}async updateMemoProperty(t){const n=ut.randomId(16),r=await js(t,{id:n});Le.dispatch({type:"EDIT_MEMO_PATH",payload:r})}editMemo(t){const n=t.webId;Le.dispatch({type:"EDIT_MEMO",payload:t});const r=ft.getState().settings,a=ft.getState().app;if(!(!(a!=null&&a.loadLocalStorage("tokenForSync"))||!r.startSync))try{t&&n&&wS({id:n,content:t.content,rowStatus:t.rowStatus,pinned:t.pinned,ttime:t.deletedAt?x.moment(t.deletedAt,"YYYY/MM/DD HH:mm:ss").valueOf():0,thinoType:t.sourceType==="DAILY"?"DAILY":"FILE"})}catch(i){console.error(i)}}editMemoBulk(t){for(const n of t)this.editMemo(n);this.updateTagsState()}editCommentMemo(t){Le.dispatch({type:"EDIT_COMMENT_MEMO",payload:t})}getThinoViaKeyword(t){const{memos:n}=this.getState();return n.filter(a=>a.content.toLowerCase().includes(t==null?void 0:t.toLowerCase()))}updateTagsState(){var o,i,l,c;const{memos:t}=this.getState(),n=new Set,r={},a=new Map;for(const f of t){if(f.deletedAt!==""&&f.deletedAt)continue;const h=[];if(!a.has(f.path)){const S=(Array.isArray((o=f==null?void 0:f.fileInfo)==null?void 0:o.tags)?f.fileInfo.tags:[]).filter(D=>D).map(D=>D.toString().trim());a.set(f.path,S),h.push(...S)}const g=f.content.replace(/<[^>]*>/g,"").replace(/\`\`\`(.*)?\n[\s\S]*?\n\`\`\`/gm,"").replace(/\`([^\`].*?)\`/g,""),y=[...Array.from(g.match($r)||[]),...Array.from(g.match(ua)||[]),...Array.from(g.match(Wa)||[])];h.push(...y);for(const w of h){if(!w||w==="undefined"||!w)continue;let S=w;typeof w!="string"&&(S=w==null?void 0:w.toString());const D=(c=(l=(i=S==null?void 0:S.replace($r,"$1"))==null?void 0:i.replace(ua,"$1"))==null?void 0:l.replace(Wa,"$2"))==null?void 0:c.trim();/^\d+$/.test(D)||(n.add(D),r[D]=(r[D]||0)+1)}}Le.dispatch({type:"SET_TAGS",payload:{tags:Array.from(n),tagsNum:r}})}clearMemos(){Le.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 e_({content:t,isList:n,name:r})}async createMemoSingleFile({content:t,isList:n}){return await t_({content:t,isList:n})}async createOrPatchThinoFromWeb(t){const n=this.getState().memos;if(t.localId&&(n!=null&&n.some(o=>o.id===t.localId)))return await this.updateMemoById(t.localId,t,!0),null;if(n!=null&&n.some(o=>o.id===t.id)||n!=null&&n.some(o=>o.webId===t.id))return await this.updateMemoById(t.id,t,!1),null;let r=t.sourceType;const a=ft.getState().settings;switch(a&&(a!=null&&a.saveThinoType)&&(r=a.saveThinoType!=="FILE"?a.saveThinoType:t.sourceType),r){case"FILE":case"MULTI":case"CANVAS":return await PC(t);case"DAILY":return await jC(t);default:return await PC(t)}}async initSync(){const n=this.getState().memos.filter(a=>!a.webId),r=await KR(n);for(const a of r)await this.createOrPatchThinoFromWeb(a)}async createMemoCanvas({text:t,isList:n}){return await n_({content:t,isList:n})}async createMemoDaily(t,n){return await bS(t,n)}setWaitingForTemplater({origin:t,date:n,isList:r,id:a,type:o}){Le.dispatch({type:"SET_WAITING_FOR_TEMPLATER",payload:{origin:t,date:n,isList:r,id:a,type:o}})}async pinMemoById(t){const n=this.getMemoById(t),r=await v_(n);Le.dispatch({type:"PIN_MEMO",payload:r});try{const a=ft.getState().settings,o=ft.getState().app;if((o==null?void 0:o.loadLocalStorage("tokenForSync"))&&a.startSync){const l=await wS({id:r.webId,pinned:!0});this.editMemo(l)}}catch(a){console.error(a)}}async unpinMemoById(t){const n=this.getMemoById(t),r=await y_(n);Le.dispatch({type:"PIN_MEMO",payload:r});try{const a=ft.getState().settings,o=ft.getState().app;if((o==null?void 0:o.loadLocalStorage("tokenForSync"))&&a.startSync){const l=await wS({id:r.webId,pinned:!1});this.editMemo(l)}}catch(a){console.error(a)}}async createCommentMemo(t,n,r,a,o){return await jH(t,n,r,a,o)}async importMemos(t,n,r){return await bS(t,n,r)}async createThino({content:t,isList:n,type:r,name:a}){let o=null;switch(r.toLowerCase()){case"canvas":o=await be.createMemoCanvas({text:t,isList:n});break;case"multi":o=await be.createMemoMultiFile({content:t,isList:n,name:a});break;case"daily":o=await be.createMemoDaily(t,n);break;case"file":o=await be.createMemoSingleFile({content:t,isList:n});break;default:o=await be.createMemoDaily(t,n);break}const i=ft.getState().settings,l=ft.getState().app,c=l==null?void 0:l.loadLocalStorage("tokenForSync");return o&&c&&i.startSync&&r!=="DAILY"&&setTimeout(async()=>{try{const f=await M2({content:t,thinoType:"FILE"});await this.updateMemoById(o.id,f,!0)}catch(f){console.error(f)}},200),o}async openThinoByID(t){const n=this.getMemoById(t);if(n)switch(n.sourceType){case"DAILY":await z2(n.id,n.path);break;case"CANVAS":await W2(n.id,n.path);break;case"MULTI":await U2(n.path);break;case"FILE":await V2(n.id,n.path);break}}async updateMemo(t,n,r){const a=this.getMemoById(t);if(a){let o=null;switch(a.sourceType){case"DAILY":o=await _l(a,{id:a.id,content:n,thinoType:r||a.thinoType});break;case"CANVAS":o=await Rl(a,{id:a.id,content:n,thinoType:r||a.thinoType});break;case"MULTI":o=await js(a,{id:a.id,content:n,thinoType:r||a.thinoType});break;case"FILE":o=await Ll(a,{id:a.id,content:n,thinoType:r||a.thinoType})}if(o)return o}return a}}const be=new _H;class BH{getState(){return Le.getState().queryState}async getMyAllQueries(){const t=at.getState().query.filter,n=this.getQueryById(t),r=await Ko.getMyQueries();return Le.dispatch({type:"SET_QUERIES",payload:{queries:[...r,...n?[n]:[]]}}),r}getQueryById(t){return this.getState().queries.find(n=>n.id===t)}pushQuery(t){Le.dispatch({type:"INSERT_QUERY",payload:{query:{...t}}})}editQuery(t){Le.dispatch({type:"UPDATE_QUERY",payload:t})}async deleteQuery(t){await Ko.deleteQueryById(t),Le.dispatch({type:"DELETE_QUERY_BY_ID",payload:{id:t}})}async createQuery(t,n){return await Ko.createQuery(t,n)}createTempQuery(t,n){return DR(t,n)}async updateQuery(t,n,r){return await Ko.updateQuery(t,n,r)}async pinQuery(t){await Ko.pinQuery(t)}async unpinQuery(t){await Ko.unpinQuery(t)}}const on=new BH;class HH{async upload(t){const{vault:n,fileManager:r}=Le.getState().dailyNotesState.app,a=await t.arrayBuffer(),o=YH(t.type),i=qu(),l=x.moment(),c=fb(l,i);let f;if(c)c instanceof x.TFile&&(f=await n.createBinary(await n.getAvailablePathForAttachments(`Pasted Image ${x.moment().format("YYYYMMDDHHmmss")}`,o,c),a));else{const h=await rA(l);f=await n.createBinary(await n.getAvailablePathForAttachments(`Pasted Image ${x.moment().format("YYYYMMDDHHmmss")}`,o,h),a)}return r.generateMarkdownLink(f,f.path,"","")}async parseHtml(t){const n=await t.text(),r=document.createElement("html");r.innerHTML=n;const a=Array.from(r.getElementsByClassName("memo"));for(const o of a){const i=o.getElementsByClassName("content")[0],l=x.htmlToMarkdown(i.innerHTML),c=await be.importMemos(l,!0,x.moment(o.getElementsByClassName("time")[0].innerHTML));be.pushMemo(c)}}}const YH=e=>{var t;return(t=/^image\/(.+)$/.exec(e))==null?void 0:t[1]},$2=new HH;var rs={},g6={exports:{}},Jo={},kS={exports:{}},NS={},fx;function UH(){return fx||(fx=1,function(e){function t(ie,ce){var X=ie.length;ie.push(ce);e:for(;0>>1,De=ie[ae];if(0>>1;aea(Fe,X))Bea(Xe,Fe)?(ie[ae]=Xe,ie[Be]=X,ae=Be):(ie[ae]=Fe,ie[Re]=X,ae=Re);else if(Bea(Xe,X))ie[ae]=Xe,ie[Be]=X,ae=Be;else break e}}return ce}function a(ie,ce){var X=ie.sortIndex-ce.sortIndex;return X!==0?X:ie.id-ce.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],f=[],h=1,g=null,y=3,w=!1,S=!1,D=!1,I=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,N=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(ie){for(var ce=n(f);ce!==null;){if(ce.callback===null)r(f);else if(ce.startTime<=ie)r(f),ce.sortIndex=ce.expirationTime,t(c,ce);else break;ce=n(f)}}function k(ie){if(D=!1,R(ie),!S)if(n(c)!==null)S=!0,$(B);else{var ce=n(f);ce!==null&&he(k,ce.startTime-ie)}}function B(ie,ce){S=!1,D&&(D=!1,M(V),V=-1),w=!0;var X=y;try{for(R(ce),g=n(c);g!==null&&(!(g.expirationTime>ce)||ie&&!Q());){var ae=g.callback;if(typeof ae=="function"){g.callback=null,y=g.priorityLevel;var De=ae(g.expirationTime<=ce);ce=e.unstable_now(),typeof De=="function"?g.callback=De:g===n(c)&&r(c),R(ce)}else r(c);g=n(c)}if(g!==null)var je=!0;else{var Re=n(f);Re!==null&&he(k,Re.startTime-ce),je=!1}return je}finally{g=null,y=X,w=!1}}var L=!1,_=null,V=-1,Y=5,Z=-1;function Q(){return!(e.unstable_now()-Zie||125ae?(ie.sortIndex=X,t(f,ie),n(c)===null&&ie===n(f)&&(D?(M(V),V=-1):D=!0,he(k,X-ae))):(ie.sortIndex=De,t(c,ie),S||w||(S=!0,$(B))),ie},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(ie){var ce=y;return function(){var X=y;y=ce;try{return ie.apply(this,arguments)}finally{y=X}}}}(NS)),NS}var hx;function zH(){return hx||(hx=1,kS.exports=UH()),kS.exports}var px;function VH(){if(px)return Jo;px=1;var e=P,t=zH();function n(s){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+s,m=1;m"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=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]*$/,h={},g={};function y(s){return c.call(g,s)?!0:c.call(h,s)?!1:f.test(s)?g[s]=!0:(h[s]=!0,!1)}function w(s,u,m,b){if(m!==null&&m.type===0)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":return b?!1:m!==null?!m.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function S(s,u,m,b){if(u===null||typeof u>"u"||w(s,u,m,b))return!0;if(b)return!1;if(m!==null)switch(m.type){case 3:return!u;case 4:return u===!1;case 5:return isNaN(u);case 6:return isNaN(u)||1>u}return!1}function D(s,u,m,b,C,O,W){this.acceptsBooleans=u===2||u===3||u===4,this.attributeName=b,this.attributeNamespace=C,this.mustUseProperty=m,this.propertyName=s,this.type=u,this.sanitizeURL=O,this.removeEmptyString=W}var I={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){I[s]=new D(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var u=s[0];I[u]=new D(u,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){I[s]=new D(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){I[s]=new D(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 D(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){I[s]=new D(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){I[s]=new D(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){I[s]=new D(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){I[s]=new D(s,5,!1,s.toLowerCase(),null,!1,!1)});var M=/[\-:]([a-z])/g;function N(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 u=s.replace(M,N);I[u]=new D(u,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var u=s.replace(M,N);I[u]=new D(u,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var u=s.replace(M,N);I[u]=new D(u,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){I[s]=new D(s,1,!1,s.toLowerCase(),null,!1,!1)}),I.xlinkHref=new D("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){I[s]=new D(s,1,!1,s.toLowerCase(),null,!0,!0)});function R(s,u,m,b){var C=I.hasOwnProperty(u)?I[u]:null;(C!==null?C.type!==0:b||!(2ue||C[W]!==O[ue]){var ge=` `+C[W].replace(" at new "," at ");return s.displayName&&ge.includes("")&&(ge=ge.replace("",s.displayName)),ge}while(1<=W&&0<=ue);break}}}finally{je=!1,Error.prepareStackTrace=m}return(s=s?s.displayName||s.name:"")?De(s):""}function Fe(s){switch(s.tag){case 5:return De(s.type);case 16:return De("Lazy");case 13:return De("Suspense");case 19:return De("SuspenseList");case 0:case 2:case 15:return s=Re(s.type,!1),s;case 11:return s=Re(s.type.render,!1),s;case 1:return s=Re(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 _:return"Fragment";case L:return"Portal";case Y:return"Profiler";case V:return"StrictMode";case se:return"Suspense";case le:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case Q:return(s.displayName||"Context")+".Consumer";case Z:return(s._context.displayName||"Context")+".Provider";case K:var u=s.render;return s=s.displayName,s||(s=u.displayName||u.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case fe:return u=s.displayName||null,u!==null?u:Be(s.type)||"Memo";case $:u=s._payload,s=s._init;try{return Be(s(u))}catch{}}return null}function Xe(s){var u=s.type;switch(s.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=u.render,s=s.displayName||s.name||"",u.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Be(u);case 8:return u===V?"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 u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}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 st(s){var u=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function Ct(s){var u=st(s)?"checked":"value",m=Object.getOwnPropertyDescriptor(s.constructor.prototype,u),b=""+s[u];if(!s.hasOwnProperty(u)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var C=m.get,O=m.set;return Object.defineProperty(s,u,{configurable:!0,get:function(){return C.call(this)},set:function(W){b=""+W,O.call(this,W)}}),Object.defineProperty(s,u,{enumerable:m.enumerable}),{getValue:function(){return b},setValue:function(W){b=""+W},stopTracking:function(){s._valueTracker=null,delete s[u]}}}}function tn(s){s._valueTracker||(s._valueTracker=Ct(s))}function _e(s){if(!s)return!1;var u=s._valueTracker;if(!u)return!0;var m=u.getValue(),b="";return s&&(b=st(s)?s.checked?"true":"false":s.value),s=b,s!==m?(u.setValue(s),!0):!1}function et(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 nt(s,u){var m=u.checked;return X({},u,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:m??s._wrapperState.initialChecked})}function ht(s,u){var m=u.defaultValue==null?"":u.defaultValue,b=u.checked!=null?u.checked:u.defaultChecked;m=Ze(u.value!=null?u.value:m),s._wrapperState={initialChecked:b,initialValue:m,controlled:u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null}}function St(s,u){u=u.checked,u!=null&&R(s,"checked",u,!1)}function Tt(s,u){St(s,u);var m=Ze(u.value),b=u.type;if(m!=null)b==="number"?(m===0&&s.value===""||s.value!=m)&&(s.value=""+m):s.value!==""+m&&(s.value=""+m);else if(b==="submit"||b==="reset"){s.removeAttribute("value");return}u.hasOwnProperty("value")?_t(s,u.type,m):u.hasOwnProperty("defaultValue")&&_t(s,u.type,Ze(u.defaultValue)),u.checked==null&&u.defaultChecked!=null&&(s.defaultChecked=!!u.defaultChecked)}function Gt(s,u,m){if(u.hasOwnProperty("value")||u.hasOwnProperty("defaultValue")){var b=u.type;if(!(b!=="submit"&&b!=="reset"||u.value!==void 0&&u.value!==null))return;u=""+s._wrapperState.initialValue,m||u===s.value||(s.value=u),s.defaultValue=u}m=s.name,m!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,m!==""&&(s.name=m)}function _t(s,u,m){(u!=="number"||et(s.ownerDocument)!==s)&&(m==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+m&&(s.defaultValue=""+m))}var Vt=Array.isArray;function Xt(s,u,m,b){if(s=s.options,u){u={};for(var C=0;C"+u.valueOf().toString()+"",u=Mt.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;u.firstChild;)s.appendChild(u.firstChild)}});function sn(s,u){if(u){var m=s.firstChild;if(m&&m===s.lastChild&&m.nodeType===3){m.nodeValue=u;return}}s.textContent=u}var ln={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},vr=["Webkit","ms","Moz","O"];Object.keys(ln).forEach(function(s){vr.forEach(function(u){u=u+s.charAt(0).toUpperCase()+s.substring(1),ln[u]=ln[s]})});function fr(s,u,m){return u==null||typeof u=="boolean"||u===""?"":m||typeof u!="number"||u===0||ln.hasOwnProperty(s)&&ln[s]?(""+u).trim():u+"px"}function ha(s,u){s=s.style;for(var m in u)if(u.hasOwnProperty(m)){var b=m.indexOf("--")===0,C=fr(m,u[m],b);m==="float"&&(m="cssFloat"),b?s.setProperty(m,C):s[m]=C}}var jr=X({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 nr(s,u){if(u){if(jr[s]&&(u.children!=null||u.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(u.dangerouslySetInnerHTML!=null){if(u.children!=null)throw Error(n(60));if(typeof u.dangerouslySetInnerHTML!="object"||!("__html"in u.dangerouslySetInnerHTML))throw Error(n(61))}if(u.style!=null&&typeof u.style!="object")throw Error(n(62))}}function Lr(s,u){if(s.indexOf("-")===-1)return typeof u.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 te=null;function me(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var xe=null,Ye=null,He=null;function Qe(s){if(s=ga(s)){if(typeof xe!="function")throw Error(n(280));var u=s.stateNode;u&&(u=Qf(u),xe(s.stateNode,s.type,u))}}function tt(s){Ye?He?He.push(s):He=[s]:Ye=s}function kt(){if(Ye){var s=Ye,u=He;if(He=Ye=null,Qe(s),u)for(s=0;s>>=0,s===0?32:31-(Js(s)/Ks|0)|0}var po=64,hs=4194304;function ci(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 mo(s,u){var m=s.pendingLanes;if(m===0)return 0;var b=0,C=s.suspendedLanes,O=s.pingedLanes,W=m&268435455;if(W!==0){var ue=W&~C;ue!==0?b=ci(ue):(O&=W,O!==0&&(b=ci(O)))}else W=m&~C,W!==0?b=ci(W):O!==0&&(b=ci(O));if(b===0)return 0;if(u!==0&&u!==b&&!(u&C)&&(C=b&-b,O=u&-u,C>=O||C===16&&(O&4194240)!==0))return u;if(b&4&&(b|=m&16),u=s.entangledLanes,u!==0)for(s=s.entanglements,u&=b;0m;m++)u.push(s);return u}function Ie(s,u,m){s.pendingLanes|=u,u!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,u=31-Rr(u),s[u]=m}function Ue(s,u){var m=s.pendingLanes&~u;s.pendingLanes=u,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=u,s.mutableReadLanes&=u,s.entangledLanes&=u,u=s.entanglements;var b=s.eventTimes;for(s=s.expirationTimes;0=Rt),Ka=" ",Qa=!1;function fu(s,u){switch(s){case"keyup":return It.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gd(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Bi=!1;function uc(s,u){switch(s){case"compositionend":return gd(u);case"keypress":return u.which!==32?null:(Qa=!0,Ka);case"textInput":return s=u.data,s===Ka&&Qa?null:s;default:return null}}function F1(s,u){if(Bi)return s==="compositionend"||!Kt&&fu(s,u)?(s=fd(),Lo=nl=zn=null,Bi=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:m,offset:u-s};s=b}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=Qt(m)}}function Mr(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?Mr(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function Yn(){for(var s=window,u=et();u instanceof s.HTMLIFrameElement;){try{var m=typeof u.contentWindow.location.href=="string"}catch{m=!1}if(m)s=u.contentWindow;else break;u=et(s.document)}return u}function vd(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}function _1(s){var u=Yn(),m=s.focusedElem,b=s.selectionRange;if(u!==m&&m&&m.ownerDocument&&Mr(m.ownerDocument.documentElement,m)){if(b!==null&&vd(m)){if(u=b.start,s=b.end,s===void 0&&(s=u),"selectionStart"in m)m.selectionStart=u,m.selectionEnd=Math.min(s,m.value.length);else if(s=(u=m.ownerDocument||document)&&u.defaultView||window,s.getSelection){s=s.getSelection();var C=m.textContent.length,O=Math.min(b.start,C);b=b.end===void 0?O:Math.min(b.end,C),!s.extend&&O>b&&(C=b,b=O,O=C),C=Dn(m,O);var W=Dn(m,b);C&&W&&(s.rangeCount!==1||s.anchorNode!==C.node||s.anchorOffset!==C.offset||s.focusNode!==W.node||s.focusOffset!==W.offset)&&(u=u.createRange(),u.setStart(C.node,C.offset),s.removeAllRanges(),O>b?(s.addRange(u),s.extend(W.node,W.offset)):(u.setEnd(W.node,W.offset),s.addRange(u)))}}for(u=[],s=m;s=s.parentNode;)s.nodeType===1&&u.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m=document.documentMode,ws=null,fm=null,Hi=null,dc=!1;function yd(s,u,m){var b=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;dc||ws==null||ws!==et(b)||(b=ws,"selectionStart"in b&&vd(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}),Hi&&vt(Hi,b)||(Hi=b,b=qf(fm,"onSelect"),0wc||(s.current=vm[wc],vm[wc]=null,wc--)}function qn(s,u){wc++,vm[wc]=s.current,s.current=u}var fl={},va=Xa(fl),eo=Xa(!1),_a=fl;function bc(s,u){var m=s.type.contextTypes;if(!m)return fl;var b=s.stateNode;if(b&&b.__reactInternalMemoizedUnmaskedChildContext===u)return b.__reactInternalMemoizedMaskedChildContext;var C={},O;for(O in m)C[O]=u[O];return b&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=u,s.__reactInternalMemoizedMaskedChildContext=C),C}function to(s){return s=s.childContextTypes,s!=null}function Xf(){Qn(eo),Qn(va)}function Ey(s,u,m){if(va.current!==fl)throw Error(n(168));qn(va,u),qn(eo,m)}function Cy(s,u,m){var b=s.stateNode;if(u=u.childContextTypes,typeof b.getChildContext!="function")return m;b=b.getChildContext();for(var C in b)if(!(C in u))throw Error(n(108,Xe(s)||"Unknown",C));return X({},m,b)}function Ho(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||fl,_a=va.current,qn(va,s),qn(eo,eo.current),!0}function xy(s,u,m){var b=s.stateNode;if(!b)throw Error(n(169));m?(s=Cy(s,u,_a),b.__reactInternalMemoizedMergedChildContext=s,Qn(eo),Qn(va),qn(va,s)):Qn(eo),qn(eo,m)}var Ds=null,eh=!1,ym=!1;function My(s){Ds===null?Ds=[s]:Ds.push(s)}function vu(s){eh=!0,My(s)}function hl(){if(!ym&&Ds!==null){ym=!0;var s=0,u=ct;try{var m=Ds;for(ct=1;s>=W,C-=W,zi=1<<32-Rr(u)+C|m<Wt?(Kr=jt,jt=null):Kr=jt.sibling;var In=qe(Ce,jt,Me[Wt],lt);if(In===null){jt===null&&(jt=Kr);break}s&&jt&&In.alternate===null&&u(Ce,jt),ye=O(In,ye,Wt),Pt===null?xt=In:Pt.sibling=In,Pt=In,jt=Kr}if(Wt===Me.length)return m(Ce,jt),Xn&&wu(Ce,Wt),xt;if(jt===null){for(;WtWt?(Kr=jt,jt=null):Kr=jt.sibling;var Nl=qe(Ce,jt,In.value,lt);if(Nl===null){jt===null&&(jt=Kr);break}s&&jt&&Nl.alternate===null&&u(Ce,jt),ye=O(Nl,ye,Wt),Pt===null?xt=Nl:Pt.sibling=Nl,Pt=Nl,jt=Kr}if(In.done)return m(Ce,jt),Xn&&wu(Ce,Wt),xt;if(jt===null){for(;!In.done;Wt++,In=Me.next())In=rt(Ce,In.value,lt),In!==null&&(ye=O(In,ye,Wt),Pt===null?xt=In:Pt.sibling=In,Pt=In);return Xn&&wu(Ce,Wt),xt}for(jt=b(Ce,jt);!In.done;Wt++,In=Me.next())In=yt(jt,Ce,Wt,In.value,lt),In!==null&&(s&&In.alternate!==null&&jt.delete(In.key===null?Wt:In.key),ye=O(In,ye,Wt),Pt===null?xt=In:Pt.sibling=In,Pt=In);return s&&jt.forEach(function(oS){return u(Ce,oS)}),Xn&&wu(Ce,Wt),xt}function br(Ce,ye,Me,lt){if(typeof Me=="object"&&Me!==null&&Me.type===_&&Me.key===null&&(Me=Me.props.children),typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case B:e:{for(var xt=Me.key,Pt=ye;Pt!==null;){if(Pt.key===xt){if(xt=Me.type,xt===_){if(Pt.tag===7){m(Ce,Pt.sibling),ye=C(Pt,Me.props.children),ye.return=Ce,Ce=ye;break e}}else if(Pt.elementType===xt||typeof xt=="object"&&xt!==null&&xt.$$typeof===$&&ch(xt)===Pt.type){m(Ce,Pt.sibling),ye=C(Pt,Me.props),ye.ref=Nd(Ce,Pt,Me),ye.return=Ce,Ce=ye;break e}m(Ce,Pt);break}else u(Ce,Pt);Pt=Pt.sibling}Me.type===_?(ye=ku(Me.props.children,Ce.mode,lt,Me.key),ye.return=Ce,Ce=ye):(lt=Bh(Me.type,Me.key,Me.props,null,Ce.mode,lt),lt.ref=Nd(Ce,ye,Me),lt.return=Ce,Ce=lt)}return W(Ce);case L:e:{for(Pt=Me.key;ye!==null;){if(ye.key===Pt)if(ye.tag===4&&ye.stateNode.containerInfo===Me.containerInfo&&ye.stateNode.implementation===Me.implementation){m(Ce,ye.sibling),ye=C(ye,Me.children||[]),ye.return=Ce,Ce=ye;break e}else{m(Ce,ye);break}else u(Ce,ye);ye=ye.sibling}ye=lg(Me,Ce.mode,lt),ye.return=Ce,Ce=ye}return W(Ce);case $:return Pt=Me._init,br(Ce,ye,Pt(Me._payload),lt)}if(Vt(Me))return Dt(Ce,ye,Me,lt);if(ce(Me))return Et(Ce,ye,Me,lt);Ad(Ce,Me)}return typeof Me=="string"&&Me!==""||typeof Me=="number"?(Me=""+Me,ye!==null&&ye.tag===6?(m(Ce,ye.sibling),ye=C(ye,Me),ye.return=Ce,Ce=ye):(m(Ce,ye),ye=sg(Me,Ce.mode,lt),ye.return=Ce,Ce=ye),W(Ce)):m(Ce,ye)}return br}var yl=jy(!0),Em=jy(!1),Tc={},yi=Xa(Tc),wl=Xa(Tc),Fd=Xa(Tc);function bl(s){if(s===Tc)throw Error(n(174));return s}function dh(s,u){switch(qn(Fd,u),qn(wl,s),qn(yi,Tc),s=u.nodeType,s){case 9:case 11:u=(u=u.documentElement)?u.namespaceURI:pt(null,"");break;default:s=s===8?u.parentNode:u,u=s.namespaceURI||null,s=s.tagName,u=pt(u,s)}Qn(yi),qn(yi,u)}function Ic(){Qn(yi),Qn(wl),Qn(Fd)}function Cm(s){bl(Fd.current);var u=bl(yi.current),m=pt(u,s.type);u!==m&&(qn(wl,s),qn(yi,m))}function xm(s){wl.current===s&&(Qn(yi),Qn(wl))}var er=Xa(0);function Od(s){for(var u=s;u!==null;){if(u.tag===13){var m=u.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||m.data==="$?"||m.data==="$!"))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if(u.flags&128)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var Pd=[];function Mm(){for(var s=0;sm?m:4,s(!0);var b=rn.transition;rn.transition={};try{s(!1),u()}finally{ct=m,rn.transition=b}}function Rd(){return Yr().memoizedState}function kc(s,u,m){var b=Cl(s);if(m={lane:b,action:m,hasEagerState:!1,eagerState:null,next:null},Lm(s))Yy(u,m);else if(m=ba(s,u,m,b),m!==null){var C=Ua();Si(m,s,b,C),Rm(m,u,b)}}function Hy(s,u,m){var b=Cl(s),C={lane:b,action:m,hasEagerState:!1,eagerState:null,next:null};if(Lm(s))Yy(u,C);else{var O=s.alternate;if(s.lanes===0&&(O===null||O.lanes===0)&&(O=u.lastRenderedReducer,O!==null))try{var W=u.lastRenderedState,ue=O(W,m);if(C.hasEagerState=!0,C.eagerState=ue,Oe(ue,W)){var ge=u.interleaved;ge===null?(C.next=C,ih(u)):(C.next=ge.next,ge.next=C),u.interleaved=C;return}}catch{}m=ba(s,u,C,b),m!==null&&(C=Ua(),Si(m,s,b,C),Rm(m,u,b))}}function Lm(s){var u=s.alternate;return s===or||u!==null&&u===or}function Yy(s,u){jd=fh=!0;var m=s.pending;m===null?u.next=u:(u.next=m.next,m.next=u),s.pending=u}function Rm(s,u,m){if(m&4194240){var b=u.lanes;b&=s.pendingLanes,m|=b,u.lanes=m,it(s,m)}}var Cs={readContext:Ba,useCallback:Hr,useContext:Hr,useEffect:Hr,useImperativeHandle:Hr,useInsertionEffect:Hr,useLayoutEffect:Hr,useMemo:Hr,useReducer:Hr,useRef:Hr,useState:Hr,useDebugValue:Hr,useDeferredValue:Hr,useTransition:Hr,useMutableSource:Hr,useSyncExternalStore:Hr,useId:Hr,unstable_isNewReconciler:!1},_d={readContext:Ba,useCallback:function(s,u){return hr().memoizedState=[s,u===void 0?null:u],s},useContext:Ba,useEffect:Ry,useImperativeHandle:function(s,u,m){return m=m!=null?m.concat([s]):null,Mc(4194308,4,_y.bind(null,u,s),m)},useLayoutEffect:function(s,u){return Mc(4194308,4,s,u)},useInsertionEffect:function(s,u){return Mc(4,2,s,u)},useMemo:function(s,u){var m=hr();return u=u===void 0?null:u,s=s(),m.memoizedState=[s,u],s},useReducer:function(s,u,m){var b=hr();return u=m!==void 0?m(u):u,b.memoizedState=b.baseState=u,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:u},b.queue=s,s=s.dispatch=kc.bind(null,or,s),[b.memoizedState,s]},useRef:function(s){var u=hr();return s={current:s},u.memoizedState=s},useState:Es,useDebugValue:bh,useDeferredValue:function(s){return hr().memoizedState=s},useTransition:function(){var s=Es(!1),u=s[0];return s=Y1.bind(null,s[1]),hr().memoizedState=s,[u,s]},useMutableSource:function(){},useSyncExternalStore:function(s,u,m){var b=or,C=hr();if(Xn){if(m===void 0)throw Error(n(407));m=m()}else{if(m=u(),Jr===null)throw Error(n(349));Tu&30||Nm(b,u,m)}C.memoizedState=m;var O={value:m,getSnapshot:u};return C.queue=O,Ry(yh.bind(null,b,O,s),[s]),b.flags|=2048,xc(9,vh.bind(null,b,O,m,u),void 0,null),m},useId:function(){var s=hr(),u=Jr.identifierPrefix;if(Xn){var m=Vi,b=zi;m=(b&~(1<<32-Rr(b)-1)).toString(32)+m,u=":"+u+"R"+m,m=Sa++,0<\/script>",s=s.removeChild(s.firstChild)):typeof b.is=="string"?s=W.createElement(m,{is:b.is}):(s=W.createElement(m),m==="select"&&(W=s,b.multiple?W.multiple=!0:b.size&&(W.size=b.size))):s=W.createElementNS(s,m),s[Yi]=u,s[dl]=b,qy(s,u,!1,!1),u.stateNode=s;e:{switch(W=Lr(m,b),m){case"dialog":Kn("cancel",s),Kn("close",s),C=b;break;case"iframe":case"object":case"embed":Kn("load",s),C=b;break;case"video":case"audio":for(C=0;CRc&&(u.flags|=128,b=!0,Fc(O,!1),u.lanes=4194304)}else{if(!b)if(s=Od(W),s!==null){if(u.flags|=128,b=!0,m=s.updateQueue,m!==null&&(u.updateQueue=m,u.flags|=4),Fc(O,!0),O.tail===null&&O.tailMode==="hidden"&&!W.alternate&&!Xn)return Ia(u),null}else 2*An()-O.renderingStartTime>Rc&&m!==1073741824&&(u.flags|=128,b=!0,Fc(O,!1),u.lanes=4194304);O.isBackwards?(W.sibling=u.child,u.child=W):(m=O.last,m!==null?m.sibling=W:u.child=W,O.last=W)}return O.tail!==null?(u=O.tail,O.rendering=u,O.tail=u.sibling,O.renderingStartTime=An(),u.sibling=null,m=er.current,qn(er,b?m&1|2:m&1),u):(Ia(u),null);case 22:case 23:return rg(),b=u.memoizedState!==null,s!==null&&s.memoizedState!==null!==b&&(u.flags|=8192),b&&u.mode&1?Io&1073741824&&(Ia(u),u.subtreeFlags&6&&(u.flags|=8192)):Ia(u),null;case 24:return null;case 25:return null}throw Error(n(156,u.tag))}function V1(s,u){switch(bu(u),u.tag){case 1:return to(u.type)&&Xf(),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return Ic(),Qn(eo),Qn(va),Mm(),s=u.flags,s&65536&&!(s&128)?(u.flags=s&-65537|128,u):null;case 5:return xm(u),null;case 13:if(Qn(er),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(n(340));$i()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return Qn(er),null;case 4:return Ic(),null;case 10:return oh(u.type._context),null;case 22:case 23:return rg(),null;case 24:return null;default:return null}}var Vo=!1,Fn=!1,Wm=typeof WeakSet=="function"?WeakSet:Set,wt=null;function Dl(s,u){var m=s.ref;if(m!==null)if(typeof m=="function")try{m(null)}catch(b){pr(s,u,b)}else m.current=null}function $m(s,u,m){try{m()}catch(b){pr(s,u,b)}}var Jy=!1;function Vd(s,u){if(Id=vo,s=Yn(),vd(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var b=m.getSelection&&m.getSelection();if(b&&b.rangeCount!==0){m=b.anchorNode;var C=b.anchorOffset,O=b.focusNode;b=b.focusOffset;try{m.nodeType,O.nodeType}catch{m=null;break e}var W=0,ue=-1,ge=-1,Pe=0,Ge=0,rt=s,qe=null;t:for(;;){for(var yt;rt!==m||C!==0&&rt.nodeType!==3||(ue=W+C),rt!==O||b!==0&&rt.nodeType!==3||(ge=W+b),rt.nodeType===3&&(W+=rt.nodeValue.length),(yt=rt.firstChild)!==null;)qe=rt,rt=yt;for(;;){if(rt===s)break t;if(qe===m&&++Pe===C&&(ue=W),qe===O&&++Ge===b&&(ge=W),(yt=rt.nextSibling)!==null)break;rt=qe,qe=rt.parentNode}rt=yt}m=ue===-1||ge===-1?null:{start:ue,end:ge}}else m=null}m=m||{start:0,end:0}}else m=null;for(gu={focusedElem:s,selectionRange:m},vo=!1,wt=u;wt!==null;)if(u=wt,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,wt=s;else for(;wt!==null;){u=wt;try{var Dt=u.alternate;if(u.flags&1024)switch(u.tag){case 0:case 11:case 15:break;case 1:if(Dt!==null){var Et=Dt.memoizedProps,br=Dt.memoizedState,Ce=u.stateNode,ye=Ce.getSnapshotBeforeUpdate(u.elementType===u.type?Et:mi(u.type,Et),br);Ce.__reactInternalSnapshotBeforeUpdate=ye}break;case 3:var Me=u.stateNode.containerInfo;Me.nodeType===1?Me.textContent="":Me.nodeType===9&&Me.documentElement&&Me.removeChild(Me.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(lt){pr(u,u.return,lt)}if(s=u.sibling,s!==null){s.return=u.return,wt=s;break}wt=u.return}return Dt=Jy,Jy=!1,Dt}function Oc(s,u,m){var b=u.updateQueue;if(b=b!==null?b.lastEffect:null,b!==null){var C=b=b.next;do{if((C.tag&s)===s){var O=C.destroy;C.destroy=void 0,O!==void 0&&$m(u,m,O)}C=C.next}while(C!==b)}}function Wd(s,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var m=u=u.next;do{if((m.tag&s)===s){var b=m.create;m.destroy=b()}m=m.next}while(m!==u)}}function Zm(s){var u=s.ref;if(u!==null){var m=s.stateNode;switch(s.tag){case 5:s=m;break;default:s=m}typeof u=="function"?u(s):u.current=s}}function Ky(s){var u=s.alternate;u!==null&&(s.alternate=null,Ky(u)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(u=s.stateNode,u!==null&&(delete u[Yi],delete u[dl],delete u[Kf],delete u[G],delete u[yc])),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 Qy(s){return s.tag===5||s.tag===3||s.tag===4}function Xy(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Qy(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 Mh(s,u,m){var b=s.tag;if(b===5||b===6)s=s.stateNode,u?m.nodeType===8?m.parentNode.insertBefore(s,u):m.insertBefore(s,u):(m.nodeType===8?(u=m.parentNode,u.insertBefore(s,m)):(u=m,u.appendChild(s)),m=m._reactRootContainer,m!=null||u.onclick!==null||(u.onclick=Gf));else if(b!==4&&(s=s.child,s!==null))for(Mh(s,u,m),s=s.sibling;s!==null;)Mh(s,u,m),s=s.sibling}function kh(s,u,m){var b=s.tag;if(b===5||b===6)s=s.stateNode,u?m.insertBefore(s,u):m.appendChild(s);else if(b!==4&&(s=s.child,s!==null))for(kh(s,u,m),s=s.sibling;s!==null;)kh(s,u,m),s=s.sibling}var ia=null,Do=!1;function Ms(s,u,m){for(m=m.child;m!==null;)Pc(s,u,m),m=m.sibling}function Pc(s,u,m){if(Pa&&typeof Pa.onCommitFiberUnmount=="function")try{Pa.onCommitFiberUnmount(ho,m)}catch{}switch(m.tag){case 5:Fn||Dl(m,u);case 6:var b=ia,C=Do;ia=null,Ms(s,u,m),ia=b,Do=C,ia!==null&&(Do?(s=ia,m=m.stateNode,s.nodeType===8?s.parentNode.removeChild(m):s.removeChild(m)):ia.removeChild(m.stateNode));break;case 18:ia!==null&&(Do?(s=ia,m=m.stateNode,s.nodeType===8?gm(s.parentNode,m):s.nodeType===1&&gm(s,m),pn(s)):gm(ia,m.stateNode));break;case 4:b=ia,C=Do,ia=m.stateNode.containerInfo,Do=!0,Ms(s,u,m),ia=b,Do=C;break;case 0:case 11:case 14:case 15:if(!Fn&&(b=m.updateQueue,b!==null&&(b=b.lastEffect,b!==null))){C=b=b.next;do{var O=C,W=O.destroy;O=O.tag,W!==void 0&&(O&2||O&4)&&$m(m,u,W),C=C.next}while(C!==b)}Ms(s,u,m);break;case 1:if(!Fn&&(Dl(m,u),b=m.stateNode,typeof b.componentWillUnmount=="function"))try{b.props=m.memoizedProps,b.state=m.memoizedState,b.componentWillUnmount()}catch(ue){pr(m,u,ue)}Ms(s,u,m);break;case 21:Ms(s,u,m);break;case 22:m.mode&1?(Fn=(b=Fn)||m.memoizedState!==null,Ms(s,u,m),Fn=b):Ms(s,u,m);break;default:Ms(s,u,m)}}function Nh(s){var u=s.updateQueue;if(u!==null){s.updateQueue=null;var m=s.stateNode;m===null&&(m=s.stateNode=new Wm),u.forEach(function(b){var C=Q1.bind(null,s,b);m.has(b)||(m.add(b),b.then(C,C))})}}function Wo(s,u){var m=u.deletions;if(m!==null)for(var b=0;bC&&(C=W),b&=~O}if(b=C,b=An()-b,b=(120>b?120:480>b?480:1080>b?1080:1920>b?1920:3e3>b?3e3:4320>b?4320:1960*W1(b/1960))-b,10s?16:s,zr===null)var b=!1;else{if(s=zr,zr=null,jh=0,bn&6)throw Error(n(331));var C=bn;for(bn|=4,wt=s.current;wt!==null;){var O=wt,W=O.child;if(wt.flags&16){var ue=O.deletions;if(ue!==null){for(var ge=0;geAn()-Fh?xu(s,0):Km|=m),Ea(s,u)}function l0(s,u){u===0&&(s.mode&1?(u=hs,hs<<=1,!(hs&130023424)&&(hs=4194304)):u=1);var m=Ua();s=gi(s,u),s!==null&&(Ie(s,u,m),Ea(s,m))}function K1(s){var u=s.memoizedState,m=0;u!==null&&(m=u.retryLane),l0(s,m)}function Q1(s,u){var m=0;switch(s.tag){case 13:var b=s.stateNode,C=s.memoizedState;C!==null&&(m=C.retryLane);break;case 19:b=s.stateNode;break;default:throw Error(n(314))}b!==null&&b.delete(u),l0(s,m)}var u0;u0=function(s,u,m){if(s!==null)if(s.memoizedProps!==u.pendingProps||eo.current)Da=!0;else{if(!(s.lanes&m)&&!(u.flags&128))return Da=!1,Ta(s,u,m);Da=!!(s.flags&131072)}else Da=!1,Xn&&u.flags&1048576&&ky(u,nh,u.index);switch(u.lanes=0,u.tag){case 2:var b=u.type;Ac(s,u),s=u.pendingProps;var C=bc(u,va.current);pl(u,m),C=hh(null,u,b,s,C,m);var O=ph();return u.flags|=1,typeof C=="object"&&C!==null&&typeof C.render=="function"&&C.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,to(b)?(O=!0,Ho(u)):O=!1,u.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,bm(u),C.updater=lh,u.stateNode=C,C._reactInternals=u,Im(u,b,s,m),u=Um(null,u,b,!0,O,m)):(u.tag=0,Xn&&O&&xd(u),Ya(null,u,C,m),u=u.child),u;case 16:b=u.elementType;e:{switch(Ac(s,u),s=u.pendingProps,C=b._init,b=C(b._payload),u.type=b,C=u.tag=_h(b),s=mi(b,s),C){case 0:u=Ih(null,u,b,s,m);break e;case 1:u=$y(null,u,b,s,m);break e;case 11:u=Bm(null,u,b,s,m);break e;case 14:u=qi(null,u,b,mi(b.type,s),m);break e}throw Error(n(306,b,""))}return u;case 0:return b=u.type,C=u.pendingProps,C=u.elementType===b?C:mi(b,C),Ih(s,u,b,C,m);case 1:return b=u.type,C=u.pendingProps,C=u.elementType===b?C:mi(b,C),$y(s,u,b,C,m);case 3:e:{if(Gi(u),s===null)throw Error(n(387));b=u.pendingProps,O=u.memoizedState,C=O.element,Fy(s,u),sh(u,b,null,m);var W=u.memoizedState;if(b=W.element,O.isDehydrated)if(O={element:b,isDehydrated:!1,cache:W.cache,pendingSuspenseBoundaries:W.pendingSuspenseBoundaries,transitions:W.transitions},u.updateQueue.baseState=O,u.memoizedState=O,u.flags&256){C=Eu(Error(n(423)),u),u=Eh(s,u,b,m,C);break e}else if(b!==C){C=Eu(Error(n(424)),u),u=Eh(s,u,b,m,C);break e}else for(bo=cl(u.stateNode.containerInfo.firstChild),wa=u,Xn=!0,pi=null,m=Em(u,null,b,m),u.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if($i(),b===C){u=Ji(s,u,m);break e}Ya(s,u,b,m)}u=u.child}return u;case 5:return Cm(u),s===null&&no(u),b=u.type,C=u.pendingProps,O=s!==null?s.memoizedProps:null,W=C.children,Ed(b,C)?W=null:O!==null&&Ed(b,O)&&(u.flags|=32),Wy(s,u),Ya(s,u,W,m),u.child;case 6:return s===null&&no(u),null;case 13:return zd(s,u,m);case 4:return dh(u,u.stateNode.containerInfo),b=u.pendingProps,s===null?u.child=yl(u,null,b,m):Ya(s,u,b,m),u.child;case 11:return b=u.type,C=u.pendingProps,C=u.elementType===b?C:mi(b,C),Bm(s,u,b,C,m);case 7:return Ya(s,u,u.pendingProps,m),u.child;case 8:return Ya(s,u,u.pendingProps.children,m),u.child;case 12:return Ya(s,u,u.pendingProps.children,m),u.child;case 10:e:{if(b=u.type._context,C=u.pendingProps,O=u.memoizedProps,W=C.value,qn(Su,b._currentValue),b._currentValue=W,O!==null)if(Oe(O.value,W)){if(O.children===C.children&&!eo.current){u=Ji(s,u,m);break e}}else for(O=u.child,O!==null&&(O.return=u);O!==null;){var ue=O.dependencies;if(ue!==null){W=O.child;for(var ge=ue.firstContext;ge!==null;){if(ge.context===b){if(O.tag===1){ge=vi(-1,m&-m),ge.tag=2;var Pe=O.updateQueue;if(Pe!==null){Pe=Pe.shared;var Ge=Pe.pending;Ge===null?ge.next=ge:(ge.next=Ge.next,Ge.next=ge),Pe.pending=ge}}O.lanes|=m,ge=O.alternate,ge!==null&&(ge.lanes|=m),zo(O.return,m,u),ue.lanes|=m;break}ge=ge.next}}else if(O.tag===10)W=O.type===u.type?null:O.child;else if(O.tag===18){if(W=O.return,W===null)throw Error(n(341));W.lanes|=m,ue=W.alternate,ue!==null&&(ue.lanes|=m),zo(W,m,u),W=O.sibling}else W=O.child;if(W!==null)W.return=O;else for(W=O;W!==null;){if(W===u){W=null;break}if(O=W.sibling,O!==null){O.return=W.return,W=O;break}W=W.return}O=W}Ya(s,u,C.children,m),u=u.child}return u;case 9:return C=u.type,b=u.pendingProps.children,pl(u,m),C=Ba(C),b=b(C),u.flags|=1,Ya(s,u,b,m),u.child;case 14:return b=u.type,C=mi(b,u.pendingProps),C=mi(b.type,C),qi(s,u,b,C,m);case 15:return Hm(s,u,u.type,u.pendingProps,m);case 17:return b=u.type,C=u.pendingProps,C=u.elementType===b?C:mi(b,C),Ac(s,u),u.tag=1,to(b)?(s=!0,Ho(u)):s=!1,pl(u,m),Tm(u,b,C),Im(u,b,C,m),Um(null,u,b,!0,s,m);case 19:return Zy(s,u,m);case 22:return Ym(s,u,m)}throw Error(n(156,u.tag))};function c0(s,u){return cs(s,u)}function X1(s,u,m,b){this.tag=s,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,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 Eo(s,u,m,b){return new X1(s,u,m,b)}function ig(s){return s=s.prototype,!(!s||!s.isReactComponent)}function _h(s){if(typeof s=="function")return ig(s)?1:0;if(s!=null){if(s=s.$$typeof,s===K)return 11;if(s===fe)return 14}return 2}function kl(s,u){var m=s.alternate;return m===null?(m=Eo(s.tag,u,s.key,s.mode),m.elementType=s.elementType,m.type=s.type,m.stateNode=s.stateNode,m.alternate=s,s.alternate=m):(m.pendingProps=u,m.type=s.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=s.flags&14680064,m.childLanes=s.childLanes,m.lanes=s.lanes,m.child=s.child,m.memoizedProps=s.memoizedProps,m.memoizedState=s.memoizedState,m.updateQueue=s.updateQueue,u=s.dependencies,m.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},m.sibling=s.sibling,m.index=s.index,m.ref=s.ref,m}function Bh(s,u,m,b,C,O){var W=2;if(b=s,typeof s=="function")ig(s)&&(W=1);else if(typeof s=="string")W=5;else e:switch(s){case _:return ku(m.children,C,O,u);case V:W=8,C|=8;break;case Y:return s=Eo(12,m,u,C|2),s.elementType=Y,s.lanes=O,s;case se:return s=Eo(13,m,u,C),s.elementType=se,s.lanes=O,s;case le:return s=Eo(19,m,u,C),s.elementType=le,s.lanes=O,s;case he:return Hh(m,C,O,u);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case Z:W=10;break e;case Q:W=9;break e;case K:W=11;break e;case fe:W=14;break e;case $:W=16,b=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return u=Eo(W,m,u,C),u.elementType=s,u.type=b,u.lanes=O,u}function ku(s,u,m,b){return s=Eo(7,s,b,u),s.lanes=m,s}function Hh(s,u,m,b){return s=Eo(22,s,b,u),s.elementType=he,s.lanes=m,s.stateNode={isHidden:!1},s}function sg(s,u,m){return s=Eo(6,s,null,u),s.lanes=m,s}function lg(s,u,m){return u=Eo(4,s.children!==null?s.children:[],s.key,u),u.lanes=m,u.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},u}function eS(s,u,m,b,C){this.tag=u,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=Ne(0),this.expirationTimes=Ne(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ne(0),this.identifierPrefix=b,this.onRecoverableError=C,this.mutableSourceEagerHydrationData=null}function ug(s,u,m,b,C,O,W,ue,ge){return s=new eS(s,u,m,ue,ge),u===1?(u=1,O===!0&&(u|=8)):u=0,O=Eo(3,null,null,u),s.current=O,O.stateNode=s,O.memoizedState={element:b,isDehydrated:m,cache:null,transitions:null,pendingSuspenseBoundaries:null},bm(O),s}function tS(s,u,m){var b=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(v6)}catch(e){console.error(e)}}v6();g6.exports=VH();var Z2=g6.exports;const q2=qt(Z2);var Pv,y6=Z2;Pv=rs.createRoot=y6.createRoot;rs.hydrateRoot=y6.hydrateRoot;const WH=e=>{const{children:t,className:n,clickSpaceDestroy:r,destroy:a}=e,o=()=>{r&&a()},i=l=>{(l.key==="Escape"||(l.ctrlKey||l.metaKey)&&l.key.toLowerCase()==="w")&&a()};return v.jsx("div",{className:`dialog-wrapper ${n}`,onClick:o,onKeyDown:l=>i(l),children:v.jsx("div",{className:"dialog-container",onClick:l=>l.stopPropagation(),children:t})})};function bb(e,t,n){const r=document.createElement("div");document.body.append(r),setTimeout(()=>{var c;(c=r.firstElementChild)==null||c.classList.add("showup")},0);const a={destroy:()=>{var c,f;(c=r.firstElementChild)==null||c.classList.remove("showup"),(f=r.firstElementChild)==null||f.classList.add("showoff"),setTimeout(()=>{r.detach(),l.unmount(),document.body.find(".domtoimage-thino")&&document.body.findAll(".domtoimage-thino").forEach(g=>{g.detach()})},oA)}},o={...n,destroy:a.destroy};let i=v.jsx(WH,{destroy:a.destroy,clickSpaceDestroy:!0,...e,children:v.jsx(t,{...o})});i=v.jsx(is,{store:Le,context:Lt,children:i});const l=rs.createRoot(r);return l.render(i),a}class $H extends x.Modal{constructor(n,r,a){super(n);Se(this,"plugin");this.version=a,this.plugin=r}onOpen(){super.onOpen(),this.titleEl.setText(E("Submit issue")),new x.Setting(this.contentEl).setName(E("Current version")+": "+this.version),new x.Setting(this.contentEl).setName(E("Bug report")).setDesc(E("Click the button to copy debug info and open the issue page")).addButton(n=>{n.setButtonText(E("Copy and go")).onClick(async()=>{await oC(this.plugin),new x.Notice(E("Debug info copied")),setTimeout(()=>{window.open("https://github.com/Quorafind/Obsidian-Thino/issues/new/choose","_blank"),this.close()},100)})}),new x.Setting(this.contentEl).setName(E("Feature request")).setDesc(E("Submit your feature request to the issue page")).addButton(n=>{n.setButtonText(E("Go")).onClick(async()=>{window.open("https://github.com/Quorafind/Obsidian-Thino/issues/new/choose","_blank"),this.close()})})}}function w6(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t{const t={};return e.forEach(n=>{const r=n.createdAt.split(" ")[0];t[r]?t[r]++:t[r]=1}),Object.keys(t).sort((n,r)=>t[r]-t[n])[0]},qH=e=>{const t={};return e.forEach(n=>{const r=n.createdAt.slice(11,13);t[r]?t[r]++:t[r]=1}),Object.keys(t).sort((n,r)=>t[r]-t[n])[0]};function mx(e,t,n){const r=P.useRef(),a=P.useRef();P.useEffect(()=>{const i=t-e,l=c=>{a.current||(a.current=c);const f=c-a.current;if(f<1e3){const h=f/1e3;n(e+i*h),r.current=requestAnimationFrame(l)}else n(t)};return r.current=requestAnimationFrame(l),()=>cancelAnimationFrame(r.current)},[t,n,e])}const G2=({statusType:e})=>{const{memoState:{memos:t,tags:n},locationState:{pathname:r},dailyNotesState:{settings:a,app:o}}=P.useContext(Lt),[i,l]=P.useState(0),[c,f]=P.useState(0),[h,g]=P.useState(0),[y,w]=P.useState(null),[S,D]=P.useState(!1),I=ne.useRef(null),[M,N]=P.useState(0),[R,k]=P.useState(0),[B,L]=P.useState(0),[_,V]=P.useState(""),[Y,Z]=P.useState(""),[Q,K]=P.useState(!1),[se,le]=P.useState(null);P.useEffect(()=>{if(e==="banner")return;const ie=t.filter(ce=>!ce.deletedAt&&ce.rowStatus!=="ARCHIVED");L(ie.filter(ce=>{var X;return(X=ce.thinoType)==null?void 0:X.startsWith("TASK")}).length),V(ZH(t)),Z(qH(t))},[t]),P.useLayoutEffect(()=>{if(!o)return;const{tags:ie,memos:ce,days:X}=GH(o);g(ie),l(ce),f(X)},[o]),P.useEffect(()=>{!a||!o||(D(i>9999||h>999||c>999),JH({tags:h,memos:i,days:c},o))},[i,h,c]),P.useEffect(()=>{be.initialized&&t&&r==="/"&&(g(n.length),l(t.filter(ie=>!(ie.deletedAt!==""&&ie.deletedAt)).length),w(t.length>0?t[t.length-1]:null))},[n,t,r]),P.useEffect(()=>{if(!be.initialized)return;if(!y){f(0);return}if(!I.current||!(y!=null&&y.createdAt))return;x.requireApiVersion("1.4.4")&&x.setTooltip(I.current,E("Started from")+" "+ut.getDateTimeString((y==null?void 0:y.createdAt)??""));const ie=x.moment().diff(x.moment(y.createdAt,"YYYY/MM/DD HH:mm:ss"),"days")+1;f(t?ie:0)},[y]);const fe=(ie,ce)=>{if(Q&&ce===se){at.setMemoFilter(""),K(!1);return}const X=on.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([ie]));on.pushQuery(X),at.setMemoFilter(X.id),K(!0),le(ce)},$=()=>{fe({type:"LIST",value:{operator:"IS_NOT",value:"LIST"},relation:"AND"},"LIST")},he=()=>{fe({type:"TYPE",value:{operator:"IS_NOT",value:"NOT_TAGGED"},relation:"AND"},"TYPE")};return mx(M,i,N),mx(R,c,k),v.jsx("div",{className:ar("status-text-container",S?"text-overflow":"",e),children:e==="banner"?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"status-text memos-text",children:[v.jsx("span",{className:"amount-text",children:Math.round(M)}),v.jsx("span",{className:"type-text",children:"THINO"})]}),v.jsxs("div",{className:"status-text tags-text",children:[v.jsx("span",{className:"amount-text",children:h}),v.jsx("span",{className:"type-text",children:E("TAG")})]}),v.jsxs("div",{ref:I,className:"status-text duration-text",onClick:()=>{dt.setShowSiderbarInMobileView(!1),at.setPathname("/daily")},children:[v.jsx("span",{className:"amount-text",children:Math.round(R)??0}),v.jsx("span",{className:"type-text",children:E("DAY")})]})]}):v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"status-sidebar-header title-text",children:v.jsx("span",{className:"normal-text",children:E("Thino status")})}),v.jsxs("div",{className:"status-sidebar-wrapper",children:[v.jsxs("div",{className:"status-text memos-text",children:[v.jsx("span",{className:"type-text",children:E("Thino amount")}),v.jsx("span",{className:"amount-text",children:Math.round(M)})]}),v.jsxs("div",{className:"status-text memos-text",onClick:$,children:[v.jsx("span",{className:"type-text",children:E("Task amount")}),v.jsx("span",{className:"amount-text",children:Math.round(B)??0})]}),v.jsxs("div",{className:"status-text tags-text",onClick:he,children:[v.jsx("span",{className:"type-text",children:E("Used tags")}),v.jsx("span",{className:"amount-text",children:h})]}),v.jsxs("div",{ref:I,className:"status-text duration-text",onClick:()=>{dt.setShowSiderbarInMobileView(!1),at.setPathname("/daily")},children:[v.jsx("span",{className:"type-text",children:E("Used days")}),v.jsx("span",{className:"amount-text",children:Math.round(R)??0})]}),v.jsxs("div",{className:"status-text most-active-day-text",onClick:()=>{const ie=x.moment(_,"YYYY/MM/DD").startOf("day").valueOf(),ce=x.moment(_,"YYYY/MM/DD").endOf("day").valueOf();at.setFromAndToQuery(ie,ce)},children:[v.jsx("span",{className:"type-text",children:E("Most active day")}),v.jsx("span",{className:"amount-text",children:_})]}),v.jsxs("div",{className:"status-text most-active-hour-text",children:[v.jsx("span",{className:"type-text",children:E("Most active hour")}),v.jsx("span",{className:"amount-text",children:Y})]})]})]})})};function b6(e){return`userBannerCache:${e}`}function GH(e){try{const t=b6(e==null?void 0:e.appId),n=la.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 JH({tags:e,memos:t,days:n},r){try{const a={tags:e,memos:t,days:n},o=b6(r==null?void 0:r.appId);la.set({[o]:JSON.stringify(a)})}catch(a){console.error(a)}}const KH=[{text:E("AND"),value:"AND"},{text:E("OR"),value:"OR"}],Wc={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")}]},PATH:{value:"PATH",text:E("PATH"),operators:[{value:"CONTAIN",text:E("INCLUDE")},{value:"NOT_CONTAIN",text:E("EXCLUDE")}]},METADATA:{value:"METADATA",text:E("METADATA"),operators:[{value:"CONTAIN",text:E("INCLUDE")},{value:"NOT_CONTAIN",text:E("EXCLUDE")}]}},ST=Wc.TYPE.values,QH=e=>{for(const t of ST)if(t.value===e)return t.text;return""},gx=()=>({type:"TAG",value:{operator:"CONTAIN",value:""},relation:"AND"}),Yp=(e,t)=>{let n=!0;for(const r of t){const{relation:a}=r,o=XH(e,r);a==="OR"?n=n||o:n=n&&o}return n},XH=(e,t)=>{var i,l;const{type:n,value:{operator:r,value:a}}=t;if(a==="")return!0;let o=!0;if(n==="TAG"){let c=!0;const f=new Set;for(const h of Array.from(e.content.match($r)||[])){const y=h.replace($r,"$1").trim().split("/");let w="";for(const S of y)w+=S,f.add(w),w+="/"}for(const h of Array.from(e.content.match(ua)||[])){const y=h.replace(ua,"$1").trim().split("/");let w="";for(const S of y)w+=S,f.add(w),w+="/"}f.has(a)||(c=!1),r==="NOT_CONTAIN"&&(c=!c),o=c}else if(n==="TYPE"){let c=!1;(a==="NOT_TAGGED"&&e.content.match($r)===null&&e.content.match(Wa)===null||a==="LINKED"&&e.content.match(Mf)!==null||a==="IMAGED"&&e.content.match(kf)!==null||a==="CONNECTED"&&e.content.match(rd)!==null)&&(c=!0),r==="IS_NOT"&&(c=!c),o=c}else if(n==="TEXT"){let c=e.content.toLowerCase().includes(a.toLowerCase());r==="NOT_CONTAIN"&&(c=!c),o=c}else if(n==="LIST"){let f=(e.thinoType==="JOURNAL"?"LIST":e.thinoType==="TASK-TODO"?"TODO":e.thinoType==="TASK-DONE"?"DONE":"OTHER").contains(a);r==="IS_NOT"&&(f=!f),o=f}else if(n==="PATH"){let c=e.path.toLowerCase().includes(a.toLowerCase());r==="NOT_CONTAIN"&&(c=!c),o=c}else if(n==="METADATA"){let c=!1;const f=(i=e==null?void 0:e.fileInfo)==null?void 0:i.frontmatter;a.name?f&&Object.keys(f).length>0&&a.name&&(f[a.name]?c=f[a.name]&&((l=f[a.name])==null?void 0:l.toString().contains(a.value)):c=!1):c=!0,r==="NOT_CONTAIN"&&(c=!c),o=c}else if(n==="SOURCE"){let c=e.sourceType===a;r==="IS_NOT"&&(c=!c),o=c}else if(n==="DATE"){const c=x.moment(a,"YYYY-MM-DD").isValid();let f,h;if(c)f=x.moment(a,"YYYY-MM-DD"),h=f.isBefore(x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"),"day");else{const y=(app.plugins.enabledPlugins.has("nldates-obsidian")&&app.plugins.getPlugin("nldates-obsidian")).parseDate(a);y.date!==null&&(h=y.moment.isBefore(x.moment(e.createdAt),"day"))}r==="NOT_CONTAIN"&&(h=!h),o=h}return o=e.linkId===""?o:!1,o};function Kl(e){const[t,n]=P.useState(()=>!!e),r=P.useCallback(a=>{n(typeof a=="boolean"?a:o=>!o)},[]);return[t,r]}const jv=()=>{const{dailyNotesState:{app:e,view:t},locationState:{query:{type:n}}}=P.useContext(Lt),r=ne.useRef(null),a=ne.useRef(null),[o,i]=Kl(!1);P.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]),P.useEffect(()=>{a&&x.setIcon(a.current,"search")},[a]);const l=g=>{const{type:y}=at.getState().query;g===y&&(g=""),at.setMemoTypeQuery(g)},c=g=>{const y=g.currentTarget.value;if(!y.contains(" -time: ")){at.setTextQuery(y);return}const w=y.split(" -time: ")[1],S=w.length>10?w.match(/\d{4}-\d{2}-\d{2}/g):null;if(S==null){at.setTextQuery(y.split(" -time: ")[0]);return}if(S.length===1){const D=x.moment(S[0]);at.setTimeQuery({from:D.startOf("day").valueOf(),to:D.endOf("day").valueOf()})}else if(S.length===2){const D=x.moment(S[0]),I=x.moment(S[1]);at.setTimeQuery({from:D.startOf("day").valueOf(),to:I.endOf("day").valueOf()})}at.setTextQuery(y.split(" -time: ")[0])},f=()=>{i(!0)},h=()=>{i(!1)};return v.jsxs("div",{className:"search-bar-container",children:[v.jsxs("div",{className:"search-bar-inputer",children:[v.jsx("span",{ref:a,className:"btn icon-img"}),v.jsx("input",{ref:r,className:"text-input",type:"text",onMouseOver:f,onMouseOut:h,placeholder:o?E("Type here"):"",onChange:c})]}),v.jsx("div",{className:"quickly-action-wrapper",children:v.jsxs("div",{className:"quickly-action-container",children:[v.jsx("span",{className:"title-text",children:E("Quick filter")}),v.jsxs("div",{className:"section-container types-container",children:[v.jsxs("span",{className:"section-text",children:[E("TYPE"),":"]}),v.jsx("div",{className:"values-container",children:ST.map((g,y)=>v.jsxs("div",{children:[v.jsx("span",{className:`type-item ${n===g.value?"selected":""}`,onClick:()=>{l(g.value)},children:g.text}),y+1{const{children:t,when:n}=e;return n?v.jsx(v.Fragment,{children:t}):null},ts=eY;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: ")}),a=localStorage.getItem("language");let o="https://pkmer.cn/products/UserProfile/";a&&a==="zh"?o="https://pkmer.cn/products/thino/":o="https://thino.pkmer.net/en/",r.createEl("a",{text:"PKMer",attr:{href:o}}),new x.Notice(e,5e3)}const{exec:tY,execSync:n3e}=x.Platform.isDesktop&&require("child_process"),{createHash:nY}=x.Platform.isDesktop&&require("crypto"),rY={native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"},aY=x.Platform.isDesktop&&{darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:`${rY[oY()]}\\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 oY(){return process.platform!=="win32"?"":process.arch==="ia32"&&Object.hasOwnProperty.call(process.env,"PROCESSOR_ARCHITEW6432")?"mixed":"native"}function iY(e){return nY("sha256").update(e).digest("hex")}function sY(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 cr(e=!1){return new Promise((t,n)=>{tY(aY[process.platform],{},(r,a)=>{if(r)return n(new Error(`Error while obtaining machine id: ${r.stack}`));const o=sY(a.toString());return t(e?o:iY(o))})})}const vx={list:"align-left",waterfall:"layout-grid",calendar:"calendar",minimal:"list",table:"table",chat:"message-square",moments:"chrome"},lY=e=>{const{dailyNotesState:{app:t,view:n,verifyState:r,settings:a},globalState:{manifest:o,isMobileView:i}}=P.useContext(Lt),l=P.useRef(null),c=P.useRef(null),[f,h]=P.useState((window.app||t).loadLocalStorage("thinoListView")),[g,y]=P.useState(null);P.useEffect(()=>{if(!o||!t)return;const S=t==null?void 0:t.plugins.getPlugin(o.id);y(S),h(S==null?void 0:S.settings.MemoListView),dt.setMemoListView(S==null?void 0:S.settings.MemoListView)},[o,t]),P.useEffect(()=>{if(!t||!n||!g||!g.settings)return;const S=()=>{var I,M;if(n.leaf.height===0)return;const D=(I=g==null?void 0:g.settings)==null?void 0:I.MemoListView;(M=g==null?void 0:g.settings)!=null&&M.SupportSelectOtherView||D==="chat"||D==="moments"||(n.leaf.width>950?(h(D),dt.setMemoListView(D)):n.leaf.width<=950&&(dt.setMemoListView("list"),h("list")))};S(),c.current||(c.current=t.workspace.on("resize",S),n.registerEvent(c.current))},[t,n,g]),P.useEffect(()=>{l&&(x.setIcon(l.current,vx[f||"list"]),dt.setMemoListView(f),x.requireApiVersion("1.4.4")&&x.setTooltip(l.current,E("Switch view")))},[f]);const w=async S=>{var k;const D=!x.Platform.isDesktop&&await((k=window.Capacitor)==null?void 0:k.Plugins.Device.getId()),I=x.Platform.isDesktop?await cr():D.identifier||D.uuid;if(!r||(r==null?void 0:r.appId)!==I){fn();return}const M=async B=>{dt.setMemoListView(B),g&&(g.settings.MemoListView=B,await g.saveSettings()),h(B)},N=[{view:"list",title:E("List")},{view:"chat",title:E("Chat")},{view:"moments",title:E("Moments")}];(!i||a!=null&&a.SupportSelectOtherView)&&N.push({view:"waterfall",title:E("Waterfall")},{view:"calendar",title:E("Calendar")},{view:"table",title:E("Table")});const R=new x.Menu;N.forEach(({view:B,title:L})=>{R.addItem(_=>{_.setChecked(f===B).setIcon(vx[B]).setTitle(L).onClick(()=>{f!==B&&M(B)})})}),R.showAtMouseEvent(S.nativeEvent)};return v.jsx("div",{className:`memos-view-switcher-wrapper ${e.className?e.className:""} pro`,ref:l,onClick:w})},uY=()=>{const e=P.useRef(null);return P.useEffect(()=>{e&&(x.setIcon(e.current,"calendar-check"),x.setTooltip&&x.setTooltip(e.current,E("Daily Memos")))},[e]),v.jsx("div",{className:"memos-review-entry-wrapper",ref:e,onClick:()=>{at.setPathname("/daily")}})},AS=()=>({type:"initialText",value:"",timestamp:Date.now(),selectionStart:0,selectionEnd:0}),yx={initialValue:"",interval:300};class cY{constructor(t,n=yx){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.currentIndexthis.actions,this.setState=(r,a)=>{this.actions=[...r],this.currentIndex=a{this.actions=[AS()],this.currentIndex=0,this.dispatchChange()},this.destroy=()=>{this.rmEventListeners()},this.subscribe=r=>{this.listeners.push(r)},this.handleElementKeydown=r=>{const a=r;a.key==="z"&&!a.shiftKey&&(a.metaKey||a.ctrlKey)?(r.preventDefault(),this.runUndo()):(a.key==="z"&&a.shiftKey&&(a.metaKey||a.ctrlKey)||a.key==="y"&&(a.metaKey||a.ctrlKey))&&(r.preventDefault(),this.runRedo())},this.handleElementInput=r=>{const a=r,o=this.actions[this.currentIndex];this.pushNewAction({type:a.inputType,value:this.element.value,timestamp:Date.now(),selectionStart:this.element.selectionEnd-(this.element.value.length-o.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 a=this.actions[this.currentIndex];a&&a.type===r.type&&r.timestamp-a.timestamp=this.config.maxSize?(this.actions.shift(),this.actions[0]=AS()):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({},yx),n),this.config.initialActions&&this.config.initialActions.length>0?(this.actions=this.config.initialActions,this.config.initialIndex!==void 0&&this.config.initialIndex{e(n=>!n)},[])}var S6={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 a(o,i,l){if(!n)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var c=l&&l.debug||!1;if(c){var f=document.querySelector("#input-textarea-caret-position-mirror-div");f&&f.parentNode.removeChild(f)}var h=document.createElement("div");h.id="input-textarea-caret-position-mirror-div",document.body.appendChild(h);var g=h.style,y=window.getComputedStyle?getComputedStyle(o):o.currentStyle;g.whiteSpace="pre-wrap",o.nodeName!=="INPUT"&&(g.wordWrap="break-word"),g.position="absolute",c||(g.visibility="hidden"),t.forEach(function(D){g[D]=y[D]}),r?o.scrollHeight>parseInt(y.height)&&(g.overflowY="scroll"):g.overflow="hidden",h.textContent=o.value.substring(0,i),o.nodeName==="INPUT"&&(h.textContent=h.textContent.replace(/\s/g," "));var w=document.createElement("span");w.textContent=o.value.substring(i)||".",h.appendChild(w);var S={top:w.offsetTop+parseInt(y.borderTopWidth),left:w.offsetLeft+parseInt(y.borderLeftWidth)};return c?w.style.backgroundColor="#aaa":document.body.removeChild(h),S}e.exports=a})()})(S6);var fY=S6.exports;const hY=qt(fY);var D6=dr.CustomEvent;function pY(){try{var e=new D6("cat",{detail:{foo:"bar"}});return e.type==="cat"&&e.detail.foo==="bar"}catch{}return!1}var mY=pY()?D6: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 gY=qt(mY);function vY(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yY(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:!1,f=r.props.onItemHighlighted;r.state.selectedItem!==l&&r.setState({selectedItem:l},function(){f(l),c&&r.props.dropdownScroll(r.itemsRef[r.getId(l)])})},r.scroll=function(l){l.preventDefault();var c=r.props.values,f=l.keyCode||l.which,h=r.getPositionInList(),g;switch(f){case xi.DOWN:g=h+1;break;case xi.UP:g=h-1;break;default:g=h;break}g=(g%c.length+c.length)%c.length,r.selectItem(c[g],[xi.DOWN,xi.UP].includes(f))},r.isSelected=function(l){var c=r.state.selectedItem;return c?r.getId(c)===r.getId(l):!1},r}return Sb(t,[{key:"componentDidMount",value:function(){this.listeners.push(uf.add([xi.DOWN,xi.UP],this.scroll),uf.add([xi.ENTER,xi.TAB],this.onPressEnter));var r=this.props.values;r&&r[0]&&this.selectItem(r[0])}},{key:"componentDidUpdate",value:function(r){var a=this,o=r.values,i=this.props.values,l=o.map(function(f){return a.getId(f)}).join(""),c=i.map(function(f){return a.getId(f)}).join("");l!==c&&i&&i[0]&&this.selectItem(i[0])}},{key:"componentWillUnmount",value:function(){for(var r;this.listeners.length;)r=this.listeners.pop(),uf.remove(r)}},{key:"render",value:function(){var r=this,a=this.props,o=a.values,i=a.component,l=a.style,c=a.itemClassName,f=a.className,h=a.itemStyle;return ne.createElement("ul",{className:"rta__list ".concat(f||""),style:l},o.map(function(g){return ne.createElement(EY,{key:r.getId(g),innerRef:function(w){r.itemsRef[r.getId(g)]=w},selected:r.isSelected(g),item:g,className:c,style:h,onClickHandler:r.onPressEnter,onSelectHandler:r.selectItem,component:i})}))}}]),t}(ne.Component);function xY(e,t){var n=parseInt(getComputedStyle(t).getPropertyValue("height"),10),r=parseInt(getComputedStyle(e).getPropertyValue("height"),10)-n,a=t.offsetTop,o=e.scrollTop;ag.right&&w.left+i>y.width?(h=i-y.width,l.push(Yc.X.LEFT),c.push(Yc.X.RIGHT)):(h=i,l.push(Yc.X.RIGHT),c.push(Yc.X.LEFT)),R>g.bottom&&w.top+o>y.height?(f=o-y.height,l.push(Yc.Y.TOP),c.push(Yc.Y.BOTTOM)):(f=o,l.push(Yc.Y.BOTTOM),c.push(Yc.Y.TOP)),this.props.renderToBody&&(f+=w.top,h+=w.left),this.ref.style.top="".concat(f,"px"),this.ref.style.left="".concat(h,"px"),(r=this.ref.classList).remove.apply(r,c),(a=this.ref.classList).add.apply(a,l)}},{key:"render",value:function(){var r=this,a=this.props,o=a.style,i=a.className,l=a.innerRef,c=a.children,f=a.renderToBody,h=document.body,g=ne.createElement("div",{ref:function(w){r.ref=w,l(w)},className:"rta__autocomplete ".concat(i||""),style:o},c);return f&&h!==null?q2.createPortal(g,h):g}}]),t}(ne.Component),T6=function(e){Tb(t,e);function t(n){var r;Lv(this,t),r=Db(this,yp(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=uf.add(xi.ESC,r._closeAutocomplete))},r.escListenerDestroy=function(){r.escListener&&(uf.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 c=r.textareaRef,f=c.selectionStart,h=c.selectionEnd;return f===h?null:r.state.value.substr(f,h-f)},r.setCaretPosition=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;r.textareaRef&&(r.textareaRef.focus(),r.textareaRef.setSelectionRange(c,c))},r.getCaretPosition=function(){if(!r.textareaRef)return 0;var c=r.textareaRef.selectionEnd;return c},r._handleCaretChange=function(c){var f=function(){var y=r.getCaretPosition()-1;r.lastTrigger=r.lastTrigger?y:0};if(c.type==="keydown"){var h=c.keyCode||c.which;switch(h){case xi.UP:case xi.DOWN:r._isAutocompleteOpen()||f();break;case xi.LEFT:case xi.RIGHT:f();break}return}f()},r._onSelect=function(c){var f=r.state,h=f.selectionEnd,g=f.currentTrigger,y=f.value,w=r.props.onItemSelected;if(g){var S=r._getTextToReplace(g);if(!S){r._closeAutocomplete();return}var D=S(c);if(!D){r._closeAutocomplete();return}w&&w({currentTrigger:g,item:c});var I=function(Z,Q,K){switch(Z){case"start":return K;case"next":case"end":return K+Q.length;default:if(!Number.isInteger(Z))throw new Error('RTA: caretPosition should be "start", "next", "end" or number.');return Z}},M=y.slice(0,h),N=I0(g),R=M.length-M.lastIndexOf(g),k=M.search(new RegExp("(?!".concat(N,")$")))-R,B=D.caretPosition==="next"?"".concat(D.text," "):D.text,L=I(D.caretPosition,B,k),_=M.substring(0,k)+B,V=y.replace(M,_);r.setState({value:V,dataLoading:!1},function(){var Y=r.tokenRegExpEnding.exec(B),Z=Y?Y[0].length:1;r.lastTrigger=L&&L-Z,r.textareaRef.value=V,r.textareaRef.selectionEnd=L,r._changeHandler();var Q=r.textareaRef.scrollTop;r.setCaretPosition(L),window.chrome&&(r.textareaRef.scrollTop=Q)})}},r._getTextToReplace=function(c){var f=r.props.trigger[c];if(!c||!f)return null;var h=f.output;return function(g){if(typeof g=="object"&&(!h||typeof h!="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(h){var y=h(g,c);if(y===void 0||typeof y=="number")throw new Error(`Output functor should return string or object in shape {text: string, caretPosition: string | number}. Got "`.concat(String(y),'". Check the implementation for trigger "').concat(c,`" See https://github.com/webscopeio/react-textarea-autocomplete#trigger-type for more information. `));if(y===null)return null;if(typeof y=="string")return{text:y,caretPosition:bx};if(!y.text&&typeof y.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(c,`" `));if(!y.caretPosition)throw new Error('Output "caretPosition" is not defined! Object should has shape {text: string, caretPosition: string | number}. Check the implementation for trigger "'.concat(c,`" `));return y}if(typeof g!="string")throw new Error(`Output item should be string `);return{text:"".concat(c).concat(g).concat(c),caretPosition:bx}}},r._getCurrentTriggerSettings=function(){var c=r.state.currentTrigger;return c?r.props.trigger[c]:null},r._getValuesFromProvider=function(){var c=r.state,f=c.currentTrigger,h=c.actualToken,g=r._getCurrentTriggerSettings();if(!(!f||!g)){var y=g.dataProvider,w=g.component;if(typeof y!="function")throw new Error("Trigger provider has to be a function!");r.setState({dataLoading:!0});var S=y(h);S instanceof Promise||(S=Promise.resolve(S)),S.then(function(D){if(!Array.isArray(D))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(!D.length){r._closeAutocomplete();return}r.setState({dataLoading:!1,data:D,component:w})}}).catch(function(D){return Sx(D.message)})}},r._getSuggestions=function(){var c=r.state,f=c.currentTrigger,h=c.data;return!f||!h||h&&!h.length?null:h},r._createRegExp=function(){var c=r.props.trigger;r.tokenRegExp=new RegExp("(".concat(Object.keys(c).sort(function(f,h){return fh?-1:0}).map(function(f){return I0(f)}).join("|"),")((?:(?!\\1)[^\\s])*$)")),r.tokenRegExpEnding=new RegExp("(".concat(Object.keys(c).sort(function(f,h){return fh?-1:0}).map(function(f){return I0(f)}).join("|"),")$"))},r._closeAutocomplete=function(){var c=r.state.currentTrigger;r.escListenerDestroy(),r.setState({data:null,dataLoading:!1,currentTrigger:null},function(){c&&r._onItemHighlightedHandler(null)})},r._cleanUpProps=function(){var c=yY({},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 h in c)f.includes(h)&&delete c[h];return c},r._changeHandler=function(c){var f=r.props,h=f.trigger,g=f.onChange,y=f.minChar,w=f.onCaretPositionChange,S=f.movePopupAsYouType,D=r.state,I=D.top,M=D.left,N=c;N||(N=new gY("change",{bubbles:!0}),r.textareaRef.dispatchEvent(N));var R=N.target||r.textareaRef,k=R.selectionEnd,B=R.value;if(r.lastValueBubbledEvent=B,g&&N&&(N.persist&&N.persist(),g(new Proxy(N,{get:function(X,ae,De){return ae==="target"?R:Reflect.get(X,ae,De)}}))),w){var L=r.getCaretPosition();w(L)}r.setState({value:B});var _=function(){var X=hY(R,k),ae=X.top,De=X.left;r.setState({top:ae-r.textareaRef.scrollTop||0,left:De})},V=function(X){r.lastTrigger=k-X,r._closeAutocomplete(),_()};if(k<=r.lastTrigger){var Y=B.slice(0,k),Z=r.tokenRegExp.exec(Y);V(Z?Z[0].length:0)}var Q=B.slice(r.lastTrigger,k),K=r.tokenRegExp.exec(Q),se=K&&K[0],le=K&&K[1]||null,fe=le?le.length-1:0,$=r.tokenRegExpEnding.exec(Q);if($?V($[0].length):r._isAutocompleteOpen()||r._closeAutocomplete(),(!se||se.length<=y+fe)&&(r.state.currentTrigger&&!h[r.state.currentTrigger].allowWhitespace||!r.state.currentTrigger)){r._closeAutocomplete();return}if(le&&h[le].afterWhitespace&&!/\s/.test(B[k-se.length-1])&&B[k-se.length-1]!==void 0){r._closeAutocomplete();return}if(r.state.currentTrigger&&h[r.state.currentTrigger].allowWhitespace){if(K=new RegExp("".concat(I0(r.state.currentTrigger),".*$")).exec(B.slice(0,k)),se=K&&K[0],!se){r._closeAutocomplete();return}le=Object.keys(h).find(function(ce){return ce.slice(0,fe+1)===se.slice(0,fe+1)})||null}var he=se.slice(1);if(le){(S||I===null&&M===null||r.state.currentTrigger!==le)&&_(),r.escListenerInit();var ie=r._getTextToReplace(le);r.setState({selectionEnd:k,currentTrigger:le,textToReplace:ie,actualToken:he},function(){try{r._getValuesFromProvider()}catch(ce){Sx(ce.message)}})}},r._selectHandler=function(c){var f=r.props,h=f.onCaretPositionChange,g=f.onSelect;if(h){var y=r.getCaretPosition();h(y)}g&&(c.persist(),g(c))},r._shouldStayOpen=function(c){var f=c.relatedTarget;return f===null&&(f=document.activeElement),!!(r.dropdownRef&&f instanceof Node&&r.dropdownRef.contains(f))},r._onClick=function(c){var f=r.props.onClick;f&&(c.persist(),f(c)),!r._shouldStayOpen(c)&&r._closeAutocomplete()},r._onBlur=function(c){var f=r.props.onBlur;f&&(c.persist(),f(c)),!r._shouldStayOpen(c)&&r._closeAutocomplete()},r._onScrollHandler=function(){r._closeAutocomplete()},r._onItemHighlightedHandler=function(c){var f=r.props.onItemHighlighted,h=r.state.currentTrigger;if(f)if(typeof f=="function")f({currentTrigger:h,item:c});else throw new Error("`onItemHighlighted` has to be a function")},r._dropdownScroll=function(c){var f=r.props.scrollToItem;if(f){if(f===!0){xY(r.dropdownRef,c);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,c)}},r._isAutocompleteOpen=function(){var c=r.state,f=c.dataLoading,h=c.currentTrigger,g=r._getSuggestions();return!!((f||g)&&h)},r._textareaRef=function(c){r.props.innerRef&&r.props.innerRef(c),r.textareaRef=c},r.lastTrigger=0,r.escListener=null;var a=r.props,o=a.loadingComponent,i=a.trigger,l=a.value;if(l&&(r.state.value=l),r._createRegExp(),!o)throw new Error("RTA: loadingComponent is not defined");if(!i)throw new Error("RTA: trigger is not defined");return r}return Sb(t,[{key:"componentDidMount",value:function(){uf.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 a=r.trigger,o=r.value,i=this.props,l=i.trigger,c=i.value;Object.keys(l).join("")!==Object.keys(a).join("")&&this._createRegExp(),o!==c&&this.lastValueBubbledEvent!==c&&(this.lastTrigger=0,this._changeHandler())}},{key:"componentWillUnmount",value:function(){this.escListenerDestroy(),uf.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,a=this.props,o=a.loadingComponent,i=a.style,l=a.className,c=a.listStyle,f=a.itemStyle,h=a.boundariesElement,g=a.movePopupAsYouType,y=a.listClassName,w=a.itemClassName,S=a.dropdownClassName,D=a.dropdownStyle,I=a.containerStyle,M=a.containerClassName,N=a.loaderStyle,R=a.loaderClassName,k=a.textAreaComponent,B=a.renderToBody,L=this.state,_=L.left,V=L.top,Y=L.dataLoading,Z=L.component,Q=L.value,K=L.textToReplace,se=this._isAutocompleteOpen(),le=this._getSuggestions(),fe={},$;return k.component?($=k.component,fe[k.ref]=this._textareaRef):($=k,fe.ref=this._textareaRef),ne.createElement("div",{className:"rta ".concat(Y===!0?"rta--loading":""," ").concat(M||""),style:I},ne.createElement($,Object.assign({},this._cleanUpProps(),{className:"rta__textarea ".concat(l||""),onChange:this._changeHandler,onSelect:this._selectHandler,onScroll:this._onScrollHandler,onClick:this._onClick,onBlur:this._onBlur,value:Q,style:i},fe)),se&&ne.createElement(kY,{innerRef:function(ie){r.dropdownRef=ie},top:V,left:_,style:D,className:S,movePopupAsYouType:g,boundariesElement:h,textareaRef:this.textareaRef,renderToBody:B},le&&Z&&K&&ne.createElement(CY,{values:le,component:Z,style:c,className:y,itemClassName:w,itemStyle:f,getTextToReplace:K,onItemHighlighted:this._onItemHighlightedHandler,onSelect:this._onSelect,dropdownScroll:this._dropdownScroll}),Y&&ne.createElement("div",{className:"rta__loader ".concat(le!==null?"rta__loader--suggestion-data":"rta__loader--empty-suggestion-data"," ").concat(R||""),style:N},ne.createElement(o,{data:le}))))}}],[{key:"getDerivedStateFromProps",value:function(r){var a=r.value;return a==null?null:{value:a}}}]),t}(ne.Component);T6.defaultProps={movePopupAsYouType:!1,value:null,minChar:1,boundariesElement:"body",scrollToItem:!0,textAreaComponent:"textarea",renderToBody:!1};const NY=()=>{const{app:e}=ft.getState(),t=e.metadataCache.getTags();return[...Object.keys(t)].map(n=>n.split("#").pop())},AY=e=>{let t=[];const n=ft.getState().settings;if(n&&(n!=null&&n.UseVaultTags))t=NY();else{const{tags:o}=be.getState();t=o}const r=e.toLowerCase(),a=[];return t.forEach(o=>{o&&o.toLowerCase().contains(r)&&a.push({name:o,char:o})}),a},FY=e=>{const{app:t}=ft.getState(),n=t.vault.getAllLoadedFiles(),r=[];let a;return n.forEach(o=>{e==="["?a="":e.contains("[")&&(a=e.slice(1));const i=a.toLowerCase();o instanceof x.TFile&&["md","png","jpg","canvas","jpeg","gif"].contains(o.extension)&&o.path.toLowerCase().contains(i)&&r.push({name:o.basename,char:o.name,file:o})}),r};var FS=P,OY=function(e){return typeof e=="function"},PY=function(e){var t=FS.useState(e),n=t[0],r=t[1],a=FS.useRef(n),o=FS.useCallback(function(i){a.current=OY(i)?i(a.current):i,r(a.current)},[]);return[n,o,a]},jY=PY;const xo=qt(jY);function LY(e){return e.containerEl.matches(".memos-list-view")}function OS(){}function RY(e){const n=e.app.workspace.getLeavesOfType("thino_view")[0];return{app:e.app,showSearch:OS,toggleMode:OS,onMarkdownScroll:OS,getMode:()=>"source",getViewType:()=>"thino_view",id:(n==null?void 0:n.id)||ut.randomId(6),scroll:0,editMode:null,get file(){var r;return((r=n==null?void 0:n.view)==null?void 0:r.file)||null},get path(){var r,a;return((a=(r=n==null?void 0:n.view)==null?void 0:r.file)==null?void 0:a.path)||""}}}const _Y=(e,t)=>{const{dailyNotesState:{app:n,plugin:r,view:a,dailyNotes:o}}=P.useContext(Lt),[i,l]=P.useState(null),[c,f]=P.useState(!1),[h,g]=P.useState(""),[y,w]=P.useState(null),S=P.useRef(x.debounce((_,V,Y)=>{HY(_,V,Y)},100)),D=P.useRef();P.useEffect(()=>{var _;if(!y){if(!o&&!(n&&window.app)){const V=(_=n||window.app)==null?void 0:_.vault.getMarkdownFiles();w(V[0]);return}for(const V in o)if(o[V]instanceof x.TFile){w(o[V]);break}}},[o]),P.useEffect(()=>{var K;if(!(r!=null&&r.MarkdownEditor)||!e)return;class _ extends r.MarkdownEditor{updateBottomPadding(){}onUpdate(le,fe){super.onUpdate(le,fe),M&&M(this.get())}}const V=RY(r),Y=r.addChild(new _(n,e,V));Y&&!t&&a&&dt.setInstance(`${(K=a.leaf)==null?void 0:K.id}`,Y),V.editMode=Y,Y.owner.editor=Y.editor;const Z=BY(n,t?"modal":"view");Y.set&&Y.set(Z||"",!0),n.workspace.trigger("thino-editor-created",e,Y.editor);const Q=Y.cm;return D.current=Q,f(!0),l(Y),()=>{f(!1),i==null||i.destroy(),r.removeChild(Y),D.current=null}},[e,r]),P.useEffect(()=>{!i||!n||S.current(h,n,t?"modal":"view")},[h,n]);const I=()=>{i&&i.toggleSource()},M=x.debounce(_=>N(_),500,!0),N=_=>{g(_)};return{instance:i,value:h,set:_=>{try{i&&((i==null?void 0:i.editor).replaceSelection(_),g(_))}catch(V){console.error(V)}},get:()=>i?i.get():"",append:(_,V)=>{if(!i||V&&V!==i.owner.id)return;const Z=(i.get()||"")+_;(i==null?void 0:i.editor).replaceSelection(_),g(Z)},clear:()=>{i&&(i.clear(),g(""))},toggleSource:I}};function I6(e,t){return`thinoEditorContentCache:${e}:${t||"view"}`}function BY(e,t){try{const n=I6(e==null?void 0:e.appId,t);return la.get([n])[n]||""}catch(n){return console.error(n),""}}function HY(e,t,n){try{const r=I6(t==null?void 0:t.appId,n);la.set({[r]:e})}catch(r){console.error(r)}}function YY(e,t){return{line:e.line,ch:e.ch+t}}const Dx=({entity:{name:e,char:t,file:n}})=>v.jsx("div",{children:`${t}`}),UY=({data:e})=>v.jsx("div",{children:"Loading"});let Al;const zY=P.forwardRef((e,t)=>{var Re;const{globalState:{useTinyUndoHistoryCache:n,globalEditorShown:r,memoListView:a},dailyNotesState:{settings:o,app:i}}=P.useContext(Lt),{SaveMemoButtonLabel:l,SaveMemoButtonIcon:c}=o,{className:f,inputerType:h,initialContent:g,placeholder:y,showConfirmBtn:w,showCancelBtn:S,onConfirmBtnClick:D,onCancelBtnClick:I,onContentChange:M}=e,N=P.useRef(null),R=P.useRef(null),k=P.useRef(null),B=dY(),{instance:L,value:_,set:V,get:Y,append:Z,clear:Q,toggleSource:K}=_Y(R.current,e.modal),[,se,le]=xo(0),[fe,$]=xo(!1);P.useEffect(()=>{var Fe,Be;if(o&&o.FocusOnEditor)switch(h){case"minimal":case"memos":(Fe=N.current)==null||Fe.focus();break;case"obsidian":L&&((Be=L.editor)==null||Be.focus())}},[o,L]),P.useEffect(()=>{if(!i)return;const Fe=i.workspace.getLeavesOfType(lo);let Be,Xe;Fe.length>0?(Xe=Fe[0].view.containerEl,Be=Xe.offsetHeight):(Xe=document,Be=window.outerHeight),se(Be)},[i]),P.useEffect(()=>{!N.current||h==="obsidian"||g&&(N.current.value=g,B())},[]),P.useEffect(()=>{var Fe;if(h!=="obsidian")if(n){if(!N.current)return;const{tinyUndoActionsCache:Be,tinyUndoIndexCache:Xe}=la.get(["tinyUndoActionsCache","tinyUndoIndexCache"]);return k.current=new cY(N.current,{interval:5e3,initialActions:Be,initialIndex:Xe}),k.current.subscribe((Ze,st)=>{la.set({tinyUndoActionsCache:Ze,tinyUndoIndexCache:st})}),()=>{var Ze;(Ze=k.current)==null||Ze.destroy()}}else(Fe=k.current)==null||Fe.destroy(),k.current=null,la.remove(["tinyUndoActionsCache","tinyUndoIndexCache"])},[n]),P.useEffect(()=>{N.current&&(N.current.style.height="auto",N.current.style.height=(N.current.scrollHeight??0)+"px")},[(Re=N.current)==null?void 0:Re.value]),P.useImperativeHandle(t,()=>({element:N.current,blur:()=>{var Fe,Be;switch(h){case"minimal":case"memos":(Fe=N.current)==null||Fe.blur();break;case"obsidian":L&&((Be=L.editor)==null||Be.blur())}},focus:Fe=>{var Be,Xe,Ze,st,Ct;switch(h){case"minimal":case"memos":(Be=N.current)==null||Be.focus();break;case"obsidian":if(L){if(Fe&&Fe!==((st=(Ze=(Xe=L==null?void 0:L.owner)==null?void 0:Xe.view)==null?void 0:Ze.leaf)==null?void 0:st.id))return;(Ct=L.editor)==null||Ct.focus()}}},insertTag:Fe=>{var Be,Xe,Ze;switch(h){case"minimal":case"memos":{if(!N.current)return;const st=N.current.value;N.current.value=st.slice(0,N.current.selectionStart)+"# "+st.slice(N.current.selectionStart),M(N.current.value),B();break}case"obsidian":if(Fe&&Fe!==((Ze=(Xe=(Be=L==null?void 0:L.owner)==null?void 0:Be.view)==null?void 0:Xe.leaf)==null?void 0:Ze.id))return;if(L){const st=L.editor,Ct=st.getCursor("from");st.replaceRange("#",Ct),st.setSelection(YY(Ct,1))}break}},insertText:(Fe,Be)=>{switch(h){case"minimal":case"memos":{if(!N.current)return;const Xe=N.current.value;N.current.value=Xe.slice(0,N.current.selectionStart)+Fe+Xe.slice(N.current.selectionStart),M(N.current.value),B()}break;case"obsidian":L&&Z(Fe,Be);break}},setContent:Fe=>{switch(h){case"minimal":case"memos":N.current&&(N.current.value=Fe,M(N.current.value),B());break;case"obsidian":L&&V(Fe);break}},getContent:()=>{switch(h){case"minimal":case"memos":return N.current?N.current.value:"";case"obsidian":return Y()}},toggleSource:()=>{switch(h){case"minimal":case"memos":break;case"obsidian":K();break}},clear:()=>{switch(h){case"minimal":case"memos":N.current&&(N.current.value="",M(N.current.value),B());break;case"obsidian":Q();break}}}),[L,h]);const he=Fe=>{if(!N.current)return;const{fileManager:Be}=Le.getState().dailyNotesState.app;if(Fe.currentTrigger==="#"){const Xe=N.current.value;let Ze;Al!=null?Ze=Al.length:Ze=0;let st=N.current.selectionStart;for(let Ct=0;Ct{var Fe;M(((Fe=N.current)==null?void 0:Fe.value)||""),B()},[]),ce=()=>{var Fe;switch(h){case"minimal":case"memos":if(!N.current)return;N.current.value=ae(),D(N.current.value),N.current.value="",B(),(Fe=k.current)==null||Fe.resetState();break;case"obsidian":D(Y()),Q(),B();break}},X=P.useCallback(()=>{switch(h){case"minimal":case"memos":N.current&&(N.current.value="",M(N.current.value),B());break;case"obsidian":Q();break}I()},[h,L,N]),ae=()=>la.get(["thinoEditorContentCache"]).thinoEditorContentCache||"",De=()=>{if(N.current)return N.current.value=ae(),N.current.value},je=Fe=>{switch(Fe){case"memos":return v.jsx(T6,{className:`common-editor-inputer scroll ${fe?" editing":""}`,loadingComponent:UY,placeholder:y,movePopupAsYouType:!0,value:De(),innerRef:Be=>{N.current=Be},onFocus:()=>{$(!0)},onBlur:()=>{$(!1)},onInput:ie,style:{maxHeight:`${le.current>400?le.current-400:100}px`},dropdownStyle:{minWidth:180,maxHeight:250,overflowY:"auto"},minChar:0,onItemSelected:he,scrollToItem:!0,trigger:{"#":{dataProvider:Be=>(Al=Be,AY(Be).map(({name:Xe,char:Ze})=>({name:Xe,char:Ze}))),component:Dx,afterWhitespace:!0,output:Be=>Be.char},"[[":{dataProvider:Be=>(Al=Be,FY(Be).slice(0,10).map(({name:Xe,char:Ze,file:st})=>({name:Xe,char:Ze,file:st}))),component:Dx,afterWhitespace:!0,output:Be=>Be.char}}});case"minimal":return v.jsx("textarea",{style:{minHeight:48},className:"common-editor-inputer scroll",rows:1,placeholder:y,ref:N,onInput:ie});case"obsidian":return v.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 v.jsx("div",{className:"common-editor-inputer common-editor-mod-cm6",ref:R})}};return v.jsxs("div",{className:"common-editor-wrapper "+f,children:[je(h),v.jsxs("div",{className:"common-tools-wrapper",children:[v.jsx("div",{className:"common-tools-container",children:v.jsx(ts,{when:e.tools!==void 0,children:e.tools})}),v.jsxs("div",{className:"btns-container",children:[v.jsx(ts,{when:S,children:v.jsx("button",{className:"action-btn cancel-btn",onClick:()=>{o&&o.DefaultEditorLocation==="Top"&&!r&&X()},onPointerDown:()=>{(o&&o.DefaultEditorLocation==="Bottom"||r)&&X()},children:at.getState().pathname==="/"&&a==="chat"&&((o==null?void 0:o.chatViewStyle)==="fluent"||(o==null?void 0:o.chatViewStyle)==="inline")?"":E("CANCEL EDIT")})}),v.jsx(ts,{when:w,children:v.jsxs("button",{title:"Ctrl/Cmd + Enter to save thino",className:"action-btn confirm-btn",onClick:()=>{o&&o.DefaultEditorLocation==="Top"&&!r&&ce()},onPointerDown:()=>{(o&&o.DefaultEditorLocation==="Bottom"||r)&&ce()},children:[a==="chat"&&((o==null?void 0:o.chatViewStyle)==="fluent"||(o==null?void 0:o.chatViewStyle)==="inline")?"":l,v.jsx("span",{className:"icon-text",children:null})]})})]})]})]})}),VY=typeof window<"u"?P.useLayoutEffect:P.useEffect;function WY(e,t,n,r){const a=P.useRef(t);VY(()=>{a.current=t},[t]),P.useEffect(()=>{const o=(n==null?void 0:n.current)||window;if(!(o&&o.addEventListener))return;const i=l=>{a.current(l)};return o.addEventListener(e,i,r),()=>{o.removeEventListener(e,i,r)}},[e,n,r])}function Rv(e,t,n="mousedown"){WY(n,r=>{const a=r.target;if(!a||!a.isConnected||a.closest(".suggestion-container")||a.closest(".menu"))return;(Array.isArray(e)?e.every(i=>i.current&&!i.current.contains(a)):e.current&&!e.current.contains(a))&&t(r)})}const E6=e=>{const{year:t,handleYearChange:n}=e,[r,a]=P.useState([]),[o,i]=P.useState(t),l=P.useRef(null),c=P.useRef(null),[f,h]=ne.useState(!1),g=ne.useRef(null);Rv(g,()=>{h(!1)}),P.useEffect(()=>{l.current&&x.setIcon(l.current,"chevron-left"),c.current&&x.setIcon(c.current,"chevron-right")},[l,c,f]),P.useEffect(()=>{w(o)},[t]);const w=S=>{const D=parseInt(S),I=D-D%10,M=[];for(let N=0;N<10;N++)M.push(`${I+N}`);a(M)};return v.jsxs(v.Fragment,{children:[v.jsxs("span",{className:"btn year-btn",onClick:()=>{h(!f)},children:[v.jsx("span",{children:t}),v.jsx("span",{children:E("year")})]}),f&&v.jsxs("div",{ref:g,className:"year-picker-wrapper",children:[v.jsxs("div",{className:"year-picker-header",children:[v.jsxs("div",{className:"year-picker-header-title",children:[o," "+(E("year")||"")]}),v.jsxs("div",{className:"year-picker-header-btns",children:[v.jsx("span",{className:"btn",ref:l,onClick:()=>{const S=parseInt(o)-10;i(S.toString()),w(S.toString())}}),v.jsx("span",{className:"btn",ref:c,onClick:()=>{const S=parseInt(o)+10;i(S.toString()),w(S.toString())}})]})]}),v.jsx("div",{className:"year-picker-body",children:v.jsx("div",{className:"year-picker-body-list",children:r.map(S=>v.jsx("div",{className:`year-picker-body-item ${S===o?"selected":""}`,onClick:()=>{i(S),n(S),h(!1)},children:S},S))})})]})]})},C6=e=>{const{month:t,handleMonthChange:n}=e,[r,a]=P.useState([]),[o,i]=P.useState((parseInt(t)+1).toString()),[l,c]=ne.useState(!1),f=ne.useRef(null);Rv(f,()=>{c(!1)}),P.useEffect(()=>{g()},[t]);const g=()=>{const y=[];for(let w=1;w<=12;w++)y.push(`${w}`);a(y)};return v.jsxs(v.Fragment,{children:[v.jsxs("span",{className:"btn month-btn",onClick:()=>{c(!l)},children:[v.jsxs("span",{children:[E("monthsShort")[parseInt(t)]||parseInt(t)+1," "]}),v.jsx("span",{children:E("month")||""})]}),l&&v.jsxs("div",{ref:f,className:"month-picker-wrapper",children:[v.jsxs("div",{className:"month-picker-header",children:[v.jsxs("div",{className:"month-picker-header-title",children:[o," "+(E("month")||"")]}),v.jsx("div",{className:"month-picker-header-btns"})]}),v.jsx("div",{className:"month-picker-body",children:v.jsx("div",{className:"month-picker-body-list",children:r.map(y=>v.jsx("div",{className:`month-picker-body-item ${y===o?"selected":""}`,onClick:()=>{i(y),n(y),c(!1)},children:y},y))})})]})]})},Ib=e=>{const{className:t,datestamp:n,handleDateStampChange:r}=e,[a,o]=P.useState(wg(n)),[i,l]=P.useState(n);P.useEffect(()=>{o(wg(n))},[n]);const c=new Date(a),f=c.getDay(),h=[];for(let S=0;S{r(D,S.nativeEvent),l(D)},w=S=>{const D=c.getFullYear(),I=c.getMonth()+1;let M=0;I===1&&S===-1?M=new Date(`${D-1}/12/1`).getTime():I===12&&S===1?M=new Date(`${D+1}/1/1`).getTime():M=new Date(`${D}/${I+S}/1`).getTime(),o(wg(M))};return v.jsxs("div",{className:`date-picker-wrapper ${t}`,children:[v.jsxs("div",{className:"date-picker-header",children:[v.jsx("span",{ref:S=>{S&&x.setIcon(S,"chevron-left")},className:"btn btn-text",onClick:()=>w(-1)}),v.jsxs("span",{className:"normal-text",children:[v.jsx(E6,{year:c.getFullYear().toString(),handleYearChange:S=>{o(wg(new Date(`${S}/${c.getMonth()+1}/1`).getTime()))}}),v.jsx(C6,{month:c.getMonth().toString(),handleMonthChange:S=>{o(wg(new Date(`${c.getFullYear()}/${parseInt(S)}/1`).getTime()))}})]}),v.jsx("span",{ref:S=>{S&&x.setIcon(S,"chevron-right")},className:"btn btn-text",onClick:()=>w(1)})]}),v.jsxs("div",{className:"date-picker-day-container",children:[v.jsx("div",{className:"date-picker-day-header",children:E("weekDaysShort").map(S=>v.jsx("span",{className:"day-item",children:S},S))}),v.jsx("div",{className:"date-picker-day-content",children:h.map(S=>S.date===0?v.jsx("span",{className:"day-item null",children:""},S.datestamp):v.jsx("span",{className:`day-item ${S.datestamp===n?"current":""} ${S.datestamp===i?"selected":""}`,onClick:D=>y(D,S.datestamp),children:v.jsx("span",{className:"day-item-text",children:S.date})},S.datestamp))})]})]})};function $Y(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())/ei}function wg(e){const t=new Date(e);return new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`).getTime()}var Tx=function(t){return t.reduce(function(n,r){var a=r[0],o=r[1];return n[a]=o,n},{})},Ix=typeof window<"u"&&window.document&&window.document.createElement?P.useLayoutEffect:P.useEffect,ti="top",as="bottom",os="right",ni="left",J2="auto",_v=[ti,as,os,ni],wp="start",Qg="end",ZY="clippingParents",x6="viewport",bg="popper",qY="reference",Ex=_v.reduce(function(e,t){return e.concat([t+"-"+wp,t+"-"+Qg])},[]),K2=[].concat(_v,[J2]).reduce(function(e,t){return e.concat([t,t+"-"+wp,t+"-"+Qg])},[]),GY="beforeRead",JY="read",KY="afterRead",QY="beforeMain",XY="main",eU="afterMain",tU="beforeWrite",nU="write",rU="afterWrite",aU=[GY,JY,KY,QY,XY,eU,tU,nU,rU];function Ql(e){return e?(e.nodeName||"").toLowerCase():null}function Ni(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function yf(e){var t=Ni(e).Element;return e instanceof t||e instanceof Element}function ns(e){var t=Ni(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Q2(e){if(typeof ShadowRoot>"u")return!1;var t=Ni(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function oU(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},a=t.attributes[n]||{},o=t.elements[n];!ns(o)||!Ql(o)||(Object.assign(o.style,r),Object.keys(a).forEach(function(i){var l=a[i];l===!1?o.removeAttribute(i):o.setAttribute(i,l===!0?"":l)}))})}function iU(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 a=t.elements[r],o=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=i.reduce(function(c,f){return c[f]="",c},{});!ns(a)||!Ql(a)||(Object.assign(a.style,l),Object.keys(o).forEach(function(c){a.removeAttribute(c)}))})}}const sU={name:"applyStyles",enabled:!0,phase:"write",fn:oU,effect:iU,requires:["computeStyles"]};function ql(e){return e.split("-")[0]}var ff=Math.max,Aw=Math.min,bp=Math.round;function TT(){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 M6(){return!/^((?!chrome|android).)*safari/i.test(TT())}function Sp(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),a=1,o=1;t&&ns(e)&&(a=e.offsetWidth>0&&bp(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&bp(r.height)/e.offsetHeight||1);var i=yf(e)?Ni(e):window,l=i.visualViewport,c=!M6()&&n,f=(r.left+(c&&l?l.offsetLeft:0))/a,h=(r.top+(c&&l?l.offsetTop:0))/o,g=r.width/a,y=r.height/o;return{width:g,height:y,top:h,right:f+g,bottom:h+y,left:f,x:f,y:h}}function X2(e){var t=Sp(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 k6(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Q2(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Uu(e){return Ni(e).getComputedStyle(e)}function lU(e){return["table","td","th"].indexOf(Ql(e))>=0}function ad(e){return((yf(e)?e.ownerDocument:e.document)||window.document).documentElement}function Eb(e){return Ql(e)==="html"?e:e.assignedSlot||e.parentNode||(Q2(e)?e.host:null)||ad(e)}function Cx(e){return!ns(e)||Uu(e).position==="fixed"?null:e.offsetParent}function uU(e){var t=/firefox/i.test(TT()),n=/Trident/i.test(TT());if(n&&ns(e)){var r=Uu(e);if(r.position==="fixed")return null}var a=Eb(e);for(Q2(a)&&(a=a.host);ns(a)&&["html","body"].indexOf(Ql(a))<0;){var o=Uu(a);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return a;a=a.parentNode}return null}function Bv(e){for(var t=Ni(e),n=Cx(e);n&&lU(n)&&Uu(n).position==="static";)n=Cx(n);return n&&(Ql(n)==="html"||Ql(n)==="body"&&Uu(n).position==="static")?t:n||uU(e)||t}function eI(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Yg(e,t,n){return ff(e,Aw(t,n))}function cU(e,t,n){var r=Yg(e,t,n);return r>n?n:r}function N6(){return{top:0,right:0,bottom:0,left:0}}function A6(e){return Object.assign({},N6(),e)}function F6(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var dU=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,A6(typeof t!="number"?t:F6(t,_v))};function fU(e){var t,n=e.state,r=e.name,a=e.options,o=n.elements.arrow,i=n.modifiersData.popperOffsets,l=ql(n.placement),c=eI(l),f=[ni,os].indexOf(l)>=0,h=f?"height":"width";if(!(!o||!i)){var g=dU(a.padding,n),y=X2(o),w=c==="y"?ti:ni,S=c==="y"?as:os,D=n.rects.reference[h]+n.rects.reference[c]-i[c]-n.rects.popper[h],I=i[c]-n.rects.reference[c],M=Bv(o),N=M?c==="y"?M.clientHeight||0:M.clientWidth||0:0,R=D/2-I/2,k=g[w],B=N-y[h]-g[S],L=N/2-y[h]/2+R,_=Yg(k,L,B),V=c;n.modifiersData[r]=(t={},t[V]=_,t.centerOffset=_-L,t)}}function hU(e){var t=e.state,n=e.options,r=n.element,a=r===void 0?"[data-popper-arrow]":r;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||k6(t.elements.popper,a)&&(t.elements.arrow=a))}const O6={name:"arrow",enabled:!0,phase:"main",fn:fU,effect:hU,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Dp(e){return e.split("-")[1]}var pU={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mU(e,t){var n=e.x,r=e.y,a=t.devicePixelRatio||1;return{x:bp(n*a)/a||0,y:bp(r*a)/a||0}}function xx(e){var t,n=e.popper,r=e.popperRect,a=e.placement,o=e.variation,i=e.offsets,l=e.position,c=e.gpuAcceleration,f=e.adaptive,h=e.roundOffsets,g=e.isFixed,y=i.x,w=y===void 0?0:y,S=i.y,D=S===void 0?0:S,I=typeof h=="function"?h({x:w,y:D}):{x:w,y:D};w=I.x,D=I.y;var M=i.hasOwnProperty("x"),N=i.hasOwnProperty("y"),R=ni,k=ti,B=window;if(f){var L=Bv(n),_="clientHeight",V="clientWidth";if(L===Ni(n)&&(L=ad(n),Uu(L).position!=="static"&&l==="absolute"&&(_="scrollHeight",V="scrollWidth")),a===ti||(a===ni||a===os)&&o===Qg){k=as;var Y=g&&L===B&&B.visualViewport?B.visualViewport.height:L[_];D-=Y-r.height,D*=c?1:-1}if(a===ni||(a===ti||a===as)&&o===Qg){R=os;var Z=g&&L===B&&B.visualViewport?B.visualViewport.width:L[V];w-=Z-r.width,w*=c?1:-1}}var Q=Object.assign({position:l},f&&pU),K=h===!0?mU({x:w,y:D},Ni(n)):{x:w,y:D};if(w=K.x,D=K.y,c){var se;return Object.assign({},Q,(se={},se[k]=N?"0":"",se[R]=M?"0":"",se.transform=(B.devicePixelRatio||1)<=1?"translate("+w+"px, "+D+"px)":"translate3d("+w+"px, "+D+"px, 0)",se))}return Object.assign({},Q,(t={},t[k]=N?D+"px":"",t[R]=M?w+"px":"",t.transform="",t))}function gU(e){var t=e.state,n=e.options,r=n.gpuAcceleration,a=r===void 0?!0:r,o=n.adaptive,i=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,f={placement:ql(t.placement),variation:Dp(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,xx(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,xx(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const P6={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:gU,data:{}};var E0={passive:!0};function vU(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,o=a===void 0?!0:a,i=r.resize,l=i===void 0?!0:i,c=Ni(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&f.forEach(function(h){h.addEventListener("scroll",n.update,E0)}),l&&c.addEventListener("resize",n.update,E0),function(){o&&f.forEach(function(h){h.removeEventListener("scroll",n.update,E0)}),l&&c.removeEventListener("resize",n.update,E0)}}const j6={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:vU,data:{}};var yU={left:"right",right:"left",bottom:"top",top:"bottom"};function aw(e){return e.replace(/left|right|bottom|top/g,function(t){return yU[t]})}var wU={start:"end",end:"start"};function Mx(e){return e.replace(/start|end/g,function(t){return wU[t]})}function tI(e){var t=Ni(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function nI(e){return Sp(ad(e)).left+tI(e).scrollLeft}function bU(e,t){var n=Ni(e),r=ad(e),a=n.visualViewport,o=r.clientWidth,i=r.clientHeight,l=0,c=0;if(a){o=a.width,i=a.height;var f=M6();(f||!f&&t==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}return{width:o,height:i,x:l+nI(e),y:c}}function SU(e){var t,n=ad(e),r=tI(e),a=(t=e.ownerDocument)==null?void 0:t.body,o=ff(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=ff(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),l=-r.scrollLeft+nI(e),c=-r.scrollTop;return Uu(a||n).direction==="rtl"&&(l+=ff(n.clientWidth,a?a.clientWidth:0)-o),{width:o,height:i,x:l,y:c}}function rI(e){var t=Uu(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+r)}function L6(e){return["html","body","#document"].indexOf(Ql(e))>=0?e.ownerDocument.body:ns(e)&&rI(e)?e:L6(Eb(e))}function Ug(e,t){var n;t===void 0&&(t=[]);var r=L6(e),a=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ni(r),i=a?[o].concat(o.visualViewport||[],rI(r)?r:[]):r,l=t.concat(i);return a?l:l.concat(Ug(Eb(i)))}function IT(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function DU(e,t){var n=Sp(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 kx(e,t,n){return t===x6?IT(bU(e,n)):yf(t)?DU(t,n):IT(SU(ad(e)))}function TU(e){var t=Ug(Eb(e)),n=["absolute","fixed"].indexOf(Uu(e).position)>=0,r=n&&ns(e)?Bv(e):e;return yf(r)?t.filter(function(a){return yf(a)&&k6(a,r)&&Ql(a)!=="body"}):[]}function IU(e,t,n,r){var a=t==="clippingParents"?TU(e):[].concat(t),o=[].concat(a,[n]),i=o[0],l=o.reduce(function(c,f){var h=kx(e,f,r);return c.top=ff(h.top,c.top),c.right=Aw(h.right,c.right),c.bottom=Aw(h.bottom,c.bottom),c.left=ff(h.left,c.left),c},kx(e,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function R6(e){var t=e.reference,n=e.element,r=e.placement,a=r?ql(r):null,o=r?Dp(r):null,i=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(a){case ti:c={x:i,y:t.y-n.height};break;case as:c={x:i,y:t.y+t.height};break;case os:c={x:t.x+t.width,y:l};break;case ni:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var f=a?eI(a):null;if(f!=null){var h=f==="y"?"height":"width";switch(o){case wp:c[f]=c[f]-(t[h]/2-n[h]/2);break;case Qg:c[f]=c[f]+(t[h]/2-n[h]/2);break}}return c}function Xg(e,t){t===void 0&&(t={});var n=t,r=n.placement,a=r===void 0?e.placement:r,o=n.strategy,i=o===void 0?e.strategy:o,l=n.boundary,c=l===void 0?ZY:l,f=n.rootBoundary,h=f===void 0?x6:f,g=n.elementContext,y=g===void 0?bg:g,w=n.altBoundary,S=w===void 0?!1:w,D=n.padding,I=D===void 0?0:D,M=A6(typeof I!="number"?I:F6(I,_v)),N=y===bg?qY:bg,R=e.rects.popper,k=e.elements[S?N:y],B=IU(yf(k)?k:k.contextElement||ad(e.elements.popper),c,h,i),L=Sp(e.elements.reference),_=R6({reference:L,element:R,strategy:"absolute",placement:a}),V=IT(Object.assign({},R,_)),Y=y===bg?V:L,Z={top:B.top-Y.top+M.top,bottom:Y.bottom-B.bottom+M.bottom,left:B.left-Y.left+M.left,right:Y.right-B.right+M.right},Q=e.modifiersData.offset;if(y===bg&&Q){var K=Q[a];Object.keys(Z).forEach(function(se){var le=[os,as].indexOf(se)>=0?1:-1,fe=[ti,as].indexOf(se)>=0?"y":"x";Z[se]+=K[fe]*le})}return Z}function EU(e,t){t===void 0&&(t={});var n=t,r=n.placement,a=n.boundary,o=n.rootBoundary,i=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,f=c===void 0?K2:c,h=Dp(r),g=h?l?Ex:Ex.filter(function(S){return Dp(S)===h}):_v,y=g.filter(function(S){return f.indexOf(S)>=0});y.length===0&&(y=g);var w=y.reduce(function(S,D){return S[D]=Xg(e,{placement:D,boundary:a,rootBoundary:o,padding:i})[ql(D)],S},{});return Object.keys(w).sort(function(S,D){return w[S]-w[D]})}function CU(e){if(ql(e)===J2)return[];var t=aw(e);return[Mx(e),t,Mx(t)]}function xU(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var a=n.mainAxis,o=a===void 0?!0:a,i=n.altAxis,l=i===void 0?!0:i,c=n.fallbackPlacements,f=n.padding,h=n.boundary,g=n.rootBoundary,y=n.altBoundary,w=n.flipVariations,S=w===void 0?!0:w,D=n.allowedAutoPlacements,I=t.options.placement,M=ql(I),N=M===I,R=c||(N||!S?[aw(I)]:CU(I)),k=[I].concat(R).reduce(function(Re,Fe){return Re.concat(ql(Fe)===J2?EU(t,{placement:Fe,boundary:h,rootBoundary:g,padding:f,flipVariations:S,allowedAutoPlacements:D}):Fe)},[]),B=t.rects.reference,L=t.rects.popper,_=new Map,V=!0,Y=k[0],Z=0;Z=0,fe=le?"width":"height",$=Xg(t,{placement:Q,boundary:h,rootBoundary:g,altBoundary:y,padding:f}),he=le?se?os:ni:se?as:ti;B[fe]>L[fe]&&(he=aw(he));var ie=aw(he),ce=[];if(o&&ce.push($[K]<=0),l&&ce.push($[he]<=0,$[ie]<=0),ce.every(function(Re){return Re})){Y=Q,V=!1;break}_.set(Q,ce)}if(V)for(var X=S?3:1,ae=function(Fe){var Be=k.find(function(Xe){var Ze=_.get(Xe);if(Ze)return Ze.slice(0,Fe).every(function(st){return st})});if(Be)return Y=Be,"break"},De=X;De>0;De--){var je=ae(De);if(je==="break")break}t.placement!==Y&&(t.modifiersData[r]._skip=!0,t.placement=Y,t.reset=!0)}}const _6={name:"flip",enabled:!0,phase:"main",fn:xU,requiresIfExists:["offset"],data:{_skip:!1}};function Nx(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 Ax(e){return[ti,os,as,ni].some(function(t){return e[t]>=0})}function MU(e){var t=e.state,n=e.name,r=t.rects.reference,a=t.rects.popper,o=t.modifiersData.preventOverflow,i=Xg(t,{elementContext:"reference"}),l=Xg(t,{altBoundary:!0}),c=Nx(i,r),f=Nx(l,a,o),h=Ax(c),g=Ax(f);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:f,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const B6={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:MU};function kU(e,t,n){var r=ql(e),a=[ni,ti].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=o[0],l=o[1];return i=i||0,l=(l||0)*a,[ni,os].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function NU(e){var t=e.state,n=e.options,r=e.name,a=n.offset,o=a===void 0?[0,0]:a,i=K2.reduce(function(h,g){return h[g]=kU(g,t.rects,o),h},{}),l=i[t.placement],c=l.x,f=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=f),t.modifiersData[r]=i}const H6={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:NU};function AU(e){var t=e.state,n=e.name;t.modifiersData[n]=R6({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Y6={name:"popperOffsets",enabled:!0,phase:"read",fn:AU,data:{}};function FU(e){return e==="x"?"y":"x"}function OU(e){var t=e.state,n=e.options,r=e.name,a=n.mainAxis,o=a===void 0?!0:a,i=n.altAxis,l=i===void 0?!1:i,c=n.boundary,f=n.rootBoundary,h=n.altBoundary,g=n.padding,y=n.tether,w=y===void 0?!0:y,S=n.tetherOffset,D=S===void 0?0:S,I=Xg(t,{boundary:c,rootBoundary:f,padding:g,altBoundary:h}),M=ql(t.placement),N=Dp(t.placement),R=!N,k=eI(M),B=FU(k),L=t.modifiersData.popperOffsets,_=t.rects.reference,V=t.rects.popper,Y=typeof D=="function"?D(Object.assign({},t.rects,{placement:t.placement})):D,Z=typeof Y=="number"?{mainAxis:Y,altAxis:Y}:Object.assign({mainAxis:0,altAxis:0},Y),Q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,K={x:0,y:0};if(L){if(o){var se,le=k==="y"?ti:ni,fe=k==="y"?as:os,$=k==="y"?"height":"width",he=L[k],ie=he+I[le],ce=he-I[fe],X=w?-V[$]/2:0,ae=N===wp?_[$]:V[$],De=N===wp?-V[$]:-_[$],je=t.elements.arrow,Re=w&&je?X2(je):{width:0,height:0},Fe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:N6(),Be=Fe[le],Xe=Fe[fe],Ze=Yg(0,_[$],Re[$]),st=R?_[$]/2-X-Ze-Be-Z.mainAxis:ae-Ze-Be-Z.mainAxis,Ct=R?-_[$]/2+X+Ze+Xe+Z.mainAxis:De+Ze+Xe+Z.mainAxis,tn=t.elements.arrow&&Bv(t.elements.arrow),_e=tn?k==="y"?tn.clientTop||0:tn.clientLeft||0:0,et=(se=Q==null?void 0:Q[k])!=null?se:0,nt=he+st-et-_e,ht=he+Ct-et,St=Yg(w?Aw(ie,nt):ie,he,w?ff(ce,ht):ce);L[k]=St,K[k]=St-he}if(l){var Tt,Gt=k==="x"?ti:ni,_t=k==="x"?as:os,Vt=L[B],Xt=B==="y"?"height":"width",dn=Vt+I[Gt],en=Vt-I[_t],Zn=[ti,ni].indexOf(M)!==-1,kn=(Tt=Q==null?void 0:Q[B])!=null?Tt:0,Er=Zn?dn:Vt-_[Xt]-V[Xt]-kn+Z.altAxis,pt=Zn?Vt+_[Xt]+V[Xt]-kn-Z.altAxis:en,Mt=w&&Zn?cU(Er,Vt,pt):Yg(w?Er:dn,Vt,w?pt:en);L[B]=Mt,K[B]=Mt-Vt}t.modifiersData[r]=K}}const U6={name:"preventOverflow",enabled:!0,phase:"main",fn:OU,requiresIfExists:["offset"]};function PU(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function jU(e){return e===Ni(e)||!ns(e)?tI(e):PU(e)}function LU(e){var t=e.getBoundingClientRect(),n=bp(t.width)/e.offsetWidth||1,r=bp(t.height)/e.offsetHeight||1;return n!==1||r!==1}function RU(e,t,n){n===void 0&&(n=!1);var r=ns(t),a=ns(t)&&LU(t),o=ad(t),i=Sp(e,a,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Ql(t)!=="body"||rI(o))&&(l=jU(t)),ns(t)?(c=Sp(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=nI(o))),{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function _U(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function a(o){n.add(o.name);var i=[].concat(o.requires||[],o.requiresIfExists||[]);i.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&a(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||a(o)}),r}function BU(e){var t=_U(e);return aU.reduce(function(n,r){return n.concat(t.filter(function(a){return a.phase===r}))},[])}function HU(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function YU(e){var t=e.reduce(function(n,r){var a=n[r.name];return n[r.name]=a?Object.assign({},a,r,{options:Object.assign({},a.options,r.options),data:Object.assign({},a.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Fx={placement:"bottom",modifiers:[],strategy:"absolute"};function Ox(){for(var e=arguments.length,t=new Array(e),n=0;n({placement:e,modifiers:[{name:"flip",options:{allowedAutoPlacements:t,rootBoundary:"document"}},{name:"preventOverflow",options:{rootBoundary:"document"}}]}),ez=e=>{const n=P.useRef(null),[r,a]=P.useState(null),[o,i]=P.useState(0);let l,c;const f=()=>{if(x.Platform.isMobile){l="right-end",c=["bottom"];return}const g=window.innerWidth-o>280*1.2,y=window.innerWidth-o<280,w=window.innerWidth>280*1.5;if(e.DefaultEditorLocation!=="Bottom"){g?(l="right-end",c=["left-end"]):y&&w?(l="left-end",c=["right-end"]):(l="bottom",c=["bottom"]);return}g?(l="top-end",c=["top-start"]):y&&o>280?(l="top-start",c=["top-end"]):(l="top",c=["top"])};P.useEffect(()=>{e&&f()},[o,e==null?void 0:e.DefaultEditorLocation]);const h=Cb(n.current,r,XU(l,c));return{setPosX:i,popperRef:n,setPopperElement:a,popper:h}},tz=()=>{const e=new Set,t=at.getState().query.filter,n=at.getState().query.tag,r=on.getQueryById(t||"");if(r&&r.querystring){const a=JSON.parse(r.querystring);if(Array.isArray(a))for(const o of a)o.type==="TAG"&&o.value&&o.value.operator==="CONTAIN"&&e.add(o.value.value)}return n&&e.add(n),Array.from(e)},nz=e=>{const{offsetLeft:t,offsetTop:n,offsetHeight:r,offsetWidth:a,selectionEnd:o}=e,i=document.createElement("div"),l=window.getComputedStyle(e);for(const D of l)i.style.setProperty(D,l.getPropertyValue(D));i.style.position="fixed",i.style.visibility="hidden",i.style.whiteSpace="pre-wrap";const f=e.tagName==="INPUT"?e.value.replace(/ /g,"."):e.value;i.textContent=f.substring(0,o||0),e.tagName==="TEXTAREA"&&(i.style.height="auto");const h=document.createElement("span");h.textContent=f.substring(o||0)||".",i.appendChild(h),document.body.appendChild(i);const{offsetLeft:g,offsetTop:y,offsetHeight:w,offsetWidth:S}=h;return document.body.removeChild(i),{x:t+g,y:n+y,h:r+w,w:a+S}},hf=({className:e,editorType:t,destroy:n,modal:r})=>{const{globalState:a,dailyNotesState:{app:o,settings:i,view:l,verifyState:c}}=P.useContext(Lt),[f,h]=Kl(!0),g=P.useRef(f),[y,w]=xo(!0),S=P.useRef(null),D=P.useRef(null),I=P.useRef(a),[M,N]=xo(!1),[R,k]=xo(!1),{setPosX:B,popperRef:L,setPopperElement:_,popper:V}=ez(i),[Y]=xo(parseInt(x.moment().format("x"))),Z=P.useRef(null),[Q,K]=xo((i==null?void 0:i.EnabledLocationList.length)===1?i==null?void 0:i.EnabledLocationList[0].value:(i==null?void 0:i.MemoSaveLocation)||"DAILY"),se=P.useRef(i.MemoSaveLocation||"DAILY");P.useEffect(()=>{g.current=f},[f]),P.useEffect(()=>{!D.current||!o||!l||(l.registerEvent(o.workspace.on("focus-on-textarea",_e=>{var et;(et=D.current)==null||et.focus(_e==null?void 0:_e.id)})),l.registerEvent(o.workspace.on("blur-on-memos",()=>{var _e;(_e=D.current)==null||_e.blur()})),l.registerEvent(o.workspace.on("send-to-thino",async(_e,et)=>{var nt,ht;if(typeof _e=="string")(nt=D.current)==null||nt.insertText(_e+` `,et.id);else{const St=_e.toPNG(),Tt=new Blob([St],{type:"image/png"}),Gt=new File([Tt],"image.png",{type:"image/png",lastModified:Date.now()});if(!Gt)return;const _t=await ce(Gt);_t&&((ht=D.current)==null||ht.insertText(_t+` `,et.id))}})))},[D,l,o]),P.useEffect(()=>{i&&h(i.DefaultPrefix==="List")},[i==null?void 0:i.DefaultPrefix]),P.useEffect(()=>{if(i){if(i.EnabledLocationList.length===1){K(i.EnabledLocationList[0].value);return}K(i.MemoSaveLocation||"DAILY")}},[i==null?void 0:i.MemoSaveLocation,i==null?void 0:i.EnabledLocationList]),P.useEffect(()=>{var nt;if(!i||!Z.current)return;const _e=(nt=Gg.find(ht=>ht.title===Q))==null?void 0:nt.icon;x.setIcon(Z.current,_e),x.requireApiVersion("1.4.4")&&x.setTooltip(Z.current,E("Thino Save To: ")+Q),se.current=Q;const et=a.manifest;if(et){const ht=o==null?void 0:o.plugins.getPlugin(et.id);if(ht){if(ht.settings.MemoSaveLocation===Q)return;ht.settings.MemoSaveLocation=Q,ht.saveSettings()}}},[Q,y]),P.useEffect(()=>{D.current&&i.MemoSaveLocation&&K(i.MemoSaveLocation)},[Z,i]),P.useEffect(()=>{if(!D.current||!i||x.Platform.isDesktop||a.globalEditorShown)return;const _e=i.UseButtonToShowEditor&&i.DefaultEditorLocation==="Bottom";if(x.Platform.isDesktop){w(!0);return}if(t&&t==="inline"){w(!0);return}if(w(x.Platform.isMobile&&!_e),!_e||a.memoListView==="chat")return;const et=document.body.find(".memolist-scrollview");et&&(et.onscroll=()=>{if(a.globalEditorShown)return;if(!a.memoListView&&dt.getState().memoListView==="chat"){et.onscroll=null;return}const nt=D.current.getContent();x.Platform.isMobile&&_e&&!nt&&w(!1)})},[a.globalEditorShown,t,D]);const le=()=>{k(!1)};P.useEffect(()=>{var _e,et,nt,ht,St,Tt,Gt,_t,Vt;if(o&&(a.markMemoId||(_e=a.editMemoId)!=null&&_e.trim()&&a.editMemoId!==I.current.editMemoId)){const Xt=o.workspace.getLeavesOfType("thino_view");Xt.length>0&&o.workspace.revealLeaf(Xt[0])}if(a.markMemoId){const Xt=`${E("MARK")}: [@THINO](${a.markMemoId})`;(et=D.current)==null||et.insertText(Xt),(nt=D.current)==null||nt.focus(),dt.setMarkMemoId("");return}if((ht=a.editMemoId)!=null&&ht.trim()&&a.editMemoId!==I.current.editMemoId){const Xt=be.getMemoById(a.editMemoId);if(Xt)switch(h(Xt.thinoType==="JOURNAL"),i.EditorType){case"memos":(St=D.current)==null||St.setContent(Xt.content.replace(/ \^\S{6}$/,"")||""),(Tt=D.current)==null||Tt.focus();break;case"obsidian":(Gt=D.current)==null||Gt.clear(),(_t=D.current)==null||_t.setContent(Xt.content.replace(/ \^\S{6}$/,"")||""),(Vt=D.current)==null||Vt.focus();break}}I.current=a},[a.markMemoId,a.editMemoId]),P.useEffect(()=>{var _e,et,nt;!D.current||M||i.EditorType==="memos"&&((_e=D.current)==null||_e.element.addEventListener("paste",fe),(et=D.current)==null||et.element.addEventListener("drop",$),(nt=D.current)==null||nt.element.addEventListener("click",he),N(!0))},[D.current]);const fe=async _e=>{var et;if(_e.clipboardData&&_e.clipboardData.files.length>0){_e.preventDefault();const nt=_e.clipboardData.files;for(const ht of nt){const St=await ce(ht);St&&((et=D.current)==null||et.insertText(St))}}},$=async _e=>{var et;if(_e.dataTransfer&&_e.dataTransfer.files.length>0){_e.preventDefault();const nt=_e.dataTransfer.files;for(const ht of nt){const St=await ce(ht);St&&((et=D.current)==null||et.insertText(St))}}},he=()=>{var _e;De(((_e=D.current)==null?void 0:_e.element.value)||"")},ie=async(_e,et)=>{var St,Tt,Gt;const nt=_e.ctrlKey||_e.metaKey,ht=_e.altKey;if(_e.key==="Escape"&&a.globalEditorShown&&(dt.setGlobalEditorShown(!1),_e.preventDefault()),nt&&_e.key==="Enter"){_e.preventDefault(),_e.stopPropagation(),et?(await X((Tt=D.current)==null?void 0:Tt.getContent()),(Gt=D.current)==null||Gt.clear()):await X((St=D.current)==null?void 0:St.element.value);return}if(ht)for(let _t=0;_t{var _t;et||De(((_t=D.current)==null?void 0:_t.element.value)||"")})},ce=P.useCallback(async _e=>{const{type:et}=_e;if(et.startsWith("image"))try{return`${await $2.upload(_e)}`}catch(nt){new x.Notice(nt)}},[]),X=async _e=>{if(!_e||_e.trim()===""){new x.Notice(E("Content cannot be empty"));return}const et=ft.getState().settings,nt=et==null?void 0:et.addTagAutomatically,ht=et==null?void 0:et.addTagWithNewline,St=et==null?void 0:et.addTagPosition,Gt=(tz()||[]).filter(dn=>!_e.includes(`#${dn}`)),_t=async(dn,en)=>{en=en.replaceAll(" "," "),C0("");try{if(!dn){let kn;switch(se.current){case"CANVAS":kn=await be.createMemoCanvas({text:en,isList:g.current});break;case"MULTI":kn=await be.createMemoMultiFile({content:en,isList:g.current});break;case"DAILY":kn=await be.createMemoDaily(en,g.current);break;case"FILE":kn=await be.createMemoSingleFile({content:en,isList:g.current});break}if(!kn)return;be.pushMemo(kn),(!nt||Gt.length===0)&&at.clearQuery();const Er=o||ft.getState().app,pt=Er==null?void 0:Er.loadLocalStorage("tokenForSync");kn&&pt&&i.startSync&&setTimeout(async()=>{try{if(se.current!=="DAILY"){const Mt=await M2({content:en,thinoType:"FILE"});await be.updateMemoById(kn.id,Mt,!0)}}catch(Mt){console.error(Mt)}},200);return}const Zn=be.getMemoById(dn);if(Zn&&(Zn.content!==en||Zn.thinoType!==(g.current?"JOURNAL":"TASK-TODO"))){const kn=await be.updateMemo(Zn.id,en,g.current?"JOURNAL":Zn.thinoType.startsWith("TASK")?Zn.thinoType:"TASK-TODO");kn.updatedAt=ut.getDateTimeString(Date.now()),be.editMemo(kn)}dt.setEditMemoId("")}catch(Zn){new x.Notice(Zn.message)}};n&&n();const{editMemoId:Vt}=dt.getState(),Xt=Gt&&Gt.length>0&&nt&&!Vt?St==="Beginning"?`${Gt.map(dn=>`#${dn}`).join(" ")} ${ht?` `:""}${_e}`:`${_e} ${ht?` `:""}${Gt.map(dn=>`#${dn}`).join(" ")}`:_e;await _t(Vt,Xt),C0("")},ae=P.useCallback(()=>{var _e;dt.setEditMemoId(""),(_e=D.current)==null||_e.setContent(""),C0("")},[]),De=P.useCallback(_e=>{if(C0(_e??""),!D.current)return;const et=D.current.getContent(),nt=D.current.element.selectionStart,ht=et.slice(0,nt),St=et.slice(nt);(ht.endsWith("@")||ht.endsWith("📆"))&&St.startsWith(" ")||(ht.endsWith("@")||ht.endsWith("📆"))&&St===""?(Ze(),k(!0)):k(!1),setTimeout(()=>{var Tt;(Tt=D.current)==null||Tt.focus()})},[i.EditorType]),je=_e=>{if(!D.current||!i)return;_e&&(le(),h(!1));const et=D.current.getContent(),nt=D.current.element.selectionStart,ht=et.slice(0,nt),St=et.slice(nt),Tt=x.moment(_e);if(ht.endsWith("@"))switch(i.InsertDateFormat){case"Dataview":D.current.element.value=et.slice(0,D.current.element.selectionStart-1)+"[due:: "+Tt.format("YYYY-MM-DD")+"]"+St,D.current.element.setSelectionRange(nt+17,nt+17),D.current.focus(),De(D.current.element.value);break;case"Tasks":D.current.element.value=et.slice(0,D.current.element.selectionStart-1)+"📅 "+Tt.format("YYYY-MM-DD")+St,D.current.element.setSelectionRange(nt+11,nt+11),D.current.focus(),De(D.current.element.value)}else{D.current.element.value=ht+Tt.format("YYYY-MM-DD")+St,D.current.element.setSelectionRange(nt+10,nt+10),D.current.focus(),De(D.current.element.value);return}},Re=()=>{D.current&&h()},Fe=async()=>{var nt;const _e=!x.Platform.isDesktop&&await((nt=window.Capacitor)==null?void 0:nt.Plugins.Device.getId()),et=x.Platform.isDesktop?await cr():_e.identifier||_e.uuid;return!c||(c==null?void 0:c.appId)!==et?(fn(),!1):!0},Be=async _e=>{if(!await Fe())return;const et=new x.Menu;i.EnabledLocationList.forEach(Tt=>{et.addItem(Gt=>{var _t;Gt.setTitle(E(Tt.value)).setIcon(((_t=Gg.find(Vt=>Vt.title===Tt.value))==null?void 0:_t.icon)??"file").setChecked(Q===Tt.value).onClick(()=>{K(Tt.value)})})});let nt=_e.target,ht=null;for(;!nt.hasClass("location-wrapper")&&(ht=nt.parentElement,ht);)nt=ht;const St=nt.getBoundingClientRect();setTimeout(()=>{et.showAtPosition({x:St.x,y:St.bottom,width:St.width,left:!1,overlap:!0})},200)},Xe=P.useCallback(()=>{var _e,et;if(!(!D.current&&i.EditorType==="memos"))switch(i.EditorType){case"obsidian":(_e=D.current)==null||_e.focus(),(et=D.current)==null||et.insertTag();break;case"memos":{const nt=D.current.getContent(),ht=D.current.element.selectionStart,St=nt.slice(0,ht),Tt=nt.slice(ht);let Gt=St+"# "+Tt,_t=St.length+1;St.endsWith("#")&&Tt.startsWith(" ")&&(Gt=St.slice(0,St.length-1)+Tt.slice(1),_t=St.length-1),D.current.element.value=Gt,D.current.element.setSelectionRange(_t,_t),D.current.focus();const Vt=new Event("input",{bubbles:!0,cancelable:!0});D.current.element.dispatchEvent(Vt),De(D.current.element.value)}}},[o]),Ze=P.useCallback(()=>{if(!D.current||!L.current||!i||!o)return;const nt=o.workspace.getLeavesOfType(lo)[0].view.containerEl,ht=280,St=nt.clientWidth,{x:Tt,y:Gt}=nz(D.current.element);let _t,Vt;x.Platform.isMobile?(window.innerWidth-Tt>ht?_t=(Tt+ht+16>St,Tt+18):window.innerWidth-TtSt,Tt+34):_t=D.current.element.clientWidth/2,i.DefaultEditorLocation==="Bottom"&&window.innerWidth>875?Vt=Gt+4:i.DefaultEditorLocation==="Bottom"&&window.innerWidth<=875?Vt=Gt+19:i.DefaultEditorLocation==="Top"&&window.innerWidth<=875&&(Vt=Gt+36)):(_t=(Tt+ht+16>St,Tt+18),Vt=Gt+34),B(Tt),L.current.style.left=`${_t}px`,L.current.style.top=`${Vt}px`},[i,o]),st=P.useCallback(()=>{const _e=document.createElement("input");document.body.appendChild(_e),_e.type="file",_e.multiple=!1,_e.accept="image/png, image/gif, image/jpeg",_e.onchange=async()=>{var ht;if(!_e.files||_e.files.length===0)return;const et=_e.files[0],nt=await ce(et);nt&&((ht=D.current)==null||ht.insertText(nt)),document.body.removeChild(_e)},_e.click()},[]),Ct=!!a.editMemoId,tn=P.useMemo(()=>({className:"memo-editor",inputerType:i.EditorType||"obsidian",modal:r,initialContent:rz(),placeholder:E("What do you think now..."),showConfirmBtn:!0,showCancelBtn:Ct,showTools:!0,onConfirmBtnClick:X,onCancelBtnClick:ae,onContentChange:De}),[Ct,i.EditorType]);return v.jsxs(v.Fragment,{children:[!a.globalEditorShown&&t==="block"&&v.jsx("div",{ref:_e=>{S.current=_e,_e&&x.setIcon&&x.setIcon(_e,"plus-circle")},className:`memo-show-editor-button ${y?"hidden":""}`,onClick:()=>{var _e;(_e=S.current.firstElementChild)==null||_e.toggleClass("rotate-hidden",!0),setTimeout(()=>{w(!0),S.current.firstElementChild.toggleClass("rotate-hidden",!1)},500),setTimeout(()=>{var et;(et=D.current)==null||et.focus()},600)}}),v.jsxs("div",{className:`memo-editor-wrapper ${e||""} ${Ct?"edit-ing":""} ${a.globalEditorShown?"fullscreen-editor":""} ${y?"":"hidden"}`,onKeyDownCapture:_e=>ie(_e,!0),children:[v.jsx("span",{className:`tip-text ${Ct?"":"hidden"}`,children:"Modifying..."}),v.jsx(zY,{ref:D,...tn,tools:v.jsxs(v.Fragment,{children:[v.jsx("span",{ref:_e=>{_e&&x.setIcon(_e,"hash")},className:"btn action-btn add-tag",onClick:()=>{i&&i.DefaultEditorLocation==="Top"&&!a.globalEditorShown&&Xe()},onPointerDown:()=>{(i&&i.DefaultEditorLocation==="Bottom"||a.globalEditorShown)&&Xe()}}),v.jsx("span",{ref:_e=>{_e&&x.setIcon(_e,"paperclip")},className:"btn action-btn file-upload",onClick:()=>{i&&i.DefaultEditorLocation==="Top"&&!a.globalEditorShown&&st()},onPointerDown:()=>{(i&&i.DefaultEditorLocation==="Bottom"||a.globalEditorShown)&&st()}}),v.jsx("span",{ref:_e=>{_e&&x.setIcon(_e,f?"layout-list":"check-square")},className:ar("btn action-btn list-or-task",f?"list":"task"),onClick:()=>{i&&i.DefaultEditorLocation==="Top"&&!a.globalEditorShown&&Re()},onPointerDown:()=>{(i&&i.DefaultEditorLocation==="Bottom"||a.globalEditorShown)&&Re()}}),v.jsx("div",{ref:_e=>{_e&&(x.setIcon&&x.setIcon(_e,a.globalEditorShown?"shrink":"expand"),x.setTooltip&&x.setTooltip(_e,a.globalEditorShown?E("Exit fullscreen mode"):E("Enter fullscreen mode")))},className:"action-btn show-editor pro",onPointerDown:async()=>{await Fe()&&(w(!0),dt.setGlobalEditorShown(!a.globalEditorShown))}}),v.jsx("div",{className:"action-btn split-line pro"}),v.jsx("div",{className:"action-btn location-wrapper pro",onClick:async _e=>{i&&i.DefaultEditorLocation==="Top"&&!a.globalEditorShown&&await Be(_e)},onPointerDown:async _e=>{(i&&i.DefaultEditorLocation==="Bottom"||a.globalEditorShown)&&await Be(_e)},children:v.jsx("div",{ref:Z,className:"action-btn file-location-btn"})})]})}),v.jsx("div",{ref:L,className:"date-picker",children:R&&v.jsx("div",{tabIndex:-1,style:V.styles.popper,...V.attributes.popper,ref:_,role:"dialog",children:v.jsx(Ib,{className:`editor-date-picker ${R?"":"hidden"}`,datestamp:Y,handleDateStampChange:je})})})]})]})};function rz(){return la.get(["thinoEditorContentCache"]).thinoEditorContentCache??""}function C0(e){la.set({thinoEditorContentCache:e})}const az=e=>{const t=[];return e.map(n=>{t.length==0?t.push({date:x.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),have:[n]}):t.some(a=>{if(a.date==x.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"))return a.have.push(n),!0})||t.push({date:x.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),have:[n]})}),t},oz=e=>be.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)})),iz=e=>{const t=ft.getState().settings,n=uR(),r=t!=null&&t.ShowDate?" ":"",a="YYYY/MM/DD HH:mm:ss",o=/comment:(.*)$/g,i=/^\d{14}/g,l=(g,y,w)=>{const S=x.moment(g.createdAt,a).format("HH:mm");return w?w.replace(/{TIME}/g,S).replace(/{CONTENT}/g,y):`${S} ${y}`},c=g=>{const y=g.match(/TASK-(.*)?/g);return y?y[1]:""},f=g=>g==="TASK-TODO"?"- [ ] ":g==="TASK-DONE"?"- [x] ":g.match(/TASK-(.*)?/g)?`- [${c(g)}] `:"- ",h=g=>g.reduce((y,w)=>{const S=w.sourceType!=="MULTI"?`${w.content}`:`[[${w.path}]]`,D=t!=null&&t.ShowTime?l(w,S,t==null?void 0:t.DefaultMemoComposition):S,I=`${f(w.thinoType)}${D}`;let M="";return t.CommentOnMemos&&w.hasId!==void 0&&w.hasId!==""&&(M=oz(w).reduce((R,k)=>{const B=f(k.thinoType),L=k.content.replace(o,"").replace(i,""),_=t!=null&&t.ShowDate?`${B}[[${x.moment(k.createdAt).format(n)}]] ${x.moment(k.createdAt).format("HH:mm")} ${L}`:`${B}${L}`;return R+r+" "+_+` `},"")),y+r+I.replace(/ \^\S{6}/g,"")+` `+M},"");return e.reduce((g,y)=>{const w=t!=null&&t.ShowDate?`- [[${x.moment(y.date,"YYYY-MM-DD").format(n)}]] `:"",S=h(y.have),D=t!=null&&t.ShowDate&&(t!=null&&t.AddBlankLineWhenDate)&&!(t!=null&&t.CommentOnMemos)?` `:"";return g+w+S+D},"").replace(/
/g,` `)},sz=[{label:E("Today"),value:x.moment().format("YYYY-MM-DD")},{label:E("Yesterday"),value:x.moment().subtract(1,"days").format("YYYY-MM-DD")},{label:E("Last 7 days"),value:x.moment().subtract(7,"days").format("YYYY-MM-DD")},{label:E("Last 30 days"),value:x.moment().subtract(30,"days").format("YYYY-MM-DD")},{label:E("Last 90 days"),value:x.moment().subtract(90,"days").format("YYYY-MM-DD")},{label:E("Last 180 days"),value:x.moment().subtract(180,"days").format("YYYY-MM-DD")},{label:E("Last 365 days"),value:x.moment().subtract(365,"days").format("YYYY-MM-DD")}],W6=e=>{const{handleValueChange:t,setShownStatus:n}=e;return v.jsxs(v.Fragment,{children:[e.type==="icon"&&v.jsx("div",{className:"quick-date-btn-group",children:sz.map((r,a)=>v.jsx("div",{className:"btn action-btn quick-date-btn",onClick:()=>{t(r.value),n&&n(!1)},children:r.label},a))}),v.jsx(Ib,{className:"calendar-date-picker",datestamp:(e==null?void 0:e.defaultValue)||x.moment().startOf("day").valueOf(),handleDateStampChange:(r,a)=>{t(e.type==="icon"?x.moment(r).format("YYYY-MM-DD"):r.toString()),n&&n(!1)}})]})},Fw=e=>{const{handleValueChange:t}=e,[n,r]=ne.useState(!1),a=ne.useRef(null),o=ne.useRef(null),i=Cb(o.current,a.current,{placement:"bottom-start"});return Rv(a,()=>{r(!1)}),v.jsxs(v.Fragment,{children:[v.jsx("span",{ref:c=>{o.current=c,c&&e.type==="icon"&&x.setIcon(c,"calendar")},className:`btn calendar-btn ${e.type==="icon"?"icon-btn":"text-btn"}`,onClick:()=>{!x.Platform.isMobile&&r(!n),!x.Platform.isMobile&&(i!=null&&i.update)&&(i==null||i.update()),x.Platform.isMobile&&new $6(ft.getState().app,e.type,t).open()},children:e.type==="text"&&e.defaultValue?e.defaultText?e.defaultText:x.moment(e.defaultValue,"x").subtract(e.startOrEnd==="end"?1:0,"days").format("YYYY/MM/DD"):""}),v.jsx("div",{className:`menu-btns-popup ${n?"":"hidden"}`,ref:a,style:i.styles.popper,children:v.jsx(W6,{type:e.defaultText?"icon":e.type,handleValueChange:t,setShownStatus:r})})]})};class $6 extends x.Modal{constructor(n,r,a){super(n);Se(this,"root");Se(this,"type");Se(this,"handleValueChange");this.type=r,this.handleValueChange=a}onOpen(){const{contentEl:n}=this;this.root=Pv(n),this.root.render(v.jsx(W6,{type:this.type,handleValueChange:this.handleValueChange.bind(this),setShownStatus:r=>{!r&&this.close()}}))}onClose(){var n;(n=this.root)==null||n.unmount()}}const lz=(e,t)=>(e%t+t)%t;class uz{constructor(t,n,r){Se(this,"owner");Se(this,"values");Se(this,"suggestions");Se(this,"selectedItem");Se(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",a=>{if(!a.isComposing)return this.setSelectedItem(this.selectedItem-1,!0),!1}),r.register([],"ArrowDown",a=>{if(!a.isComposing)return this.setSelectedItem(this.selectedItem+1,!0),!1}),r.register([],"Enter",a=>{if(!a.isComposing)return this.useSelectedItem(a),!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 a=this.containerEl.createDiv("suggestion-item");this.owner.renderSuggestion(r,a),n.push(a)}),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=lz(t,this.suggestions.length),a=this.suggestions[this.selectedItem],o=this.suggestions[r];a==null||a.removeClass("is-selected"),o==null||o.addClass("is-selected"),this.selectedItem=r,n&&o.scrollIntoView(!1)}}class Z6{constructor(t,n){Se(this,"inputEl");Se(this,"popper");Se(this,"scope");Se(this,"suggestEl");Se(this,"suggest");Se(this,"cb");this.inputEl=t,this.scope=new x.Scope,this.cb=n,this.suggestEl=createDiv("suggestion-container");const r=this.suggestEl.createDiv("suggestion");this.suggest=new uz(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",a=>{a.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=V6(n,this.suggestEl,{placement:"bottom-start",modifiers:[{name:"sameWidth",enabled:!0,fn:({state:r,instance:a})=>{const o=`${r.rects.reference.width}px`;r.styles.popper.width!==o&&(r.styles.popper.width=o,a.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 cz=e=>{const t=e.metadataCache.getTags();return[...Object.keys(t)].map(n=>n.split("#").pop())};let ev=class extends Z6{fuzzySearchItemsOptimized(t,n){const r=x.prepareFuzzySearch(t);return n.map(a=>{const o=r(a);return o?{item:a,match:o,score:o.score}:null}).sort((a,o)=>(o==null?void 0:o.score)-(a==null?void 0:a.score)).filter(Boolean)}getSuggestions(t){const{settings:n,app:r}=ft.getState(),a=t.toLocaleLowerCase(),o=n.UseVaultTags?cz(r):be.getState().tags;return this.fuzzySearchItemsOptimized(a,o).map(i=>i.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 dz=e=>{const t=new Set;return e.forEach(n=>{const r=new RegExp($r).exec(n.content),a=new RegExp(ua).exec(n.content);if(r)for(let o=1;o{const[t,n]=ne.useState([]),r=ne.useRef(null),a=ne.useRef(null);P.useEffect(()=>{if(a.current){if(r.current){r.current.updateCb(o);return}r.current=new ev(a.current,o)}},[a.current,t]);const o=l=>{if(!l)return;const c=new Set(t);c.add(l),n(Array.from(c)),r.current.clearInput()},i=()=>{e(t)};return v.jsxs("div",{className:"thino-tag-operation",children:[v.jsx("div",{className:"tag-operation-title",children:E("Tag Bulk Select")}),v.jsxs("div",{className:"tag-operation-content",children:[v.jsxs("div",{className:"tag-operation-content-title selected-tags",children:[v.jsx("div",{className:"name",children:E("Selected Tags")}),v.jsx("div",{className:"desc",children:E("Click to remove selected tag")})]}),v.jsx("div",{className:"tag-operation-content-tags selected-tags",children:t.map(l=>v.jsx("div",{className:"tag-operation-content-tag",onClick:()=>{n(t.filter(c=>c!==l))},children:l},l))}),v.jsx("div",{className:"tag-operation-content-inputer",children:v.jsx("input",{placeholder:E("Input to select exist tag"),ref:a,onKeyDown:l=>{l.key==="Enter"&&o(a.current.value)}})}),v.jsxs("div",{className:"tag-operation-content-btn-group",children:[v.jsx("button",{className:"cancel-btn",onClick:()=>{e([])},children:E("Cancel")}),v.jsx("button",{className:"save-btn",onClick:i,children:E("Save")})]})]})]})},pz=({app:e,thinos:t,closeDialog:n})=>{const[r,a]=ne.useState([]),[o,i]=ne.useState([]),[l,c]=ne.useState([]),f=ne.useRef(null),h=ne.useRef(null),g=ne.useRef(null),y=ne.useRef("End"),w=ne.useRef(!1),S=ne.useRef(null);P.useEffect(()=>{t&&t.length&&a(dz(t))},[t]),P.useEffect(()=>{!g.current||!h.current||(new x.Setting(h.current).setName(E("Add tag position")).addDropdown(N=>{N.addOption("End",E("End")),N.addOption("Beginning",E("Beginning")),N.setValue("End").onChange(async R=>{y.current=R})}),new x.Setting(g.current).setName(E("Add tag with new line")).addToggle(N=>{N.setValue(!1).onChange(async R=>{w.current=R})}))},[]);const D=N=>{if(!N)return;const R=new Set(o);R.add(N),i(Array.from(R)),f.current.clearInput()};P.useEffect(()=>{if(S.current){if(f.current){f.current.updateCb(D);return}f.current=new ev(S.current,D)}},[S.current,o]);const I=()=>{n(),M({remove:l,add:o,targetThinos:t})},M=async({remove:N,add:R,targetThinos:k})=>{const B=w.current||!1,L=[];for(const _ of k){let V=_.content;for(const Y of N)V=V.replace(new RegExp(`#${Y}`,"g"),"");if(V=V.trim(),R.length>0&&(V=y.current==="Beginning"?`${R.map(Y=>`#${Y}`).join(" ")} ${B?` `:""}${V}`:`${V} ${B?` `:""}${R.map(Y=>`#${Y}`).join(" ")}`),_&&_.content!==V){const Y=await be.updateMemo(_.id,V==null?void 0:V.trim());L.push(Y)}}L.length>0&&be.editMemoBulk(L),L.length>0&&at.clearQuery()};return v.jsxs("div",{className:"thino-tag-operation",children:[v.jsx("div",{className:"tag-operation-title",children:E("Tag Bulk Edit")}),v.jsxs("div",{className:"tag-operation-content",children:[r.length>0&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"tag-operation-content-title exist-tags",children:[v.jsx("div",{className:"name",children:E("Exist Tags")}),v.jsx("div",{className:"desc",children:E("Click to remove exist tag")})]}),v.jsx("div",{className:"tag-operation-content-tags exist-tags",children:r.map(N=>v.jsx("div",{className:ar("tag-operation-content-tag",l.includes(N)&&"tag-operation-content-tag-removed"),onClick:()=>{l.includes(N)||c([...l,N]),l.includes(N)&&c(l.filter(R=>R!==N)),o.includes(N)&&i(o.filter(R=>R!==N))},children:N},N))})]}),v.jsxs("div",{className:"tag-operation-content-title selected-tags",children:[v.jsx("div",{className:"name",children:E("Selected Tags")}),v.jsx("div",{className:"desc",children:E("Click to remove selected tag")})]}),v.jsx("div",{className:"tag-operation-content-tags selected-tags",children:o.map(N=>v.jsx("div",{className:"tag-operation-content-tag",onClick:()=>{i(o.filter(R=>R!==N))},children:N},N))}),v.jsx("div",{className:"tag-operation-content-inputer",children:v.jsx("input",{placeholder:E("Input to select exist tag"),ref:S,onKeyDown:N=>{N.key==="Enter"&&D(S.current.value)}})}),v.jsxs("div",{className:"tag-operation-settings",children:[v.jsx("div",{ref:h}),v.jsx("div",{ref:g})]}),v.jsxs("div",{className:"tag-operation-content-btn-group",children:[v.jsx("button",{className:"cancel-btn",onClick:n,children:E("Cancel")}),v.jsx("button",{className:"save-btn",onClick:I,children:E("Save")})]})]})]})},ET=new Map,wf=async(e,t=!0)=>{const{vault:n,metadataCache:r}=ft.getState().app;if(t&&ET.has(e))return Promise.resolve(ET.get(e));if(e.contains("data:image"))return e;let a;const o=await n.adapter.exists(x.normalizePath(e));let i="";try{if(!o&&!/(http|https)/g.test(e)&&!e.includes("data:image")){let l;if(e.startsWith("app://")){const c=x.normalizePath(decodeURIComponent(e).replace(x.Platform.resourcePathPrefix,"").replace(/\?(.*)$/,"").replace(x.normalizePath(app==null?void 0:app.vault.adapter.basePath),""));i=x.normalizePath(decodeURIComponent(c))}else{if(l=r.getFirstLinkpathDest(e,""),!l){new x.Notice(E("File not exist"));return}i=l.path}}else i=e}catch(l){console.error(l)}if(i){if(/(http|https)/g.test(i))if(i.startsWith("http://localhost")){let l=i;l=l.replace("http://localhost/_capacitor_file_",""),l=decodeURIComponent(l).replace(/\?(.*)$/,"").replace(app==null?void 0:app.vault.adapter.basePath,""),l=x.normalizePath(decodeURIComponent(l));const c=await n.adapter.readBinary(l),f=new Uint8Array(c);a=new Blob([f],{type:"image/png"})}else try{const l=await x.requestUrl(e),c=new Uint8Array(l.arrayBuffer);a=new Blob([c],{type:"image/png"})}catch{}else if(i){const l=await n.adapter.readBinary(i),c=new Uint8Array(l);a=new Blob([c],{type:"image/png"})}return a?await mz(a,e):""}},mz=(e,t)=>new Promise(n=>{const r=new FileReader;r.onloadend=()=>{const a=r.result;ET.set(t,a),n(a)},r.readAsDataURL(e)}),jg=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=x.normalizePath(decodeURIComponent(t))),await wf(t)):void 0},gz=async e=>{var n;return e.getAttribute("src")?(n=e==null?void 0:e.src)!=null&&n.startsWith("http://localhost")?await wf(e.getAttribute("path")||x.normalizePath(e==null?void 0:e.parentElement.getAttribute("src"))):await wf(e.getAttribute("src")):void 0},Zt=Cz(),Ow=xz(),q6=Mz(),G6=kz(),Xd={copyDefaultStyles:!0,imagePlaceholder:void 0,cacheBust:!1,useCredentials:!1,httpTimeout:3e4,styleCaching:"strict",corsImg:void 0},wn={toSvg:J6,toPng:wz,toJpeg:bz,toBlob:Sz,toPixelData:yz,toCanvas:Dz,impl:{fontFaces:q6,images:G6,util:Zt,inliner:Ow,urlCache:[],options:{}}},aI=(typeof Node<"u"?Node.ELEMENT_NODE:void 0)||1,iw=(typeof global<"u"?global.getComputedStyle:void 0)||(typeof window<"u"?window.getComputedStyle:void 0)||globalThis.getComputedStyle,vz=(typeof global<"u"?global.atob:void 0)||(typeof window<"u"?window.atob:void 0)||globalThis.atob;function J6(e,t){wn.impl.util.getWindow(e),t=t||{},Tz(t);let n=[];return Promise.resolve(e).then(r).then(function(c){return K6(c,t,null)}).then(Iz).then(Ez).then(i).then(l).then(a).then(o);function r(c){if(c.nodeType===aI)return c;const f=c,h=c.parentNode,g=document.createElement("span");return h.replaceChild(g,f),g.append(c),n.push({parent:h,child:f,wrapper:g}),g}function a(c){for(;n.length>0;){const f=n.pop();f.parent.replaceChild(f.child,f.wrapper)}return c}function o(c){return wn.impl.urlCache=[],jz(),c}function i(c){t.bgcolor&&(c.style.backgroundColor=t.bgcolor),t.width&&(c.style.width=`${t.width}px`),t.height&&(c.style.height=`${t.height}px`),t.style&&Object.keys(t.style).forEach(function(h){c.style[h]=t.style[h]});let f=null;return typeof t.onclone=="function"&&(f=t.onclone(c)),Promise.resolve(f).then(function(){return c})}function l(c){let f=t.width||Zt.width(c),h=t.height||Zt.height(c);return Promise.resolve(c).then(function(g){return g.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(g)}).then(Zt.escapeXhtml).then(function(g){const y=(Zt.isDimensionMissing(f)?' width="100%"':` width="${f}"`)+(Zt.isDimensionMissing(h)?' height="100%"':` height="${h}"`);return`${g}`}).then(function(g){return`data:image/svg+xml;charset=utf-8,${g}`})}}function yz(e,t){return Hv(e,t).then(function(n){return n.getContext("2d").getImageData(0,0,Zt.width(e),Zt.height(e)).data})}function wz(e,t){return Hv(e,t).then(function(n){return n.toDataURL()})}function bz(e,t){return Hv(e,t).then(function(n){return n.toDataURL("image/jpeg",(t?t.quality:void 0)||1)})}function Sz(e,t){return Hv(e,t).then(Zt.canvasToBlob)}function Dz(e,t){return Hv(e,t)}function Tz(e){typeof e.copyDefaultStyles>"u"?wn.impl.options.copyDefaultStyles=Xd.copyDefaultStyles:wn.impl.options.copyDefaultStyles=e.copyDefaultStyles,typeof e.imagePlaceholder>"u"?wn.impl.options.imagePlaceholder=Xd.imagePlaceholder:wn.impl.options.imagePlaceholder=e.imagePlaceholder,typeof e.cacheBust>"u"?wn.impl.options.cacheBust=Xd.cacheBust:wn.impl.options.cacheBust=e.cacheBust,typeof e.corsImg>"u"?wn.impl.options.corsImg=Xd.corsImg:wn.impl.options.corsImg=e.corsImg,typeof e.useCredentials>"u"?wn.impl.options.useCredentials=Xd.useCredentials:wn.impl.options.useCredentials=e.useCredentials,typeof e.httpTimeout>"u"?wn.impl.options.httpTimeout=Xd.httpTimeout:wn.impl.options.httpTimeout=e.httpTimeout,typeof e.styleCaching>"u"?wn.impl.options.styleCaching=Xd.styleCaching:wn.impl.options.styleCaching=e.styleCaching,wn.impl.options.requestUrl=e.requestUrl,wn.impl.options.type=e.type||"image/png"}function Hv(e,t){return t=t||{},J6(e,t).then(Zt.makeImage).then(function(r){const a=typeof t.scale!="number"?1:t.scale,o=n(e,a),i=o.getContext("2d");return i.msImageSmoothingEnabled=!1,i.imageSmoothingEnabled=!1,r&&(i.scale(a,a),i.drawImage(r,0,0)),o});function n(r,a){let o=t.width||Zt.width(r),i=t.height||Zt.height(r);Zt.isDimensionMissing(o)&&(o=Zt.isDimensionMissing(i)?300:i*2),Zt.isDimensionMissing(i)&&(i=o/2);const l=document.createElement("canvas");if(l.width=o*a,l.height=i*a,t.bgcolor){const c=l.getContext("2d");c.fillStyle=t.bgcolor,c.fillRect(0,0,l.width,l.height)}return l}}let Ci=null;function K6(e,t,n,r){const a=t.filter;if(e===Ci||Zt.isHTMLScriptElement(e)||Zt.isHTMLStyleElement(e)||Zt.isHTMLLinkElement(e)||n!==null&&a&&!a(e))return Promise.resolve();return Promise.resolve(e).then(o).then(function(f){return l(f,i(e))}).then(function(f){return c(f,e)});function o(f){return Zt.isHTMLCanvasElement(f)?Zt.makeImage(f.toDataURL()):f.cloneNode(!1)}function i(f){return Zt.isElementHostForOpenShadowRoot(f)?f.shadowRoot:f}function l(f,h){const g=S(h);let y=Promise.resolve();if(g.length!==0){const D=iw(w(h));Zt.asArray(g).forEach(function(I){y=y.then(function(){return K6(I,t,D).then(function(M){M&&f.appendChild(M)})})})}return y.then(function(){return f});function w(D){return Zt.isShadowRoot(D)?D.host:D}function S(D){return Zt.isShadowSlotElement(D)?D.assignedNodes():D.childNodes}}function c(f,h){if(!Zt.isElement(f)||Zt.isShadowSlotElement(h))return Promise.resolve(f);return Promise.resolve().then(g).then(y).then(w).then(S).then(function(){return f});function g(){I(h,f);function D(M,N){N.font=M.font,N.fontFamily=M.fontFamily,N.fontFeatureSettings=M.fontFeatureSettings,N.fontKerning=M.fontKerning,N.fontSize=M.fontSize,N.fontStretch=M.fontStretch,N.fontStyle=M.fontStyle,N.fontVariant=M.fontVariant,N.fontVariantCaps=M.fontVariantCaps,N.fontVariantEastAsian=M.fontVariantEastAsian,N.fontVariantLigatures=M.fontVariantLigatures,N.fontVariantNumeric=M.fontVariantNumeric,N.fontVariationSettings=M.fontVariationSettings,N.fontWeight=M.fontWeight}function I(M,N){const R=iw(M);R.cssText?(N.style.cssText=R.cssText,D(R,N.style)):(Az(t,M,R,n,N),n===null&&(["inset-block","inset-block-start","inset-block-end"].forEach(k=>N.style.removeProperty(k)),["left","right","top","bottom"].forEach(k=>{N.style.getPropertyValue(k)&&N.style.setProperty(k,"0px")})))}}function y(){const D=Zt.uid();[":before",":after"].forEach(function(M){I(M)});function I(M){const N=iw(h,M),R=N.getPropertyValue("content");if(R===""||R==="none")return;const k=f.getAttribute("class")||"";f.setAttribute("class",`${k} ${D}`);const B=document.createElement("style");B.appendChild(L()),f.appendChild(B);function L(){const _=`.${D}:${M}`,V=N.cssText?Y():Z();return document.createTextNode(`${_}{${V}}`);function Y(){return`${N.cssText} content: ${R};`}function Z(){return`${Zt.asArray(N).map(K).join("; ")};`;function K(se){const le=N.getPropertyValue(se),fe=N.getPropertyPriority(se)?" !important":"";return`${se}: ${le}${fe}`}}}}}function w(){Zt.isHTMLTextAreaElement(h)&&(f.innerHTML=h.value),Zt.isHTMLInputElement(h)&&f.setAttribute("value",h.value)}function S(){Zt.isSVGElement(f)&&(f.setAttribute("xmlns","http://www.w3.org/2000/svg"),Zt.isSVGRectElement(f)&&["width","height"].forEach(function(D){const I=f.getAttribute(D);I&&f.style.setProperty(D,I)}))}}}function Iz(e){return q6.resolveAll().then(function(t){if(t!==""){const n=document.createElement("style");e.appendChild(n),n.appendChild(document.createTextNode(t))}return e})}function Ez(e){return G6.inlineAll(e).then(function(){return e})}function Cz(){let e=0;return{escape:Y,isDataUrl:M,canvasToBlob:k,resolveUrl:B,getAndEncode:V,uid:L,delay:Z,asArray:Q,escapeXhtml:K,makeImage:_,width:se,height:le,getWindow:t,isElement:o,isElementHostForOpenShadowRoot:n,isShadowRoot:r,isInShadowRoot:a,isHTMLElement:l,isHTMLCanvasElement:i,isHTMLInputElement:f,isHTMLImageElement:c,isHTMLLinkElement:h,isHTMLScriptElement:g,isHTMLStyleElement:y,isHTMLTextAreaElement:w,isShadowSlotElement:S,isSVGElement:D,isSVGRectElement:I,isDimensionMissing:N};function t($){const he=$?$.ownerDocument:void 0;return(he?he.defaultView:void 0)||global||window}function n($){return o($)&&$.shadowRoot!==null}function r($){return $ instanceof t($).ShadowRoot}function a($){return $!==null&&Object.prototype.hasOwnProperty.call($,"getRootNode")&&r($.getRootNode())}function o($){return $ instanceof t($).Element}function i($){return $ instanceof t($).HTMLCanvasElement}function l($){return $ instanceof t($).HTMLElement}function c($){return $ instanceof t($).HTMLImageElement}function f($){return $ instanceof t($).HTMLInputElement}function h($){return $ instanceof t($).HTMLLinkElement}function g($){return $ instanceof t($).HTMLScriptElement}function y($){return $ instanceof t($).HTMLStyleElement}function w($){return $ instanceof t($).HTMLTextAreaElement}function S($){return a($)&&$ instanceof t($).HTMLSlotElement}function D($){return $ instanceof t($).SVGElement}function I($){return $ instanceof t($).SVGRectElement}function M($){return $.search(/^(data:)/)!==-1}function N($){return isNaN($)||$<=0}function R($){return new Promise(function(he){const ie=vz($.toDataURL().split(",")[1]),ce=ie.length,X=new Uint8Array(ce);for(let ae=0;aenew Promise(ce=>{const X=new FileReader;X.onload=function(ae){ce(ae.target.result)},X.readAsDataURL(new Blob([ie.arrayBuffer],{type:ie.headers["content-type"]}))})).catch(ie=>(console.error("cannot fetch resource: "+$+", error: "+ie),"")):he.promise=new Promise(function(ie){const ce=wn.impl.options.httpTimeout,X=new XMLHttpRequest;if(X.onreadystatechange=De,X.ontimeout=je,X.responseType="blob",X.timeout=ce,wn.impl.options.useCredentials&&(X.withCredentials=!0),wn.impl.options.corsImg&&$.indexOf("http")===0&&$.indexOf(window.location.origin)===-1){const Be=(wn.impl.options.corsImg.method||"GET").toUpperCase()==="POST"?"POST":"GET";X.open(Be,(wn.impl.options.corsImg.url||"").replace("#{cors}",$),!0);let Xe=!1;const Ze=wn.impl.options.corsImg.headers||{};Object.keys(Ze).forEach(function(Ct){Ze[Ct].indexOf("application/json")!==-1&&(Xe=!0),X.setRequestHeader(Ct,Ze[Ct])});const st=Re(wn.impl.options.corsImg.data||"");Object.keys(st).forEach(function(Ct){typeof st[Ct]=="string"&&(st[Ct]=st[Ct].replace("#{cors}",$))}),X.send(Xe?JSON.stringify(st):st)}else X.open("GET",$,!0),X.send();let ae;if(wn.impl.options.imagePlaceholder){const Be=wn.impl.options.imagePlaceholder.split(/,/);Be&&Be[1]&&(ae=Be[1])}function De(){if(X.readyState!==4)return;if(X.status>=300){ae?ie(ae):Fe(`cannot fetch resource: ${$}, status: ${X.status}`);return}const Be=new FileReader;Be.onloadend=function(){ie(Be.result)},Be.readAsDataURL(X.response)}function je(){ae?ie(ae):Fe(`timeout of ${ce}ms occured while fetching resource: ${$}`)}function Re(Be){try{return JSON.parse(JSON.stringify(Be))}catch{Fe("corsImg.data is missing or invalid");return}}function Fe(Be){console.error(Be),ie("")}})),he.promise}function Y($){return $.replace(/([.*+?^${}()|[]\/\\])/g,"\\$1")}function Z($){return function(he){return new Promise(function(ie){setTimeout(function(){ie(he)},$)})}}function Q($){const he=[],ie=$.length;for(let ce=0;ce=0;r?(e.setProperty(t,n,r),a&&e.setProperty(`-webkit-${t}`,n,r)):(e.setProperty(t,n),a&&e.setProperty(`-webkit-${t}`,n))}function Az(e,t,n,r,a){const o=wn.impl.options.copyDefaultStyles?Oz(e,t):{},i=a.style;Zt.asArray(n).forEach(function(l){const c=n.getPropertyValue(l),f=o[l],h=r?r.getPropertyValue(l):void 0;if(c!==f||r&&c!==h){const g=n.getPropertyPriority(l);Nz(i,l,c,g)}})}let x0=null,sw={};const Fz=["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 Oz(e,t){const n=l(t),r=c(n);if(sw[r])return sw[r];const a=Pz(),o=f(a.document,n),i=h(a,o);return g(o),sw[r]=i,i;function l(y){const w=[];do{if(y.nodeType===aI){const S=y.tagName;if(w.push(S),Fz.includes(S))break}y=y.parentNode}while(y);return w}function c(y){return e.styleCaching==="relaxed"?y.filter((w,S,D)=>S===0||S===D.length-1).join(">"):y.join(">")}function f(y,w){let S=y.body;do{const D=w.pop(),I=y.createElement(D);S.appendChild(I),S=I}while(w.length>0);return S.textContent="​",S}function h(y,w){const S={},D=y.getComputedStyle(w);return Zt.asArray(D).forEach(function(I){S[I]=I==="width"||I==="height"?"auto":D.getPropertyValue(I)}),S}function g(y){do{const w=y.parentElement;w!==null&&w.removeChild(y),y=w}while(y&&y.tagName!=="BODY")}}function Pz(){if(Ci)return Ci.contentWindow;const e=document.characterSet||"UTF-8",t=document.doctype,n=t?`":"";return Ci=document.createElement("iframe"),Ci.id="domtoimage-sandbox-"+Zt.uid(),Ci.className="domtoimage-thino",Ci.style.visibility="hidden",Ci.style.position="fixed",document.body.appendChild(Ci),a(Ci,n,e,"domtoimage-sandbox");function r(o){if(o){const i=document.createElement("div");return i.innerText=o,i.innerHTML}else return""}function a(o,i,l,c){try{return o.contentWindow.document.write(`${i}${c}`),o.contentWindow}catch{}const f=document.createElement("meta");f.setAttribute("charset",l);try{const h=document.implementation.createHTMLDocument(c);h.head.appendChild(f);const g=i+h.documentElement.outerHTML;return o.setAttribute("srcdoc",g),o.contentWindow}catch{}return o.contentDocument.head.appendChild(f),o.contentDocument.title=c,o.contentWindow}}function jz(){Ci&&(document.body.removeChild(Ci),Ci=null),x0&&clearTimeout(x0),x0=setTimeout(()=>{x0=null,sw={}},20*1e3)}async function Lz(e,t,n){return await wn.toCanvas(e,{width:e.clientWidth,height:e.clientHeight,quality:1,scale:t?2:1,requestUrl:x.requestUrl,type:n})}const xb=async(e,t)=>(await Lz(e,!0,"image/jpeg")).toDataURL(),Px=async e=>{e.startsWith("http")&&(e=await wf(e));const t=e.split("base64,")[1],n=pb(t,"image/png");await Q6(n),new x.Notice(E("Send to clipboard successfully"))},Rz=async(e,t)=>{const n=await e.vault.adapter.exists(t);let r="";if(n)r=t;else{const l=e.metadataCache.getFirstLinkpathDest(t,"");if(!l){new x.Notice(E("File not exist"));return}r=l.path}const a=await e.vault.adapter.readBinary(r),o=new Uint8Array(a),i=new Blob([o],{type:"image/png"});await Q6(i)},Q6=async e=>{const t=new ClipboardItem({"image/png":e});await window.navigator.clipboard.write([t])},jx=1.1,Lx=300,Rx=20,_z=({destroy:e,imgUrl:t,filepath:n,otherIMGEls:r,currentIndex:a})=>{const o=P.useRef(null),[i,l]=P.useState(-1),c=Le.getState().dailyNotesState.app,[f,h]=P.useState(a),[g,y]=P.useState(t),w={close:P.useRef(null),previous:P.useRef(null),next:P.useRef(null),decrease:P.useRef(null),increase:P.useRef(null),zoom:P.useRef(null),copy:P.useRef(null)};P.useEffect(()=>{!n&&!t||(x.setIcon(w.close.current,"x"),w.previous.current&&x.setIcon(w.previous.current,"arrow-left"),w.next.current&&x.setIcon(w.next.current,"arrow-right"),x.setIcon(w.decrease.current,"zoom-out"),x.setIcon(w.increase.current,"zoom-in"),x.setIcon(w.zoom.current,"circle"),x.setIcon(w.copy.current,"clipboard"))},[w]),P.useEffect(()=>{ut.getImageSize(g).then(({width:L})=>{l(L!==0?40:0)})},[g]);const S=()=>{let L=f-1;L<0&&(L=r.length-1),h(L),y(r[L].src)},D=()=>{let L=f+1;L>=r.length&&(L=0),h(L),y(r[L].src)},I=()=>{e()},M=()=>{i>30&&l(i-10)},N=()=>{l(i+10)},R=L=>{L.target!==o.current&&L.target===o.current.parentElement&&I()},k=L=>{if(L.ctrlKey){L.preventDefault();const _=o.current,V=L.nativeEvent.offsetX,Y=L.nativeEvent.offsetY,Z=V/_.clientWidth,Q=Y/_.clientHeight;let K;L.deltaY>0?K=i/jx:K=i*jx,K>Lx?K=Lx:K{if(g&&!n)await Px(t);else if(n){const _=r[f].parentElement.getAttribute("src");if(!_){await Px(g);return}await Rz(c,_)}};return v.jsxs(v.Fragment,{children:[v.jsx("button",{ref:w.close,className:"btn close-btn",onClick:I}),v.jsxs("div",{className:"img-container internal-embed image-embed is-loaded",onClick:R,onWheel:k,children:[v.jsx("img",{className:i<=0?"hidden":"",ref:o,height:i+"%",src:g}),v.jsx("span",{className:"loading-text "+(i===-1?"":"hidden"),children:E("Image is loading...")}),v.jsx("span",{className:"loading-text "+(i===0?"":"hidden"),children:E("😟 Cannot load image, image link maybe broken")})]}),v.jsxs("div",{className:"action-btns-container",children:[r&&(r==null?void 0:r.length)>1&&v.jsxs(v.Fragment,{children:[v.jsx("button",{ref:w.previous,className:"btn",onClick:S}),v.jsx("button",{ref:w.next,className:"btn",onClick:D})]}),v.jsx("button",{ref:w.decrease,className:"btn",onClick:M}),v.jsx("button",{ref:w.increase,className:"btn",onClick:N}),v.jsx("button",{ref:w.zoom,className:"btn",onClick:()=>l(80)}),v.jsx("button",{ref:w.copy,className:"btn",onClick:B})]})]})};function Mb({imgUrl:e,filepath:t,otherIMGEls:n,currentIndex:r}){bb({className:"preview-image-dialog"},_z,{...{imgUrl:e,otherIMGEls:n,currentIndex:r},filepath:t})}var Bz=class extends Error{constructor(e){super(`react-collapsed: ${e}`)}},Pw=(...e)=>(e[0],`${e[1]}`,void 0);function X6(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useCallback((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Hz(e,t,n){const[r,a]=P.useState(t),o=P.useRef(typeof e<"u"),i=o.current?e:r,l=X6(n),c=P.useCallback(f=>{const g=typeof f=="function"?f(i):f;o.current||a(g),l==null||l(g)},[l,i]);return P.useEffect(()=>{Pw(!(o.current&&e==null),"`isExpanded` state is changing from controlled to uncontrolled. useCollapse should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled collapse for the lifetime of the component. Check the `isExpanded` prop."),Pw(!(!o.current&&e!=null),"`isExpanded` state is changing from uncontrolled to controlled. useCollapse should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled collapse for the lifetime of the component. Check the `isExpanded` prop.")},[e]),[i,c]}var Yz="(prefers-reduced-motion: reduce)";function Uz(){const[e,t]=P.useState(!1);return P.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const n=window.matchMedia(Yz);t(n.matches);const r=a=>{t(a.matches)};if(n.addEventListener)return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)};if(n.addListener)return n.addListener(r),()=>{n.removeListener(r)}},[]),e}var zz=WL.useId||(()=>{});function Vz(){return zz()??""}var Wz=typeof window<"u"?P.useLayoutEffect:P.useEffect,PS=!1,$z=0,_x=()=>++$z;function Zz(e){const t=e||(PS?_x():null),[n,r]=P.useState(t);return Wz(()=>{n===null&&r(_x())},[]),P.useEffect(()=>{PS===!1&&(PS=!0)},[]),n!=null?String(n):void 0}function qz(e){const t=Vz(),n=Zz(e);return typeof e=="string"?e:typeof t=="string"?t:n}function Gz(e,t){const n=performance.now(),r={};function a(){r.id=requestAnimationFrame(o=>{o-n>t?e():a()})}return a(),r}function Bx(e){e.id&&cancelAnimationFrame(e.id)}function Hx(e){return e!=null&&e.current?e.current.scrollHeight:(Pw(!0,"Was not able to find a ref to the collapse element via `getCollapseProps`. Ensure that the element exposes its `ref` prop. If it exposes the ref prop under a different name (like `innerRef`), use the `refKey` property to change it. Example:\n\nconst collapseProps = getCollapseProps({refKey: 'innerRef'})"),0)}function Jz(e){if(!e||typeof e=="string")return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Kz(e,t){if(e!=null)if(typeof e=="function")e(t);else try{e.current=t}catch{throw new Bz(`Cannot assign value "${t}" to ref "${e}"`)}}function Yx(...e){return e.every(t=>t==null)?null:t=>{e.forEach(n=>{Kz(n,t)})}}function Qz(e){let t=n=>{};t=n=>{if(!(n!=null&&n.current))return;const{paddingTop:r,paddingBottom:a}=window.getComputedStyle(n.current);Pw(!(r&&r!=="0px"||a&&a!=="0px"),`Padding applied to the collapse element will cause the animation to break and not perform as expected. To fix, apply equivalent padding to the direct descendent of the collapse element. Example: Before:

{children}
After:
{children}
`)},P.useEffect(()=>{t(e)},[e])}var Xz=typeof window>"u"?P.useEffect:P.useLayoutEffect;function eV({duration:e,easing:t="cubic-bezier(0.4, 0, 0.2, 1)",onTransitionStateChange:n=()=>{},isExpanded:r,defaultExpanded:a=!1,hasDisabledAnimation:o,id:i,...l}={}){const c=X6(n),f=qz(i?`${i}`:void 0),[h,g]=Hz(r,a),y=P.useRef(h),[w,S]=P.useState(!1),D=Uz(),I=o??D,M=P.useRef(),N=P.useRef(),R=P.useRef(null),[k,B]=P.useState(null);Qz(R);const L=`${l.collapsedHeight||0}px`;function _(V){if(!R.current)return;const Y=R.current;for(const Z in V){const Q=V[Z];Q?Y.style[Z]=Q:Y.style.removeProperty(Z)}}return Xz(()=>{if(!R.current||h===y.current)return;y.current=h;function Y(K){return I?0:e??Jz(K)}const Z=K=>`height ${Y(K)}ms ${t}`,Q=K=>{function se(){h?(_({height:"",overflow:"",transition:"",display:""}),c("expandEnd")):(_({transition:""}),c("collapseEnd")),S(!1)}N.current&&Bx(N.current),N.current=Gz(se,K)};return S(!0),h?M.current=requestAnimationFrame(()=>{c("expandStart"),_({display:"block",overflow:"hidden",height:L}),M.current=requestAnimationFrame(()=>{c("expanding");const K=Hx(R);Q(Y(K)),R.current&&(R.current.style.transition=Z(K),R.current.style.height=`${K}px`)})}):M.current=requestAnimationFrame(()=>{c("collapseStart");const K=Hx(R);Q(Y(K)),_({transition:Z(K),height:`${K}px`}),M.current=requestAnimationFrame(()=>{c("collapsing"),_({height:L,overflow:"hidden"})})}),()=>{M.current&&cancelAnimationFrame(M.current),N.current&&Bx(N.current)}},[h,L,I,e,t,c]),{isExpanded:h,setExpanded:g,getToggleProps(V){const{disabled:Y,onClick:Z,refKey:Q,...K}={refKey:"ref",onClick(){},disabled:!1,...V},se=k?k.tagName==="BUTTON":void 0,le=V==null?void 0:V[Q||"ref"],fe={id:`react-collapsed-toggle-${f}`,"aria-controls":`react-collapsed-panel-${f}`,"aria-expanded":h,onClick(ie){Y||(Z==null||Z(ie),g(ce=>!ce))},[Q||"ref"]:Yx(le,B)},$={type:"button",disabled:Y?!0:void 0},he={"aria-disabled":Y?!0:void 0,role:"button",tabIndex:Y?-1:0};return se===!1?{...fe,...he,...K}:se===!0?{...fe,...$,...K}:{...fe,...$,...he,...K}},getCollapseProps(V){const{style:Y,refKey:Z}={refKey:"ref",style:{},...V},Q=V==null?void 0:V[Z||"ref"];return{id:`react-collapsed-panel-${f}`,"aria-hidden":!h,"aria-labelledby":`react-collapsed-toggle-${f}`,role:"region",...V,[Z||"ref"]:Yx(R,Q),style:{boxSizing:"border-box",...!w&&!h?{display:L==="0px"?"none":"block",height:L,overflow:"hidden"}:{},...Y}}}}}const tV=e=>{const{dailyNotesState:{app:t,view:n,settings:r},globalState:{memoListView:a}}=P.useContext(Lt),{getCollapseProps:o,getToggleProps:i,isExpanded:l,setExpanded:c}=eV({defaultExpanded:!0,collapsedHeight:(r==null?void 0:r.ThinoCollapsedHeight)??100}),{memo:f,handleMemoContentClick:h,handleMemoDoubleClick:g}=e,y=ne.useRef(null),[w,S]=ne.useState(""),D=ne.useRef(w),I=ne.useRef(0),[M,N]=ne.useState(!1),[R,k]=ne.useState(!1),B=x.debounce((_,V,Y)=>{for(const Z of _){const{height:Q}=Z.contentRect,K=(V==null?void 0:V.ThinoMaxHeight)||340,se=Q>K;N(se),c(!se),Y.disconnect()}},500);P.useEffect(()=>{var _;if(f.content!==D.current){if(r!=null&&r.OptimizeForCallout&&f.content.split("> [!").length>3&&f.content.split(` `).length>10&&!R){const V=y.current.createEl("button");V.setText(E("Render content")),V.onclick=async()=>{k(!0),await L()};const Y=y.current.createEl("textarea");Y.setText(f.content),Y.disabled=!0,(_=y.current)==null||_.toggleClass(["raw-content"],!0),c(!0),N(!1);return}L()}},[f.content]),P.useEffect(()=>{R&&I.current!==(r==null?void 0:r.ThinoMaxHeight)&&(y!=null&&y.current.hasChildNodes()&&k(!1),L())},[r==null?void 0:r.ThinoMaxHeight]),P.useEffect(()=>{if(!R)return;const _=y.current;if(!_)return;if(!(r!=null&&r.ThinoMaxHeight)){c(!0),N(!1);return}const V=new ResizeObserver(Y=>{B(Y,r,V)});return V.observe(_),()=>V.disconnect()},[R]);const L=async()=>{var _,V;y.current&&n&&t&&f.content!==D.current&&(y.current.empty(),await x.MarkdownRenderer.render(t,f.content,y.current,f.path,n),D.current=f.content,(_=y.current)==null||_.toggleClass(["markdown-rendered"],!0),(V=y.current)==null||V.toggleClass(["raw-content"],!1),k&&k(!0),I.current=(r==null?void 0:r.ThinoMaxHeight)||340)};return v.jsxs(v.Fragment,{children:[M&&a==="moments"&&v.jsxs(v.Fragment,{children:[v.jsx("button",{className:"thino-collapse-button",...i({style:{display:"block",marginTop:2}}),children:E(l?"Collapse":"Expand")}),!l&&(r==null?void 0:r.ThinoCollapsedHeight)!==0&&v.jsx("div",{className:"thino-collapse-shadowOverlay",onDoubleClick:g})]}),v.jsx("div",{...o({style:{margin:0}}),ref:y,className:"memo-content-text",onClick:_=>h(_,f),onDoubleClick:g,onContextMenu:_=>{_.preventDefault()}}),M&&a!=="moments"&&v.jsxs(v.Fragment,{children:[!l&&(r==null?void 0:r.ThinoCollapsedHeight)!==0&&v.jsx("div",{className:"thino-collapse-shadowOverlay",onDoubleClick:g}),v.jsx("button",{className:"thino-collapse-button",...i({style:{display:"block",marginTop:2}}),children:E(l?"Collapse":"Expand")})]})]})},e8=P.memo(tV,(e,t)=>e.memo.content===t.memo.content),nV=e=>{const[t,n]=P.useState({...e.memo,createdAtStr:ut.getDateTimeString(e.memo.createdAt)}),[r,a]=P.useState([]),[o,i]=P.useState([]);P.useEffect(()=>{(async()=>{try{const g=[],y=[...t.content.matchAll(rd)];for(const S of y)if(S&&S.length===3){const D=S[2],I=be.getMemoById(D);I&&g.push({...I,createdAtStr:ut.getDateTimeString(I.createdAt),dateStr:ut.getDateString(I.createdAt)})}a([...g]);const w=await be.getLinkedMemos(t.id);i(w.sort((S,D)=>ut.getTimeStampByDate(D.createdAt)-ut.getTimeStampByDate(S.createdAt)).map(S=>({...S,createdAtStr:ut.getDateTimeString(S.createdAt),dateStr:ut.getDateString(S.createdAt)})))}catch(g){console.error(g)}})()},[t.id]);const l=P.useCallback(async h=>{var y;const g=h.target;if(g.className==="memo-link-text"){const w=(y=g.dataset)==null?void 0:y.value,S=be.getMemoById(w??"");if(S){const D={...S,createdAtStr:ut.getDateTimeString(S.createdAt)};a([]),i([]),n(D)}else new x.Notice(E("Thino not found")),g.classList.remove("memo-link-text")}},[]),c=P.useCallback(h=>{a([]),i([]),n({...h,createdAtStr:ut.getDateTimeString(h.createdAt)})},[t.id]),f=P.useCallback(()=>{e.destroy(),dt.setEditMemoId(t.id)},[t.id]);return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"memo-card-container",children:[v.jsxs("div",{className:"header-container",children:[v.jsx("span",{className:"time-text",children:t.createdAtStr}),v.jsxs("div",{className:"btns-container",children:[v.jsx("button",{ref:h=>{h&&x.setIcon(h,"edit")},className:"btn edit-btn",onClick:f}),v.jsx("button",{ref:h=>{h&&x.setIcon(h,"x")},className:"btn close-btn",onClick:e.destroy})]})]}),v.jsx("div",{className:"memo-container",children:v.jsx("div",{className:"memo-content-text",children:v.jsx(e8,{memo:t,handleMemoContentClick:l,handleMemoDoubleClick:()=>{}})})}),v.jsx("div",{className:"layer-container"})]}),r.length>0?v.jsxs("div",{className:"linked-memos-wrapper",children:[v.jsxs("span",{className:"normal-text",children:[E("LINKED")," ",r.length," THINO"," "]}),r.map(h=>{const g=kC(uT(h.content)).replaceAll(` `," ");return v.jsxs("div",{className:"linked-memo-container",onClick:()=>c(h),children:[v.jsxs("span",{className:"time-text",children:[h.dateStr," "]}),g]},h.id)})]}):null,o.length>0?v.jsxs("div",{className:"linked-memos-wrapper",children:[v.jsxs("span",{className:"normal-text",children:[o.length," THINO ",E("LINK TO THE")," THINO"]}),o.map(h=>{const g=kC(uT(h.content)).replaceAll(` `," ");return v.jsxs("div",{className:"linked-memo-container",onClick:()=>c(h),children:[v.jsxs("span",{className:"time-text",children:[h.dateStr," "]}),g]},h.id)})]}):null]})};function Up(e){bb({className:"memo-card-dialog"},nV,{memo:e})}function rV({mouseEnterDelayMS:e=0,mouseLeaveDelayMS:t=0}={}){const[n,r]=P.useState(!1);let a,o;return[n,{onMouseEnter:()=>{clearTimeout(o),a=window.setTimeout(()=>r(!0),e)},onMouseLeave:()=>{clearTimeout(a),o=window.setTimeout(()=>r(!1),t)}}]}const aV=e=>{const{memo:t,handlePinMemoClick:n,handleFixMemoClick:r,handleSourceMemoClick:a,handleShowMemoStoryDialog:o,handleCopyMemoClick:i,handleEditMemoClick:l,handleGenMemoImageBtnClick:c,handleMarkMemoClick:f,handleArchiveMemo:h,handleDeleteMemoClick:g,handleSplitMemoClick:y}=e,w=Le.getState().dailyNotesState.settings,S=w.EnabledLocationList.find(Y=>Y.value==="MULTI"),[D,I]=Kl(!1),M=P.useRef(null),N={pinRef:P.useRef(null),fixRef:P.useRef(null),typeRef:P.useRef(null),moreRef:P.useRef(null)},[R,k]=rV({mouseEnterDelayMS:500}),B=P.useRef();P.useEffect(()=>{if(!N.typeRef)return;const Y=Gg.find(Z=>Z.title===t.sourceType);x.setIcon(N.typeRef.current,Y.icon),x.requireApiVersion("1.4.4")&&x.setTooltip(N.typeRef.current,t.path),N.fixRef&&(x.setIcon(N.fixRef.current,"shield-alert"),x.requireApiVersion("1.4.4")&&x.setTooltip(N.fixRef.current,"Update Thino property"))},[N.typeRef]),P.useEffect(()=>{N.pinRef&&(t.pinned?(x.setIcon(N.pinRef.current,"pin-off"),x.requireApiVersion("1.4.4")&&x.setTooltip(N.pinRef.current,E("UNPIN"))):(x.setIcon(N.pinRef.current,"pin"),x.requireApiVersion("1.4.4")&&x.setTooltip(N.pinRef.current,E("PIN"))))},[N.pinRef,t.pinned]);const L=x.debounce(()=>{var Y;if(R&&N.moreRef.current){if(B.current&&B.current._loaded||(Y=B.current)!=null&&Y.useNativeMenu||document.body.find(".more-action-btns-wrapper"))return;const Z=_(),Q=N.moreRef.current.getBoundingClientRect();Z.showAtPosition({x:Q.left,y:Q.bottom})}},200);P.useEffect(()=>{L()},[R]);const _=()=>{var Z;const Y=new x.Menu;return Y.dom.toggleClass(["more-action-btns-wrapper"],!0),Y.useNativeMenu?(Y.setNoIcon(),Y.addItem(Q=>{Q.setTitle(E("COPY")).onClick(i)}),Y.addItem(Q=>{Q.setTitle(E("EDIT")).onClick(l)}),Y.addItem(Q=>{Q.setTitle(E("SHARE")).onClick(c)})):Y.addItem(Q=>{const K=Q.dom;Q.dom.empty(),Q.dom.toggleClass(["more-action-btn-group","more-action-menu-item"],!0);const se=K.createEl("span");new x.ExtraButtonComponent(se).setIcon("copy"),se.toggleClass(["menu-item-icon","more-action-item-icon"],!0),se.onclick=$=>{$.stopPropagation(),$.preventDefault(),i(),Y.close()};const le=K.createEl("span");le.toggleClass(["menu-item-icon","more-action-item-icon"],!0),le.onclick=$=>{$.stopPropagation(),$.preventDefault(),l(),Y.close()},new x.ExtraButtonComponent(le).setIcon("pencil");const fe=K.createEl("span");fe.toggleClass(["menu-item-icon","more-action-item-icon"],!0),fe.onclick=$=>{$.stopPropagation(),$.preventDefault(),c(),Y.close()},new x.ExtraButtonComponent(fe).setIcon("share-2")}),Y.addSeparator(),Y.addItem(Q=>{Q.setIcon("book-open").setTitle(E("READ")).onClick(o)}),Y.addItem(Q=>{Q.setIcon("bookmark").setTitle(E("MARK")).onClick(f)}),((Z=/(^|\n)#{1,6}\s/g.exec(t.content))==null?void 0:Z.length)>1&&S&&Y.addItem(Q=>{Q.setIcon("separator-horizontal").setTitle(E("SPLIT")).onClick(y)}),Y.addItem(Q=>{Q.setIcon("home").setTitle(E("SOURCE")).onClick(()=>a(t))}),Y.addSeparator(),Y.addItem(Q=>{Q.setWarning(!0).setIcon("archive").setTitle(E("ARCHIVE").toUpperCase()).onClick(()=>h(t))}),Y.addItem(Q=>{Q.setWarning(!0).setIcon("trash").setTitle(w.DeleteThinoDirectly?E("DELETE"):E("TRASH BOX").toUpperCase().toUpperCase()).onClick(K=>{if(Y.useNativeMenu)g(K),Y.close();else if(K.stopPropagation(),K.preventDefault(),!D){I(!0),Q.setTitle(E("CONFIRM!")).onClick(se=>{g(se),Y.close()});return}})}),Y.addSeparator(),Y.addItem(Q=>{Q.setDisabled(!0).setTitle(ut.getWordCount(t.content.replace(/```[^\S\r\n]*[a-z]*\n.*?\n```/g,""))+` ${E("words")}`)}),Y.onHide(()=>{I(!1)}),B.current=Y,Y},V=Y=>{_().showAtMouseEvent(Y.nativeEvent)};return v.jsx("div",{ref:M,className:"memo-top-right-wrapper",children:v.jsxs("div",{className:"btns-container",children:[v.jsx("span",{ref:N.fixRef,className:`btn ${t.sourceType!=="MULTI"||t.id!==""?"hidden":""} fix-memo-btn`,onClick:()=>r(t)}),v.jsx("span",{ref:N.typeRef,className:`btn ${t.sourceType==="DAILY"?"hidden":""} source-type-btn`,onClick:()=>a(t)}),v.jsx("span",{ref:N.pinRef,className:`btn ${e.memo.pinned?"pinned-btn":"unpinned-btn"} pro`,onClick:n}),v.jsx("span",{...k,ref:Y=>{N.moreRef.current=Y,Y&&x.setIcon(Y,"more-horizontal")},onClick:V,className:"btn more-action-btn"})]})})},oV=e=>{var i,l,c;const{memo:t,handleMemoTypeToggle:n,handleShowMemoStoryDialog:r,settings:a}=e,o=((l=(i=t.fileInfo)==null?void 0:i.frontmatter)==null?void 0:l.title)||t.path.split("/").pop().split(".").shift();return v.jsxs("div",{className:"memo-top-left-wrapper",children:[e.children,v.jsx("span",{title:t.createdAt,className:"time-text",onClick:r,children:t.createdAt}),v.jsx("div",{className:`btn memo-type-img ${a!=null&&a.ShowTaskLabel?"":"hidden"}`,onClick:n,children:t.thinoType!=="JOURNAL"&&v.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":(c=t.thinoType)==null?void 0:c.slice(5)})}),(a==null?void 0:a.ShowSourcePath)&&t.sourceType==="FILE"&&v.jsx("span",{className:"time-text source-path","aria-label":o,onClick:()=>{at.setPathQuery(o)},children:o})]})};class iV extends x.SuggestModal{constructor(t,n){super(t),this.thino=n}sanitisedFileName(t){const n=sR;return t.replace(n,"").trim().slice(0,255)}ensureUniqueFileNames(t){const n=[];return t.map(a=>{const o=this.sanitisedFileName(a[0]),i=n.filter(l=>l==o);return n.push(o),i.length>=1?`${o}${i.length+1}`:o})}contentSplitByHeading(t,n){const r=t.split(` `),a=new Array(n).join("#")+" ",o=new Array(n+1).join("#")+" ",i=[];let l=[];return r.forEach((c,f)=>{c.startsWith(o)?(l.length>0&&(i.push(l),l=[]),l.push(c)):l.length>0&&!c.startsWith(a)?l.push(c):l.length>0&&(i.push(l),l=[]),f===r.length-1&&l.length>0&&i.push(l)}),i}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 x.Notice("No headings found"),this.close();return}const a=this.ensureUniqueFileNames(r);for(const l of r){const c=r.indexOf(l),f=await be.createThino({content:l.join(` `),name:a[c],type:"MULTI",isList:!0});be.pushMemo(f)}let o=this.thino.content;r.forEach((l,c)=>{o=o.replace(l.join(` `),`[[${a[c]}]]`)});const i=await be.updateMemo(this.thino.id,o);i&&be.editMemo(i),this.close()}}const sV=async(e,t,n)=>{const r=n.getAttribute("href"),a=n.className;if(a.contains("tag"))lV(n.innerText.slice(1));else if(a.contains("internal-link")){const o=n.getAttribute("data-href"),i=be.getMemoById(o??"");i?Up(i):await e.workspace.openLinkText(o,o,!x.Platform.isMobile&&t.navigation!==!0)}else r&&window.open(r,"_blank")},lV=e=>{const t=at.getState().query.tag;at.setTagQuery(t.contains(",")?t.split(",").includes(e)?t.split(",").filter(n=>n!==e).join(","):t+","+e:t===e?"":e)},uV=(e,t)=>{const n=t==null?void 0:t.getAttribute("src"),r=t==null?void 0:t.parentElement.getAttribute("src"),a=[...(e==null?void 0:e.querySelectorAll("img"))||[]],o=a.indexOf(t);Mb({imgUrl:n,filepath:n.startsWith("app")?r:void 0,otherIMGEls:a,currentIndex:o})},cV=e=>{var r;const t=(r=e.dataset)==null?void 0:r.value,n=be.getMemoById(t??"");n?Up(n):(new x.Notice("Thino Not Found"),e.classList.remove("memo-link-text"))},dV=async(e,t,n,r)=>{var l;const a=e!=null&&e.AppendDateWhenTaskDone?" ✅ "+x.moment().format("YYYY-MM-DD"):"",o=((l=r.parentElement.dataset)==null?void 0:l.task)==="x"?"DONE":"TODO",i=[...(n==null?void 0:n.querySelectorAll("li.task-list-item"))||[]];for(const c of i)if(c===r||c===r.closest("li.task-list-item")){const f=i.indexOf(c),h=t.content.split(/\n/),g=[];for(let M=0;M{const{globalState:{editMemoId:t},dailyNotesState:{app:n,view:r,settings:a,verifyState:o},locationState:{pathname:i}}=P.useContext(Lt),{memo:l,type:c="inline"}=e,f=P.useRef(null),h=P.useRef(null),[g,y]=P.useState(!1);P.useEffect(()=>{g&&setTimeout(()=>{dt.setEditMemoId(l.id)},100)},[g]),P.useEffect(()=>{(i==="/review"||i==="/daily")&&t!==l.id&&g&&y(!1)},[t]);const w=$=>{if($.ctrlKey||$.metaKey){const he=x.moment(l.createdAt,"YYYY/MM/DD HH:mm:ss");at.setFromAndToQuery(he.startOf("day").valueOf(),he.endOf("day").valueOf());return}Up(l)},S=()=>{if(a!=null&&a.UseButtonToShowEditor&&(a==null?void 0:a.DefaultEditorLocation)==="Bottom"){const $=document.querySelector("div[data-type='thino_view'] .view-content .memo-show-editor-button:not(.hidden)");$&&$.trigger("click")}dt.setMarkMemoId(l.id)},D=async()=>{var ie;const $=!x.Platform.isDesktop&&await((ie=window.Capacitor)==null?void 0:ie.Plugins.Device.getId()),he=x.Platform.isDesktop?await cr():$.identifier||$.uuid;if(!o||(o==null?void 0:o.appId)!==he){fn();return}l.pinned?await be.unpinMemoById(l.id):await be.pinMemoById(l.id)},I=()=>{if(a!=null&&a.UseButtonToShowEditor&&(a==null?void 0:a.DefaultEditorLocation)==="Bottom"&&x.Platform.isMobile){const $=document.querySelector("div[data-type='thino_view'] .view-content .memo-show-editor-button:not(.hidden)");$&&$.trigger("click")}(i==="/review"||i==="/daily")&&y(!0),i!=="/review"&&i!=="/daily"&&dt.setEditMemoId(l.id)},M=async $=>{$.sourceType==="MULTI"&&$.id.trim()===""&&await be.updateMemoProperty($)},N=async $=>{await be.openThinoByID($.id)},R=async $=>{try{const he=await be.archiveMemo($);he&&be.editMemo(he)}catch(he){console.error(he),new x.Notice(he.message)}},k=async()=>{try{if(a.DeleteThinoDirectly)await be.deleteMemoById(l.id);else{const $=await be.hideMemoById(l.id);$&&be.editMemo($)}}catch($){new x.Notice($.message)}dt.getState().editMemoId===l.id&&dt.setEditMemoId("")},B=()=>{if(h.current&&!h.current.confirmStatus){h.current&&h.current.toggleConfirm(!1);return}},L=()=>{sf(l)},_=async()=>{const $=await be.updateMemo(l.id,l.content,l.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");$&&be.editMemo($)},V=async()=>{navigator.clipboard.writeText(l.content).then(()=>{new x.Notice(E("COPY SUCCEED"))}).catch(()=>{new x.Notice(E("COPY FAILED"))})},Y=async()=>{new iV(n,l).open()},Z=$=>{$&&$.target.tagName!=="INPUT"&&I()},Q=async($,he)=>{$.preventDefault(),$.stopPropagation();const ie=$.target;if($.ctrlKey||$.metaKey){await N(he);return}if(ie.tagName==="A"){await sV(n,r,ie);return}if(ie.tagName==="IMG"){uV(f.current,ie);return}if(ie.tagName==="A"&&ie.getAttribute("href")){const ce=ie.getAttribute("href");window.open(ce,"_blank");return}if(ie.className==="memo-link-text"){cV(ie);return}if(ie.tagName==="INPUT"&&ie.hasClass("task-list-item-checkbox")){await dV(a,he,f.current,ie);return}},K=$=>{const he=new x.Menu;he.dom.toggleClass("memo-context-menu",!0);const ie=window.getSelection();(ie==null?void 0:ie.toString().length)>0&&he.addItem(ce=>{ce.setIcon("copy").setTitle(E("Copy selected text")).onClick(()=>{navigator.clipboard.writeText(ie.toString()).then(()=>{new x.Notice(E("COPY SUCCEED"))}).catch(()=>{new x.Notice(E("COPY FAILED"))})})}).addSeparator(),he.addItem(ce=>{ce.setIcon("copy").setTitle(E("Copy thino").toLocaleUpperCase()).onClick(async()=>{await V(),he.close()})}).addItem(ce=>{ce.setIcon("book-open").setTitle(E("READ")).onClick(w)}).addItem(ce=>{ce.setIcon(l.pinned?"pin-off":"pin").setTitle(l.pinned?E("UNPIN"):E("PIN")).onClick(D)}).addItem(ce=>{ce.setIcon("bookmark").setTitle(E("MARK")).onClick(S)}).addItem(ce=>{ce.setIcon("share-2").setTitle(E("SHARE")).onClick(L)}).addItem(ce=>{ce.setIcon("pencil").setTitle(E("EDIT")).onClick(I)}).addItem(ce=>{ce.setIcon("home").setTitle(E("SOURCE")).onClick(()=>N(l))}).addSeparator().addItem(ce=>{ce.setIcon("archive").setTitle(E("ARCHIVE").toLocaleUpperCase()).onClick(()=>R(l))}).addItem(ce=>{ce.setIcon("trash").setTitle(E("DELETE")).onClick(async()=>{await k()})}),he.showAtMouseEvent($.nativeEvent)},se=P.useMemo(()=>({memo:l,handlePinMemoClick:D,handleFixMemoClick:M,handleSourceMemoClick:N,handleArchiveMemo:R,handleDeleteMemoClick:k,handleGenMemoImageBtnClick:L,handleMarkMemoClick:S,handleEditMemoClick:I,handleCopyMemoClick:V,handleShowMemoStoryDialog:w,handleSplitMemoClick:Y}),[l]),le=P.useMemo(()=>({memo:l,handleMemoTypeToggle:_,handleShowMemoStoryDialog:w,settings:a}),[l,a]),fe=P.useMemo(()=>v.jsxs("div",{ref:f,className:`memo-wrapper ${l.pinned?"pinned":""}`,"data-source-type":l.sourceType,"data-thino-type":l.thinoType,"data-thino-id":l.id,onMouseLeave:B,onMouseOver:$=>{$.shiftKey&&($.stopPropagation(),n.workspace.trigger("hover-link",{event:$,source:"thino",hoverParent:r.containerEl,targetEl:f.current,linktext:l.path,sourcePath:l.path,state:{scroll:l.sourceType==="DAILY"?parseInt(l.id.slice(14)):0}}))},onContextMenu:K,children:[g&&v.jsx(hf,{editorType:"inline"}),!g&&v.jsxs(v.Fragment,{children:[c==="inline"&&v.jsxs("div",{className:"memo-top-wrapper",draggable:!0,onDragStart:$=>{$.target.classList.add("dragging"),$.dataTransfer.setDragImage(f.current,0,0),$.dataTransfer.setData("text/plain",l.content)},onDragEnd:$=>{$.target.classList.remove("dragging")},children:[v.jsx(oV,{...le}),v.jsx(aV,{...se})]}),v.jsx(e8,{memo:l,handleMemoContentClick:Q,handleMemoDoubleClick:Z})]})]}),[l,g]);return v.jsx(v.Fragment,{children:fe})},ai=P.memo(fV,(e,t)=>Iw.isEqual(e.memo,t.memo));class Ke extends x.Setting{constructor(n,r){super(n);Se(this,"settingTab");Se(this,"name","");Se(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||"",a=typeof this.desc=="string"?this.desc:this.desc.textContent||"";return this.settingTab.addSettingToMasterSettingsList(n,this.settingEl,r,a),this}}class hV extends x.Modal{constructor(n,r,a,o,i){super(n);Se(this,"plugin");Se(this,"settingTab");Se(this,"target",5);Se(this,"cb");this.app=n,this.settingTab=r,this.plugin=a,this.target=o,this.cb=i}onOpen(){var l;const{contentEl:n}=this;(l=n.parentElement)==null||l.classList.add("memo-save-location-modal"),n.createEl("h3",{text:E("Thino Daily Target")});const r=n.createDiv("modal-setting");new Ke(r,this.settingTab).setName(E("Target Thino Count")).addSlider(c=>{c.setDynamicTooltip().setValue(this.target).setLimits(1,30,1).onChange(async f=>{this.target=f})});const a=n.createDiv("button-group"),o=a.createEl("button",{text:E("Cancel")}),i=a.createEl("button",{text:E("Save")});i.onclick=async()=>{this.plugin.settings.MemoDailyTarget=this.target,this.settingTab.applySettingsUpdate(),this.cb(this.target),this.close()},o.onclick=async()=>{this.close()}}onClose(){const{contentEl:n}=this;n.empty()}}const pV=({allStat:e,todayTimeStamp:t,calendarType:n,handleCalendarTypeChange:r})=>{const{dailyNotesState:{app:a,settings:o},globalState:{manifest:i}}=P.useContext(Lt),[l,c]=P.useState(),[f,h]=P.useState(5),[g,y]=P.useState(0),[w,S]=P.useState(0),[D,I]=P.useState(o.HeatmapColorScheme||"default"),M=P.useRef(null),N=P.useRef(null);P.useEffect(()=>{o.HeatmapColorScheme&&I(o.HeatmapColorScheme)},[o.HeatmapColorScheme]),P.useEffect(()=>{let k,B=5;i&&a&&(k=a==null?void 0:a.plugins.getPlugin(i.id),B=k==null?void 0:k.settings.MemoDailyTarget,c(k)),h(B)},[i,a]),P.useEffect(()=>{const k=e.find(_=>_.timestamp===t),B=k?k.count:0;S(B);const L=Math.min(100,B/f*100);y(L)},[e,f]),P.useEffect(()=>{x.requireApiVersion("1.4.4")&&(x.setTooltip(N.current,g.toFixed(2)+"%"),x.setTooltip(M.current,E("Set daily target")+` (${w}/${f})`))},[g,w]),P.useEffect(()=>{M.current&&(M.current.hasChildNodes()||x.setIcon(M.current,"crosshair"),x.requireApiVersion("1.4.4")&&x.setTooltip(N.current,g+"%"))},[M,f]);const R=P.useCallback(()=>{if(!l)return;new hV(a,l==null?void 0:l.settingTab,l,f,B=>{h(B)}).open()},[l,f]);return v.jsx(v.Fragment,{children:v.jsxs("div",{className:`usage-daily-progress-wrapper heatmap-${D}`,children:[v.jsx("div",{ref:N,className:"daily-progress-bar",children:v.jsx("div",{className:"daily-progress-bar-inner",style:{width:`${g}%`}})}),v.jsx("div",{ref:M,className:"daily-progress-target",onClick:R}),v.jsx("div",{ref:k=>{k&&x.setIcon(k,n==="basic"?"layout-grid":"calendar"),k&&x.setTooltip&&x.setTooltip(k,E("Switch calendar type"))},className:"switch-calendar-type-btn",onClick:()=>r&&r(n==="basic"?"heatmap":"basic")})]})})},mV=(e,t)=>{const n=[],r=Math.floor((e-t)/ei);for(let a=0;a<=r;a++)n.push({timestamp:t+ei*a,count:0,list:0});return n},gV=e=>{const{className:t,view:n,datestamp:r,handleDateStampChange:a,handleDateItemClick:o,handleMonthChange:i,dailyStat:l}=e,c=x.moment().startOf("day").valueOf(),[f,h]=P.useState(Xh(r)),[g,y]=P.useState(null),[w,S]=P.useState(e.dailyStat);P.useEffect(()=>{h(Xh(r));const k=mV(yV(r),Xh(r)),B=e.thinos.filter(L=>!L.deletedAt&&L.rowStatus!=="ARCHIVED");for(const L of B){const V=x.moment(L.createdAt,"YYYY/MM/DD HH:mm:ss").startOf("day").diff(x.moment(f).startOf("day"),"days");V>=0&&V{const B=D.getFullYear(),L=D.getMonth()+1;let _=0;L===1&&k===-1?_=new Date(`${B-1}/12/1`).getTime():L===12&&k===1?_=new Date(`${B+1}/1/1`).getTime():_=new Date(`${B}/${L+k}/1`).getTime(),h(Xh(_)),i&&i(_)};return v.jsxs("div",{className:`heatmap-date-picker-wrapper ${t}`,children:[v.jsxs("div",{className:"date-picker-header",children:[v.jsx("span",{ref:k=>{k&&x.setIcon(k,"chevron-left")},className:"btn btn-text",onClick:()=>R(-1)}),v.jsxs("span",{className:"normal-text",children:[v.jsx(E6,{year:D.getFullYear().toString(),handleYearChange:k=>{h(Xh(new Date(`${k}/${D.getMonth()+1}/1`).getTime()))}}),v.jsx(C6,{month:D.getMonth().toString(),handleMonthChange:k=>{h(Xh(new Date(`${D.getFullYear()}/${parseInt(k)}/1`).getTime()))}})]}),v.jsx("span",{ref:k=>{k&&x.setIcon(k,"chevron-right")},className:"btn btn-text",onClick:()=>R(1)})]}),v.jsxs("div",{className:"date-picker-day-container",children:[v.jsx("div",{className:"date-picker-day-header",children:E("weekDaysShort").map(k=>v.jsx("span",{className:"day-item",children:k},k))}),v.jsx("div",{className:"date-picker-day-content",children:M.map(k=>{if(k.date===0)return v.jsx("span",{className:"day-item null",children:""},k.datestamp);const B=w.find(V=>V.timestamp===k.datestamp)||{count:0,timestamp:k.datestamp,list:0},L=B.count-B.list,_=B.list;return v.jsxs("span",{className:`day-item ${k.datestamp===c?"current":""} ${k.datestamp===g?"selected":""} ${jS(B.count)}`,onClick:V=>{a(r,V.nativeEvent),y(k.datestamp===g?null:k.datestamp),o&&o(V,B)},onMouseOver:V=>{if(!B||!B.count)return;const Y=new x.HoverPopover(n,V.currentTarget,100);t8(Y,{d:k,list:_,task:L})},children:[v.jsx("span",{className:"day-item-text",children:k.date}),v.jsx(v.Fragment,{children:B&&B.count!==0&&v.jsxs("span",{className:"day-item-dots",children:[L>0&&v.jsx("div",{className:`day-item-dot thino-task-dot ${jS(L)}`}),_>0&&v.jsx("div",{className:`day-item-dot thino-list-dot ${jS(_)}`})]})})]},k.datestamp)})})]})]})};function t8(e,{d:t,list:n,task:r}){e.hoverEl.toggleClass("thino-hover-popover",!0);const a=e.hoverEl.createDiv({cls:"thino-hover-popover-content"});a.createDiv({cls:"thino-date-item",text:`${x.moment(t.datestamp).format("YYYY-MM-DD")}`});const o=a.createDiv({cls:"thino-task-item"});o.createSpan({cls:"thino-task-item-title-text",text:`${E("Task")}: `}),o.createSpan({cls:"thino-task-item-title-count",text:`${r}`});const i=a.createDiv({cls:"thino-list-item"});i.createSpan({cls:"thino-list-item-title-text",text:`${E("List")}: `}),i.createSpan({cls:"thino-list-item-title-count",text:`${n}`})}function vV(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())/ei}function Xh(e){const t=new Date(e);return new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`).getTime()}function yV(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()-ei}function jS(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 Ux={width:12,height:7},zx=(e,t)=>{const n=[];for(let r=0;r<=e;r++)n.push({timestamp:t+ei*r,count:0,list:0});return n},tv=({initThinos:e,basicType:t})=>{const n=parseInt(x.moment().endOf("day").format("x"));new Date(n).getDay();const r=parseInt(x.moment().startOf("day").format("x")),a=new Array(6-new Date(n).getDay()).fill(0),o=Ux.width*Ux.height,i=parseInt(x.moment().startOf("day").subtract(o,"days").format("x")),l=x.moment().startOf("day").subtract(o,"days"),{memoState:{memos:c},dailyNotesState:{view:f,app:h,settings:g,verifyState:y}}=P.useContext(Lt),[w,S]=xo(t||bV(h||window.app)||"heatmap"),[D,I]=xo(x.moment().startOf("day").valueOf()),[M,N]=xo(g.HeatmapColorScheme||"default"),[R,k]=xo(zx(o,i)),[B,L]=xo(null),[_,V,Y]=xo(""),Z=P.useRef(null);P.useEffect(()=>{const fe=zx(o,i),$=(e||c).filter(he=>!he.deletedAt&&he.rowStatus!=="ARCHIVED");for(const he of $){const ce=x.moment(he.createdAt.replaceAll("/","-"),"YYYY-MM-DD HH:mm:ss").startOf("day").diff(l,"days");ce>=0&&ce{g.HeatmapColorScheme&&N(g.HeatmapColorScheme)},[g.HeatmapColorScheme]);const Q=P.useCallback((fe,$)=>{if(!$||!$.count)return;const he=$.count-$.list,ie=$.list,ce={date:$.timestamp,datestamp:$.timestamp},X=new x.HoverPopover(f,fe.currentTarget,100);t8(X,{d:ce,list:ie,task:he})},[]),K=()=>{S(w==="heatmap"?"basic":"heatmap"),wV(h,w==="heatmap"?"basic":"heatmap"),I(x.moment().startOf("day").valueOf())},se=P.useCallback(async(fe,$)=>{if($.count===0)return;const he=at.getState().query.duration,ie=he==null?void 0:he.from,ce=he==null?void 0:he.to,X=x.moment(ie).diff(ce,"day")==0;if(ie===$.timestamp&&X)at.setFromAndToQuery(0,0),L(null),V(null);else if(ie!==$.timestamp&&ie>0&&fe.shiftKey){const ae=x.moment($.timestamp).endOf("day").diff(ce,"day");ie===0&&fe.shiftKey?V("from"):ae<0&&X&&V("to"),x.moment(ie).isBefore($.timestamp)?Y.current==="to"?ae<0?at.setFromAndToQuery($.timestamp,ce):(at.setFromAndToQuery(parseInt(x.moment(ce).startOf("day").format("x")),parseInt(x.moment($.timestamp).endOf("day").format("x"))),V("from")):Y.current==="from"&&(ae<0,at.setFromAndToQuery(ie,parseInt(x.moment($.timestamp).endOf("day").format("x")))):Y.current==="to"?at.setFromAndToQuery($.timestamp,ce):Y.current==="from"&&(at.setFromAndToQuery($.timestamp,parseInt(x.moment(ie).endOf("day").format("x"))),V("to"))}else if(ie===0&&fe.shiftKey)at.setFromAndToQuery($.timestamp,parseInt(x.moment().endOf("day").format("x")));else if($.count>0&&(fe.ctrlKey||fe.metaKey)){const{app:ae,dailyNotes:De}=ft.getState(),je=fb(x.moment($.timestamp),De);if(!x.Platform.isMobile)await ae.workspace.getLeaf(!0).openFile(je);else{let Re=ae.workspace.activeLeaf;Re===null&&(Re=ae.workspace.getLeaf(!0)),Re.openFile(je)}}else $.count>0&&!fe.shiftKey&&!fe.ctrlKey&&!fe.metaKey&&(["/","/recycle"].includes(at.getState().pathname)||at.setPathname("/"),at.setFromAndToQuery($.timestamp,ut.getTimeStampByDate(x.moment($.timestamp+ei).subtract(1,"days").endOf("day").format("YYYY-MM-DD HH:mm:ss"))),L($))},[]),le=P.useMemo(()=>v.jsx(gV,{className:`heatmap-${M}`,view:f,datestamp:D,dailyStat:R,thinos:e||c,handleMonthChange:fe=>{I(fe)},handleDateStampChange:fe=>{},handleDateItemClick:(fe,$)=>se(fe,$)}),[JSON.stringify(R),e,c,f,D,M]);return v.jsxs(v.Fragment,{children:[w==="basic"&&le,w==="heatmap"&&v.jsxs("div",{className:`usage-heat-map-wrapper heatmap-${M}`,ref:Z,children:[v.jsxs("div",{className:"day-tip-text-container",children:[v.jsx("span",{className:"tip-text",children:E("weekDaysShort")[0]}),v.jsx("span",{className:"tip-text"}),v.jsx("span",{className:"tip-text",children:E("weekDaysShort")[2]}),v.jsx("span",{className:"tip-text"}),v.jsx("span",{className:"tip-text",children:E("weekDaysShort")[4]}),v.jsx("span",{className:"tip-text"}),v.jsx("span",{className:"tip-text",children:E("weekDaysShort")[6]})]}),v.jsxs("div",{className:"usage-heat-map",children:[R.slice(R.length-84+a.length,R.length).map((fe,$)=>{const he=fe.count,ie=he<=0?"":he<=1?"stat-day-L1-bg":he<=2?"stat-day-L2-bg":he<=4?"stat-day-L3-bg":"stat-day-L4-bg";return v.jsx("span",{"data-timestamp":fe.timestamp,"data-count":fe.count,"data-list-count":fe.list,"data-task-count":fe.count-fe.list,className:`stat-container ${ie} ${B===fe?"current":""} ${r===fe.timestamp?"today":""}`,onMouseOver:ce=>Q(ce,fe),onClick:ce=>se(ce,fe)},$)}),a.map((fe,$)=>v.jsx("span",{className:"stat-container null"},$))]})]}),!t&&v.jsx(pV,{allStat:R,todayTimeStamp:r,calendarType:w,handleCalendarTypeChange:K})]})};function wV(e,t){try{e==null||e.saveLocalStorage("calendarType",t)}catch(n){console.error(n)}}function bV(e){try{return(e==null?void 0:e.loadLocalStorage("calendarType"))||"heatmap"}catch(t){return console.error(t),"heatmap"}}const n8=({type:e,timestamp:t})=>{const{memoState:{memos:n}}=P.useContext(Lt),[r,a]=P.useState([]),o=ne.useRef(null);return P.useEffect(()=>{if(e==="daily"){if(t){const l=n.filter(c=>x.moment(c.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(x.moment(t,"YYYY/MM/DD HH:mm:ss"),"day"));a(l);return}const i=n.filter(l=>x.moment(l.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(x.moment(),"day"));a(i)}else if(e==="latest"){const i=n.filter(f=>!f.deletedAt&&f.rowStatus!=="ARCHIVED"),l=i.filter(f=>f.pinned),c=i.filter(f=>!f.pinned).slice(0,5);a([...l,...c])}},[n]),P.useEffect(()=>{o.current&&(o.current.scrollTop=0)},[n]),r.length>0?v.jsx("div",{ref:o,className:"thino-list-container",children:r.map(i=>v.jsx(ai,{memo:i}))}):v.jsx("div",{className:"tip-text-container",children:v.jsx("span",{className:"tip-text",children:E("Here is No Memos.")})})},SV=(e,t)=>{rs.createRoot(e).render(v.jsx(ne.StrictMode,{children:v.jsx(is,{store:Le,context:Lt,children:v.jsx(DV,{plugin:t})})}))},DV=({plugin:e})=>v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"thino-error-code-block",children:E("Please open thino first")}),v.jsx("button",{className:"thino-open-view",onClick:()=>e.openMemos("center"),children:E("Open thino in center window")})]}),TV=(e,t)=>{rs.createRoot(e).render(v.jsx(ne.StrictMode,{children:v.jsx(is,{store:Le,context:Lt,children:v.jsx(IV,{yaml:t})})}))},IV=({yaml:e})=>{const t=Object.keys(e).filter(a=>e[a]),n=e.daily?e.daily:"",r=a=>{switch(a){case"editor":return Vx;case"heatmap":return CV;case"calendar":return xV;case"daily":return kV;case"list":return NV;case"status":return MV;default:return Vx}};return v.jsx(v.Fragment,{children:t.map(a=>v.jsx("div",{"data-embed-type":a,className:ar("thino-embed-container",a==="editor"?"thino-editor-modal":""),children:a==="daily"?r(a)(n):r(a)()}))})};function Vx(){return v.jsx(hf,{editorType:"inline",modal:!0})}function EV(e,t,n){try{const r=rs.createRoot(e);return r.render(v.jsx(ne.StrictMode,{children:v.jsx(is,{store:Le,context:Lt,children:v.jsx(hf,{editorType:"inline",destroy:t,modal:n})})})),r}catch(r){console.error(r)}}function CV(){return v.jsx(tv,{basicType:"heatmap"})}function xV(){return v.jsx(tv,{basicType:"basic"})}function MV(){return v.jsx(G2,{statusType:"banner"})}function kV(e){return v.jsx(n8,{type:"daily",timestamp:e})}function NV(){return v.jsx(n8,{type:"latest"})}class CT extends x.Modal{constructor(n){super(n);Se(this,"root")}getViewType(){return"thino_view"}onOpen(){const{contentEl:n,modalEl:r}=this;try{this.root=EV(n,this.close.bind(this),this),r.toggleClass("thino-editor-modal",!0),setTimeout(()=>{var a;(a=n.querySelector("textarea"))==null||a.focus(),this.app.workspace.trigger("focus-on-textarea")},10)}catch(a){console.error(a)}}onClose(){this.root.unmount(),this.containerEl&&this.containerEl.empty()}}function AV(e,t){if(e==null)return{};var n=FV(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function FV(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,o;for(o=0;o=0)&&(n[a]=e[a]);return n}function jw(){return jw=Object.assign||function(e){for(var t=1;t{this.reCalculateColumnCount()})}reCalculateColumnCount(){const t=window&&window.innerWidth||1/0;let n=this.props.breakpointCols;typeof n!="object"&&(n={default:parseInt(n)||LS});let r=1/0,a=n.default||LS;for(let o in n){const i=parseInt(o);i>0&&t<=i&&i"u"&&(i="my-masonry-grid_column"));const l=Sg(Sg(Sg({},t),n),{},{style:Sg(Sg({},n.style),{},{width:o}),className:i});return a.map((c,f)=>ne.createElement("div",jw({},l,{key:f}),c))}logDeprecated(t){console.error("[Masonry]",t)}render(){const t=this.props,{children:n,breakpointCols:r,columnClassName:a,columnAttrs:o,column:i,className:l}=t,c=AV(t,["children","breakpointCols","columnClassName","columnAttrs","column","className"]);let f=l;return typeof l!="string"&&(this.logDeprecated('The property "className" requires a string'),typeof l>"u"&&(f="my-masonry-grid")),ne.createElement("div",jw({},c,{className:f}),this.renderColumns())}}Lw.defaultProps=PV;const xT=e=>{P.useContext(Lt);const t=Le.getState().dailyNotesState.settings,{thinos:n,dayMark:r,dayMarkRange:a="day",thinoWrapper:o}=e,[i,l]=ne.useState(!(t!=null&&t.hidePinnedGroup&&r==="PINNED")),c=ne.useRef(null);P.useEffect(()=>{c&&x.setTooltip&&x.setTooltip(c.current,E("Click to expand or fold, Cmd+Click to show all thinos of the day"))},[c]);const f=h=>{if(x.Keymap.isModifier(h.nativeEvent,"Mod")){const g={day:"YYYY-MM-DD",week:"YYYY-[W]WW",month:"YYYY-MM",quarter:"YYYY-[Q]Q",year:"YYYY"},y=x.moment(r,g[a]);at.setFromAndToQuery(y.startOf(a).valueOf(),y.endOf(a).valueOf());return}l(!i)};return v.jsx(v.Fragment,{children:e.type==="list"?v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:c,className:`day-mark ${i?"":"folded"} PINNED`,onClick:f,children:v.jsxs("span",{className:"day-mark-text",children:[i?"▼ ":"▶ ",r==="PINNED"?r+" 📌":r]})},r),i&&n.map((h,g)=>o?v.jsx("div",{children:o({thino:h})},`${h.id}-${x.moment(h.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${g}`):v.jsx(ai,{memo:h},`${h.id}-${x.moment(h.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${g}`))]}):v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:c,className:`day-mark ${i?"":"folded"}`,onClick:f,children:v.jsxs("span",{className:"day-mark-text",children:[i?"▼ ":"▶ ",r==="PINNED"?r+" 📌":r]})},r),v.jsx(Lw,{breakpointCols:e.type==="waterfall"?3:1,className:`${e.type}-view masonry-memolist`,columnClassName:"masonry-memolist-grid_column",children:i&&n.map((h,g)=>o?v.jsx("div",{children:o({thino:h})},`${h.id}-${x.moment(h.updatedAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${g}`):v.jsx(ai,{memo:h},`${h.id}-${x.moment(h.updatedAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${g}`))})]})})};function zu(e){"@babel/helpers - typeof";return zu=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},zu(e)}function jV(e,t){if(zu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(zu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function r8(e){var t=jV(e,"string");return zu(t)=="symbol"?t:String(t)}function of(e,t,n){return t=r8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function tr(e){for(var t=1;t=0)&&(n[a]=e[a]);return n}function Xl(e,t){if(e==null)return{};var n=kb(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ma(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zx(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?_-1:0),Y=1;Y<_;Y++)V[Y-1]=arguments[Y];(L=y.props)[N].apply(L,[B].concat(V)),y._notifying=!1}y.unmounted||y.setState(function(Z){var Q,K=Z.values;return{values:Pr(Object.create(null),K,(Q={},Q[M]=B,Q))}})};y.handlers[N]=R}),n.length&&(y.attachRef=function(M){y.inner=M});var I=Object.create(null);return o.forEach(function(M){I[M]=y.props[lw(M)]}),y.state={values:I,prevProps:{}},y}var g=h.prototype;return g.shouldComponentUpdate=function(){return!this._notifying},h.getDerivedStateFromProps=function(w,S){var D=S.values,I=S.prevProps,M={values:Pr(Object.create(null),D),prevProps:{}};return o.forEach(function(N){M.prevProps[N]=w[N],!qx(w,N)&&qx(I,N)&&(M.values[N]=w[lw(N)])}),M},g.componentWillUnmount=function(){this.unmounted=!0},g.render=function(){var w=this,S=this.props,D=S.innerRef,I=kb(S,["innerRef"]);i.forEach(function(N){delete I[N]});var M={};return o.forEach(function(N){var R=w.props[N];M[N]=R!==void 0?R:w.state.values[N]}),ne.createElement(e,Pr({},I,M,this.handlers,{ref:D||this.attachRef}))},h}(ne.Component);VV(l),l.displayName="Uncontrolled("+r+")",l.propTypes=Pr({innerRef:function(){}},YV(t)),n.forEach(function(f){l.prototype[f]=function(){var g;return(g=this.inner)[f].apply(g,arguments)}});var c=l;return ne.forwardRef&&(c=ne.forwardRef(function(f,h){return ne.createElement(l,Pr({},f,{innerRef:h,__source:{fileName:WV,lineNumber:128},__self:this}))}),c.propTypes=l.propTypes),c.ControlledComponent=e,c.deferControlTo=function(f,h,g){return h===void 0&&(h={}),d8(f,Pr({},t,h),g)},c}function f8(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;tt}),Uv=Vp(function(e,t){return e>=t}),sI=Vp(function(e,t){return e=t&&a.getHours()-n.getHours()a?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(a);++r-1&&e%1==0&&e<=jW}var uI=LW,RW=lI,_W=uI;function BW(e){return e!=null&&_W(e.length)&&!RW(e)}var Vv=BW,HW=9007199254740991,YW=/^(?:0|[1-9]\d*)$/;function UW(e,t){var n=typeof e;return t=t??HW,!!t&&(n=="number"||n!="symbol"&&YW.test(e))&&e>-1&&e%1==0&&e{t.current=e},[e]),t}function sM(e){const t=V$(e);return P.useCallback(function(...n){return t.current&&t.current(...n)},[t])}function lM(){return P.useState(null)}function W$(){const e=P.useRef(!0),t=P.useRef(()=>e.current);return P.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function $$(e){const t=W$();return[e[0],P.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var Z$=z6({defaultModifiers:[B6,Y6,P6,j6,H6,_6,U6,O6]}),uM=function(t){return{position:t,top:"0",left:"0",opacity:"0",pointerEvents:"none"}},q$={name:"applyStyles",enabled:!1},G$={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:function(t){var n=t.state;return function(){var r=n.elements,a=r.reference,o=r.popper;if("removeAttribute"in a){var i=(a.getAttribute("aria-describedby")||"").split(",").filter(function(l){return l.trim()!==o.id});i.length?a.setAttribute("aria-describedby",i.join(",")):a.removeAttribute("aria-describedby")}}},fn:function(t){var n,r=t.state,a=r.elements,o=a.popper,i=a.reference,l=(n=o.getAttribute("role"))==null?void 0:n.toLowerCase();if(o.id&&l==="tooltip"&&"setAttribute"in i){var c=i.getAttribute("aria-describedby");if(c&&c.split(",").indexOf(o.id)!==-1)return;i.setAttribute("aria-describedby",c?c+","+o.id:o.id)}}},J$=[];function K$(e,t,n){var r=n===void 0?{}:n,a=r.enabled,o=a===void 0?!0:a,i=r.placement,l=i===void 0?"bottom":i,c=r.strategy,f=c===void 0?"absolute":c,h=r.modifiers,g=h===void 0?J$:h,y=kb(r,["enabled","placement","strategy","modifiers"]),w=P.useRef(),S=P.useCallback(function(){var k;(k=w.current)==null||k.update()},[]),D=P.useCallback(function(){var k;(k=w.current)==null||k.forceUpdate()},[]),I=$$(P.useState({placement:l,update:S,forceUpdate:D,attributes:{},styles:{popper:uM(f),arrow:{}}})),M=I[0],N=I[1],R=P.useMemo(function(){return{name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(B){var L=B.state,_={},V={};Object.keys(L.elements).forEach(function(Y){_[Y]=L.styles[Y],V[Y]=L.attributes[Y]}),N({state:L,styles:_,attributes:V,update:S,forceUpdate:D,placement:L.placement})}}},[S,D,N]);return P.useEffect(function(){!w.current||!o||w.current.setOptions({placement:l,strategy:f,modifiers:[].concat(g,[R,q$])})},[f,l,R,o]),P.useEffect(function(){if(!(!o||e==null||t==null))return w.current=Z$(e,t,Pr({},y,{placement:l,strategy:f,modifiers:[].concat(g,[G$,R])})),function(){w.current!=null&&(w.current.destroy(),w.current=void 0,N(function(k){return Pr({},k,{attributes:{},styles:{popper:uM(f)}})}))}},[o,e,t]),M}function Q$(e,t,n,r){var a=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,a),n.__once&&e.removeEventListener(t,n.__once,a)}function Lg(e,t,n,r){return z$(e,t,n,r),function(){Q$(e,t,n,r)}}function X$(e){return e&&"setState"in e?q2.findDOMNode(e):e??null}const eZ=function(e){return $v(X$(e))};var tZ=27,cM=function(){};function nZ(e){return e.button===0}function rZ(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var dM=function(t){return t&&("current"in t?t.current:t)};function aZ(e,t,n){var r=n===void 0?{}:n,a=r.disabled,o=r.clickTrigger,i=o===void 0?"click":o,l=P.useRef(!1),c=t||cM,f=P.useCallback(function(y){var w,S=dM(e);QU(!!S,"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"),l.current=!S||rZ(y)||!nZ(y)||!!dv(S,(w=y.composedPath==null?void 0:y.composedPath()[0])!=null?w:y.target)},[e]),h=sM(function(y){l.current||c(y)}),g=sM(function(y){y.keyCode===tZ&&c(y)});P.useEffect(function(){if(!(a||e==null)){var y=window.event,w=eZ(dM(e)),S=Lg(w,i,f,!0),D=Lg(w,i,function(N){if(N===y){y=void 0;return}h(N)}),I=Lg(w,"keyup",function(N){if(N===y){y=void 0;return}g(N)}),M=[];return"ontouchstart"in w.documentElement&&(M=[].slice.call(w.body.children).map(function(N){return Lg(N,"mousemove",cM)})),function(){S(),D(),I(),M.forEach(function(N){return N()})}}},[e,a,i,f,h,g])}function oZ(e){var t={};return Array.isArray(e)?(e==null||e.forEach(function(n){t[n.name]=n}),t):e||t}function iZ(e){return e===void 0&&(e={}),Array.isArray(e)?e:Object.keys(e).map(function(t){return e[t].name=t,e[t]})}function sZ(e){var t,n,r,a,o=e.enabled,i=e.enableEvents,l=e.placement,c=e.flip,f=e.offset,h=e.fixed,g=e.containerPadding,y=e.arrowElement,w=e.popperConfig,S=w===void 0?{}:w,D=oZ(S.modifiers);return Pr({},S,{placement:l,enabled:o,strategy:h?"fixed":S.strategy,modifiers:iZ(Pr({},D,{eventListeners:{enabled:i},preventOverflow:Pr({},D.preventOverflow,{options:g?Pr({padding:g},(t=D.preventOverflow)==null?void 0:t.options):(n=D.preventOverflow)==null?void 0:n.options}),offset:{options:Pr({offset:f},(r=D.offset)==null?void 0:r.options)},arrow:Pr({},D.arrow,{enabled:!!y,options:Pr({},(a=D.arrow)==null?void 0:a.options,{element:y})}),flip:Pr({enabled:!!c},D.flip)}))})}function lZ(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function uZ(e,t){e.classList?e.classList.add(t):lZ(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function fM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function cZ(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=fM(e.className,t):e.setAttribute("class",fM(e.className&&e.className.baseVal||"",t))}var k0;function F8(e){if((!k0&&k0!==0||e)&&fI){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),k0=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return k0}var YS=function(t){var n;return typeof document>"u"?null:t==null?$v().body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),(n=t)!=null&&n.nodeType&&t||null)};function hM(e,t){var n=P.useState(function(){return YS(e)}),r=n[0],a=n[1];if(!r){var o=YS(e);o&&a(o)}return P.useEffect(function(){t&&r&&t(r)},[t,r]),P.useEffect(function(){var i=YS(e);i!==r&&a(i)},[e,r]),r}const pM=e=>!e||typeof e=="function"?e:t=>{e.current=t};function dZ(e,t){const n=pM(e),r=pM(t);return a=>{n&&n(a),r&&r(a)}}function fZ(e,t){return P.useMemo(()=>dZ(e,t),[e,t])}var hI=ne.forwardRef(function(e,t){var n=e.flip,r=e.offset,a=e.placement,o=e.containerPadding,i=o===void 0?5:o,l=e.popperConfig,c=l===void 0?{}:l,f=e.transition,h=lM(),g=h[0],y=h[1],w=lM(),S=w[0],D=w[1],I=fZ(y,t),M=hM(e.container),N=hM(e.target),R=P.useState(!e.show),k=R[0],B=R[1],L=K$(N,g,sZ({placement:a,enableEvents:!!e.show,containerPadding:i||5,flip:n,offset:r,arrowElement:S,popperConfig:c})),_=L.styles,V=L.attributes,Y=kb(L,["styles","attributes"]);e.show?k&&B(!1):!e.transition&&!k&&B(!0);var Z=function(){B(!0),e.onExited&&e.onExited.apply(e,arguments)},Q=e.show||f&&!k;if(aZ(g,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!Q)return null;var K=e.children(Pr({},Y,{show:!!e.show,props:Pr({},V.popper,{style:_.popper,ref:I}),arrowProps:Pr({},V.arrow,{style:_.arrow,ref:D})}));if(f){var se=e.onExit,le=e.onExiting,fe=e.onEnter,$=e.onEntering,he=e.onEntered;K=ne.createElement(f,{in:e.show,appear:!0,onExit:se,onExiting:le,onExited:Z,onEnter:fe,onEntering:$,onEntered:he},K)}return M?q2.createPortal(K,M):null});hI.displayName="Overlay";hI.propTypes={show:ke.bool,placement:ke.oneOf(K2),target:ke.any,container:ke.any,flip:ke.bool,children:ke.func.isRequired,containerPadding:ke.number,popperConfig:ke.object,rootClose:ke.bool,rootCloseEvent:ke.oneOf(["click","mousedown"]),rootCloseDisabled:ke.bool,onHide:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a-1}var MZ=xZ,kZ=Fb;function NZ(e,t){var n=this.__data__,r=kZ(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var AZ=NZ,FZ=mZ,OZ=DZ,PZ=EZ,jZ=MZ,LZ=AZ;function Zp(e){var t=-1,n=e==null?0:e.length;for(this.clear();++tl))return!1;var f=o.get(e),h=o.get(t);if(f&&h)return f==t&&h==e;var g=-1,y=!0,w=n&qG?new VG:void 0;for(o.set(e,t),o.set(t,e);++g0&&n(l)?t>1?J8(l,t-1,n,r,a):ite(a,l):r||(a[a.length]=l)}return a}var K8=J8;function lte(e){return function(t,n,r){for(var a=-1,o=Object(t),i=r(t),l=i.length;l--;){var c=i[e?l:++a];if(n(o[c],c,o)===!1)break}return t}}var ute=lte,cte=ute,dte=cte(),fte=dte,hte=fte,pte=Zv;function mte(e,t){return e&&hte(e,t,pte)}var xI=mte,gte=Vv;function vte(e,t){return function(n,r){if(n==null)return n;if(!gte(n))return e(n,r);for(var a=n.length,o=t?a:-1,i=Object(n);(t?o--:++ot||o&&i&&c&&!l&&!f||r&&i&&c||!n&&c||!a)return 1;if(!r&&!o&&!f&&e=l)return c;var f=n[r];return c*(f=="desc"?-1:1)}}return e.index-t.index}var Ote=Fte,ZS=CI,Pte=Hb,jte=Ub,Lte=Cte,Rte=Mte,_te=Rb,Bte=Ote,Hte=Yb,Yte=ss;function Ute(e,t,n){t.length?t=ZS(t,function(o){return Yte(o)?function(i){return Pte(i,o.length===1?o[0]:o)}:o}):t=[Hte];var r=-1;t=ZS(t,_te(jte));var a=Lte(e,function(o,i,l){var c=ZS(t,function(f){return f(o)});return{criteria:c,index:++r,value:o}});return Rte(a,function(o,i){return Bte(o,i,n)})}var zte=Ute;function Vte(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 Wte=Vte,$te=Wte,WM=Math.max;function Zte(e,t,n){return t=WM(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=WM(r.length-t,0),i=Array(o);++a0){if(++t>=nne)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var ine=one,sne=tne,lne=ine,une=lne(sne),eF=une,cne=Yb,dne=Q8,fne=eF;function hne(e,t){return fne(dne(e,t,cne),e+"")}var tF=hne,pne=K8,mne=zte,gne=tF,ZM=Ab,vne=gne(function(e,t){if(e==null)return[];var n=t.length;return n>1&&ZM(e,t[0],t[1])?t=[]:n>2&&ZM(t[0],t[1],t[2])&&(t=[t[0]]),mne(e,pne(t,1),[])}),yne=vne;const wne=qt(yne);function _T(e,t){var n=dI(e);return n?n.innerWidth:t?e.clientWidth:pf(e).width}function nF(e){return i8(e)||S8(e)||oI(e)||s8()}function bne(e,t){for(var n=-1,r=e==null?0:e.length;++n1),o}),die(e,pie(e),n),r&&(n=lie(n,mie|gie|vie,fie));for(var a=t.length;a--;)uie(n,t[a]);return n}),wie=yie;const bie=qt(wie);var Sie=tF,Die=zv,Tie=Ab,Iie=zb,fF=Object.prototype,Eie=fF.hasOwnProperty,Cie=Sie(function(e,t){e=Object(e);var n=-1,r=t.length,a=r>2?t[2]:void 0;for(a&&Tie(t[0],t[1],a)&&(r=1);++n0&&(l=l[0]),c=(l=l.filter(function(h){return h}))[0];for(var f=1;f2?r-2:0),o=2;o2&&arguments[2]!==void 0?arguments[2]:"day",r=e,a=[];zp(r,t,n);)a.push(r),r=Vs(r,1,n);return a}function ase(e,t){return t==null&&e==null?null:(t==null&&(t=new Date),e==null&&(e=new Date),e=$a(e,"day"),e=cv(e,cv(t)),e=Ip(e,Ip(t)),e=uv(e,uv(t)),lv(e,lv(t)))}function ik(e){return cv(e)===0&&Ip(e)===0&&uv(e)===0&&lv(e)===0}function ose(e,t,n,r){return n==="day"&&(n="date"),Math.abs(Kx[n](e,void 0,r)-Kx[n](t,void 0,r))}function NI(e,t,n){return!n||n==="milliseconds"?Math.abs(+e-+t):Math.round(Math.abs(+$a(e,n)/ok[n]-+$a(t,n)/ok[n]))}var ise=ke.oneOfType([ke.string,ke.func]);function sse(e,t,n,r,a){var o=typeof r=="function"?r(n,a,e):t.call(e,n,r,a);return nv(o==null||typeof o=="string","`localizer format(..)` must return a string, null, or undefined"),o}function lse(e,t,n){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,t+n,0,0)}function AI(e,t){return e.getTimezoneOffset()-t.getTimezoneOffset()}function use(e,t){return NI(e,t,"minutes")+AI(e,t)}function cse(e){var t=$a(e,"day");return NI(t,e,"minutes")+AI(t,e)}function dse(e,t){return sI(e,t,"day")}function fse(e,t,n){var r=Yv(e,t,"minutes");return r?Uv(t,n,"minutes"):Nb(t,n,"minutes")}function BT(e,t){return ose(e,t,"day")}function hse(e){var t=e.evtA,n=t.start,r=t.end,a=t.allDay,o=e.evtB,i=o.start,l=o.end,c=o.allDay,f=+$a(n,"day")-+$a(i,"day"),h=BT(n,r),g=BT(i,l);return f||g-h||!!c-!!a||+n-+i||+r-+l}function pse(e){var t=e.event,n=t.start,r=t.end,a=e.range,o=a.start,i=a.end,l=$a(n,"day"),c=zp(l,i,"day"),f=iI(l,r,"minutes"),h=f?Nb(r,o,"minutes"):Uv(r,o,"minutes");return c&&h}function mse(e,t){return Yv(e,t,"day")}function gse(e,t){return ik(e)&&ik(t)}var vse=ka(function e(t){var n=this;Ma(this,e),nv(typeof t.format=="function","date localizer `format(..)` must be a function"),nv(typeof t.firstOfWeek=="function","date localizer `firstOfWeek(..)` must be a function"),this.propType=t.propType||ise,this.formats=t.formats,this.format=function(){for(var r=arguments.length,a=new Array(r),o=0;o1,le=I.eventProp(i,Q,Z,l),fe=ne.createElement("div",{className:"rbc-event-content",title:Y||void 0},R?ne.createElement(R,{event:i,continuesPrior:w,continuesAfter:S,title:V,isAllDay:K,localizer:y,slotStart:B,slotEnd:L}):V);return ne.createElement(k,Object.assign({},this.props,{type:"date"}),ne.createElement("div",Object.assign({},_,{style:tr(tr({},le.style),a),className:ca("rbc-event",o,le.className,{"rbc-selected":l,"rbc-event-allday":se,"rbc-event-continues-prior":w,"rbc-event-continues-after":S}),onClick:function(he){return f&&f(i,he)},onDoubleClick:function(he){return h&&h(i,he)},onKeyDown:function(he){return g&&g(i,he)}}),typeof M=="function"?M(fe):fe))}}]),t}(ne.Component);function Wb(e,t){return!e||t==null?!1:HQ(e,t)}function gF(e,t){var n=e.right-e.left,r=n/t;return r}function vF(e,t,n,r){var a=gF(e,r);return n?r-1-Math.floor((t-e.left)/a):Math.floor((t-e.left)/a)}function Tse(e,t){var n=t.x,r=t.y;return r>=e.top&&r<=e.bottom&&n>=e.left&&n<=e.right}function Ise(e,t,n,r,a){var o=-1,i=-1,l=r-1,c=gF(t,r),f=vF(t,n.x,a,r),h=t.topn.y,g=t.tope.y,y=e.y>t.bottom,w=t.top>e.y,S=n.topt.bottom;return S&&(o=0,i=l),h&&(w?(o=0,i=f):y&&(o=f,i=l)),g&&(o=i=a?l-Math.floor((e.x-t.left)/c):Math.floor((e.x-t.left)/c),h?fN?i-M-_:i+_+f,Y=B>R?l+L-I+c:l+L;return{topOffset:V,leftOffset:Y}}function Cse(e){var t=e.containerRef,n=e.accessors,r=e.getters,a=e.selected,o=e.components,i=e.localizer,l=e.position,c=e.show,f=e.events,h=e.slotStart,g=e.slotEnd,y=e.onSelect,w=e.onDoubleClick,S=e.onKeyPress,D=e.handleDragStart,I=e.popperRef,M=e.target,N=e.offset;Sse({ref:I,callback:c}),P.useLayoutEffect(function(){var B=Ese({target:M,offset:N,container:t.current,box:I.current}),L=B.topOffset,_=B.leftOffset;I.current.style.top="".concat(L,"px"),I.current.style.left="".concat(_,"px")},[N.x,N.y,M]);var R=l.width,k={minWidth:R+R/2};return ne.createElement("div",{style:k,className:"rbc-overlay",ref:I},ne.createElement("div",{className:"rbc-overlay-header"},i.format(h,"dayHeaderFormat")),f.map(function(B,L){return ne.createElement(mF,{key:L,type:"popup",localizer:i,event:B,getters:r,onSelect:y,accessors:n,components:o,onDoubleClick:w,onKeyPress:S,continuesPrior:i.lt(n.end(B),h,"day"),continuesAfter:i.gte(n.start(B),g,"day"),slotStart:h,slotEnd:g,selected:Wb(B,a),draggable:!0,onDragStart:function(){return D(B)},onDragEnd:function(){return c()}})}))}var yF=ne.forwardRef(function(e,t){return ne.createElement(Cse,Object.assign({},e,{popperRef:t}))});yF.propTypes={accessors:ke.object.isRequired,getters:ke.object.isRequired,selected:ke.object,components:ke.object.isRequired,localizer:ke.object.isRequired,position:ke.object.isRequired,show:ke.func.isRequired,events:ke.array.isRequired,slotStart:ke.instanceOf(Date).isRequired,slotEnd:ke.instanceOf(Date),onSelect:ke.func,onDoubleClick:ke.func,onKeyPress:ke.func,handleDragStart:ke.func,style:ke.object,offset:ke.shape({x:ke.number,y:ke.number})};function xse(e){var t=e.containerRef,n=e.popupOffset,r=n===void 0?5:n,a=e.overlay,o=e.accessors,i=e.localizer,l=e.components,c=e.getters,f=e.selected,h=e.handleSelectEvent,g=e.handleDoubleClickEvent,y=e.handleKeyPressEvent,w=e.handleDragStart,S=e.onHide,D=e.overlayDisplay,I=P.useRef(null);if(!a.position)return null;var M=r;isNaN(r)||(M={x:r,y:r});var N=a.position,R=a.events,k=a.date,B=a.end;return ne.createElement(hZ,{rootClose:!0,flip:!0,show:!0,placement:"bottom",onHide:S,target:a.target},function(L){var _=L.props;return ne.createElement(yF,Object.assign({},_,{containerRef:t,ref:I,target:a.target,offset:M,accessors:o,getters:c,selected:f,components:l,localizer:i,position:N,show:D,events:R,slotStart:k,slotEnd:B,onSelect:h,onDoubleClick:g,onKeyPress:y,handleDragStart:w}))})}var FI=ne.forwardRef(function(e,t){return ne.createElement(xse,Object.assign({},e,{containerRef:t}))});FI.propTypes={popupOffset:ke.oneOfType([ke.number,ke.shape({x:ke.number,y:ke.number})]),overlay:ke.shape({position:ke.object,events:ke.array,date:ke.instanceOf(Date),end:ke.instanceOf(Date)}),accessors:ke.object.isRequired,localizer:ke.object.isRequired,components:ke.object.isRequired,getters:ke.object.isRequired,selected:ke.object,handleSelectEvent:ke.func,handleDoubleClickEvent:ke.func,handleKeyPressEvent:ke.func,handleDragStart:ke.func,onHide:ke.func,overlayDisplay:ke.func};function ao(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:document;return Lg(n,e,t,{passive:!1})}function Mse(e,t,n){return!e||dv(e,document.elementFromPoint(t,n))}function kse(e,t){var n=t.clientX,r=t.clientY,a=document.elementFromPoint(n,r);return V8(a,".rbc-event",e)}function Nse(e,t){var n=t.clientX,r=t.clientY,a=document.elementFromPoint(n,r);return V8(a,".rbc-show-more",e)}function $w(e,t){return!!kse(e,t)}function Ase(e,t){return!!Nse(e,t)}function ep(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 sk=5,Fse=250,wF=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.global,a=r===void 0?!1:r,o=n.longPressThreshold,i=o===void 0?250:o,l=n.validContainers,c=l===void 0?[]:l;Ma(this,e),this.isDetached=!1,this.container=t,this.globalMouse=!t||a,this.longPressThreshold=i,this.validContainers=c,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=ao("touchmove",function(){},window),this._removeKeyDownListener=ao("keydown",this._keyListener),this._removeKeyUpListener=ao("keyup",this._keyListener),this._removeDropFromOutsideListener=ao("drop",this._dropFromOutsideListener),this._removeDragOverFromOutsideListener=ao("dragover",this._dragOverFromOutsideListener),this._addInitialEventListener()}return ka(e,[{key:"on",value:function(n,r){var a=this._listeners[n]||(this._listeners[n]=[]);return a.push(r),{remove:function(){var i=a.indexOf(r);i!==-1&&a.splice(i,1)}}}},{key:"emit",value:function(n){for(var r=arguments.length,a=new Array(r>1?r-1:0),o=1;o0&&arguments[0]!==void 0?arguments[0]:0;return zu(e)!=="object"&&(e={top:e,left:e,right:e,bottom:e}),e}function lk(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=Ef(e),a=r.top,o=r.left,i=r.right,l=i===void 0?o:i,c=r.bottom,f=c===void 0?a:c,h=Ef(t),g=h.top,y=h.left,w=h.right,S=w===void 0?y:w,D=h.bottom,I=D===void 0?g:D;return!(f-nI||l-nS)}function Ef(e){if(!e.getBoundingClientRect)return e;var t=e.getBoundingClientRect(),n=t.left+uk("left"),r=t.top+uk("top");return{top:r,left:n,right:(e.offsetWidth||0)+n,bottom:(e.offsetHeight||0)+r}}function uk(e){if(e==="left")return window.pageXOffset||document.body.scrollLeft||0;if(e==="top")return window.pageYOffset||document.body.scrollTop||0}var Pse=function(e){Ao(t,e);function t(n,r){var a;return Ma(this,t),a=No(this,t,[n,r]),a.state={selecting:!1},a.containerRef=P.createRef(),a}return ka(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,a=r.range,o=r.getNow,i=r.getters,l=r.date,c=r.components.dateCellWrapper,f=r.localizer,h=this.state,g=h.selecting,y=h.startIdx,w=h.endIdx,S=o();return ne.createElement("div",{className:"rbc-row-bg",ref:this.containerRef},a.map(function(D,I){var M=g&&I>=y&&I<=w,N=i.dayProp(D),R=N.className,k=N.style;return ne.createElement(c,{key:I,value:D,range:a},ne.createElement("div",{style:k,className:ca("rbc-day-bg",R,M&&"rbc-selected-cell",f.isSameDate(D,S)&&"rbc-today",l&&f.neq(l,D,"month")&&"rbc-off-range-bg")}))}))}},{key:"_selectable",value:function(){var r=this,a=this.containerRef.current,o=this._selector=new wF(this.props.container,{longPressThreshold:this.props.longPressThreshold}),i=function(c,f){if(!$w(a,c)&&!Ase(a,c)){var h=Ef(a),g=r.props,y=g.range,w=g.rtl;if(Tse(h,c)){var S=vF(h,c.x,w,y.length);r._selectSlot({startIdx:S,endIdx:S,action:f,box:c})}}r._initial={},r.setState({selecting:!1})};o.on("selecting",function(l){var c=r.props,f=c.range,h=c.rtl,g=-1,y=-1;if(r.state.selecting||(gr(r.props.onSelectStart,[l]),r._initial={x:l.x,y:l.y}),o.isSelected(a)){var w=Ef(a),S=Ise(r._initial,w,l,f.length,h);g=S.startIdx,y=S.endIdx}r.setState({selecting:!0,startIdx:g,endIdx:y})}),o.on("beforeSelect",function(l){if(r.props.selectable==="ignoreEvents")return!$w(r.containerRef.current,l)}),o.on("click",function(l){return i(l,"click")}),o.on("doubleClick",function(l){return i(l,"doubleClick")}),o.on("select",function(l){r._selectSlot(tr(tr({},r.state),{},{action:"select",bounds:l})),r._initial={},r.setState({selecting:!1}),gr(r.props.onSelectEnd,[r.state])})}},{key:"_teardownSelectable",value:function(){this._selector&&(this._selector.teardown(),this._selector=null)}},{key:"_selectSlot",value:function(r){var a=r.endIdx,o=r.startIdx,i=r.action,l=r.bounds,c=r.box;a!==-1&&o!==-1&&this.props.onSelectSlot&&this.props.onSelectSlot({start:o,end:a,action:i,bounds:l,box:c,resourceId:this.props.resourceId})}}]),t}(ne.Component),$l={propTypes:{slotMetrics:ke.object.isRequired,selected:ke.object,isAllDay:ke.bool,accessors:ke.object.isRequired,localizer:ke.object.isRequired,components:ke.object.isRequired,getters:ke.object.isRequired,onSelect:ke.func,onDoubleClick:ke.func,onKeyPress:ke.func},defaultProps:{segments:[],selected:{}},renderEvent:function(t,n){var r=t.selected;t.isAllDay;var a=t.accessors,o=t.getters,i=t.onSelect,l=t.onDoubleClick,c=t.onKeyPress,f=t.localizer,h=t.slotMetrics,g=t.components,y=t.resizable,w=h.continuesPrior(n),S=h.continuesAfter(n);return ne.createElement(mF,{event:n,getters:o,localizer:f,accessors:a,components:g,onSelect:i,onDoubleClick:l,onKeyPress:c,continuesPrior:w,continuesAfter:S,slotStart:h.first,slotEnd:h.last,selected:Wb(n,r),resizable:y})},renderSpan:function(t,n,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:" ",o=Math.abs(n)/t*100+"%";return ne.createElement("div",{key:r,className:"rbc-row-segment",style:{WebkitFlexBasis:o,flexBasis:o,maxWidth:o}},a)}},bF=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){var r=this,a=this.props,o=a.segments,i=a.slotMetrics.slots,l=a.className,c=1;return ne.createElement("div",{className:ca(l,"rbc-row")},o.reduce(function(f,h,g){var y=h.event,w=h.left,S=h.right,D=h.span,I="_lvl_"+g,M=w-c,N=$l.renderEvent(r.props,y);return M&&f.push($l.renderSpan(i,M,"".concat(I,"_gap"))),f.push($l.renderSpan(i,D,I,N)),c=S+1,f},[]))}}]),t}(ne.Component);bF.defaultProps=tr({},$l.defaultProps);function SF(e){var t=e.dateRange,n=e.unit,r=n===void 0?"day":n,a=e.localizer;return{first:t[0],last:a.add(t[t.length-1],1,r)}}function jse(e,t,n,r){var a=SF({dateRange:t,localizer:r}),o=a.first,i=a.last,l=r.diff(o,i,"day"),c=r.max(r.startOf(n.start(e),"day"),o),f=r.min(r.ceil(n.end(e),"day"),i),h=Yee(t,function(y){return r.isSameDate(y,c)}),g=r.diff(c,f,"day");return g=Math.min(g,l),g=Math.max(g-r.segmentOffset,1),{event:e,span:g,left:h+1,right:Math.max(h+g,1)}}function DF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1/0,n,r,a,o=[],i=[];for(n=0;n=t?i.push(a):(o[r]||(o[r]=[])).push(a)}for(n=0;n=e.left})}function Rse(e,t,n){var r=uw(e),a=[],o=[];r.forEach(function(c){var f=t.start(c),h=t.end(c);n.daySpan(f,h)>1?a.push(c):o.push(c)});var i=a.sort(function(c,f){return HT(c,f,t,n)}),l=o.sort(function(c,f){return HT(c,f,t,n)});return[].concat(uw(i),uw(l))}function HT(e,t,n,r){var a={start:n.start(e),end:n.end(e),allDay:n.allDay(e)},o={start:n.start(t),end:n.end(t),allDay:n.allDay(t)};return r.sortEvents({evtA:a,evtB:o})}var TF=function(t,n){return t.left<=n&&t.right>=n},ck=function(t,n){return t.filter(function(r){return TF(r,n)}).map(function(r){return r.event})},IF=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){for(var r=this.props,a=r.segments,o=r.slotMetrics.slots,i=DF(a).levels[0],l=1,c=1,f=[];l<=o;){var h="_lvl_"+l,g=i.filter(function(N){return TF(N,l)})[0]||{},y=g.event,w=g.left,S=g.right,D=g.span;if(!y){l++;continue}var I=Math.max(0,w-c);if(this.canRenderSlotEvent(w,D)){var M=$l.renderEvent(this.props,y);I&&f.push($l.renderSpan(o,I,h+"_gap")),f.push($l.renderSpan(o,D,h,M)),c=l=S+1}else I&&f.push($l.renderSpan(o,I,h+"_gap")),f.push($l.renderSpan(o,1,h,this.renderShowMore(a,l))),c=l+=1}return ne.createElement("div",{className:"rbc-row"},f)}},{key:"canRenderSlotEvent",value:function(r,a){var o=this.props.segments;return Xee(r,r+a).every(function(i){var l=ck(o,i).length;return l===1})}},{key:"renderShowMore",value:function(r,a){var o=this,i=this.props,l=i.localizer,c=i.slotMetrics,f=c.getEventsForSlot(a),h=ck(r,a),g=h.length;return g?ne.createElement("button",{type:"button",key:"sm_"+a,className:ca("rbc-button-link","rbc-show-more"),onClick:function(w){return o.showMore(a,w)}},l.messages.showMore(g,h,f)):!1}},{key:"showMore",value:function(r,a){a.preventDefault(),a.stopPropagation(),this.props.onShowMore(r,a.target)}}]),t}(ne.Component);IF.defaultProps=tr({},$l.defaultProps);var _se=function(t){var n=t.children;return ne.createElement("div",{className:"rbc-row-content-scroll-container"},n)},Bse=function(t,n){return t.left<=n&&t.right>=n},Hse=function(t,n){return t[0].range===n[0].range&&t[0].events===n[0].events};function EF(){return G8(function(e){for(var t=e.range,n=e.events,r=e.maxRows,a=e.minRows,o=e.accessors,i=e.localizer,l=SF({dateRange:t,localizer:i}),c=l.first,f=l.last,h=n.map(function(D){return jse(D,t,o,i)}),g=DF(h,Math.max(r-1,1)),y=g.levels,w=g.extra,S=w.length>0?a-1:a;y.length1&&arguments[1]!==void 0?arguments[1]:0;if(o.lt(k,t,"minutes"))return y[0];if(o.gt(k,n,"minutes"))return y[y.length-1];var L=o.diff(t,k,"minutes");return y[(L-L%r)/r+B]},startsBeforeDay:function(k){return o.lt(k,t,"day")},startsAfterDay:function(k){return o.gt(k,n,"day")},startsBefore:function(k){return o.lt(o.merge(t,k),t,"minutes")},startsAfter:function(k){return o.gt(o.merge(n,k),n,"minutes")},getRange:function(k,B,L,_){L||(k=o.min(n,o.max(t,k))),_||(B=o.min(n,o.max(t,B)));var V=N(k),Y=N(B),Z=Y>r*h&&!o.eq(n,B)?(V-r)/(r*h)*100:V/(r*h)*100;return{top:Z,height:Y/(r*h)*100-Z,start:N(k),startDate:k,end:N(B),endDate:B}},getCurrentTimePosition:function(k){var B=N(k),L=B/(r*h)*100;return L}}}var Vse=function(){function e(t,n){var r=n.accessors,a=n.slotMetrics;Ma(this,e);var o=a.getRange(r.start(t),r.end(t)),i=o.start,l=o.startDate,c=o.end,f=o.endDate,h=o.top,g=o.height;this.start=i,this.end=c,this.startMs=+l,this.endMs=+f,this.top=h,this.height=g,this.data=t}return ka(e,[{key:"_width",get:function(){if(this.rows){var n=this.rows.reduce(function(a,o){return Math.max(a,o.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 a=this.row.leaves,o=a.indexOf(this);return o===a.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,a=n.xOffset,o=n._width,i=r.indexOf(this)+1;return a+i*o}}]),e}();function Wse(e,t,n){return Math.abs(t.start-e.start)e.start&&t.start0;){var r=t.shift();n.push(r);for(var a=0;ao.startMs)){if(a>0){var i=t.splice(a,1)[0];n.push(i)}break}}}return n}function xF(e){for(var t=e.events,n=e.minimumStartDifference,r=e.slotMetrics,a=e.accessors,o=t.map(function(h){return new Vse(h,{slotMetrics:r,accessors:a})}),i=$se(o),l=[],c=function(){var g=i[f],y=l.find(function(D){return D.end>g.start||Math.abs(g.start-D.start)=0;S--)Wse(y.rows[S],g,n)&&(w=y.rows[S]);w?(w.leaves.push(g),g.row=w):(g.leaves=[],y.rows.push(g))},f=0;f-1)){t=t>e.friends[r].idx?t:e.friends[r].idx,n.push(e.friends[r]);var a=MF(e.friends[r],t,n);t=t>a?t:a}return t}function Zse(e){var t=e.events,n=e.minimumStartDifference,r=e.slotMetrics,a=e.accessors,o=xF({events:t,minimumStartDifference:n,slotMetrics:r,accessors:a});o.sort(function(fe,$){return fe=fe.style,$=$.style,fe.top!==$.top?fe.top>$.top?1:-1:fe.height!==$.height?fe.top+fe.height<$.top+$.height?1:-1:0});for(var i=0;i=f&&S<=h||S>f&&S<=h||w>=f&&wse?Q:se}Q<=Z.idx&&(Z.size=100-Z.idx*Z.size);var le=Z.idx===0?0:3;Z.style.width="calc(".concat(Z.size,"% - ").concat(le,"px)"),Z.style.height="calc(".concat(Z.style.height,"% - 2px)"),Z.style.xOffset="calc(".concat(Z.style.left,"% + ").concat(le,"px)")}return o}var fk={overlap:xF,"no-overlap":Zse};function qse(e){return!!(e&&e.constructor&&e.call&&e.apply)}function Gse(e){e.events,e.minimumStartDifference,e.slotMetrics,e.accessors;var t=e.dayLayoutAlgorithm,n=t;return t in fk&&(n=fk[t]),qse(n)?n.apply(this,arguments):[]}var kF=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){var r=this.props,a=r.renderSlot,o=r.resource,i=r.group,l=r.getters,c=r.components,f=c===void 0?{}:c,h=f.timeSlotWrapper,g=h===void 0?ju:h,y=l?l.slotGroupProp(i):{};return ne.createElement("div",Object.assign({className:"rbc-timeslot-group"},y),i.map(function(w,S){var D=l?l.slotProp(w,o):{};return ne.createElement(g,{key:S,value:w,resource:o},ne.createElement("div",Object.assign({},D,{className:ca("rbc-time-slot",D.className)}),a&&a(w,S)))}))}}]),t}(P.Component);function A0(e){return typeof e=="string"?e:e+"%"}function Jse(e){var t=e.style,n=e.className,r=e.event,a=e.accessors,o=e.rtl,i=e.selected,l=e.label,c=e.continuesPrior,f=e.continuesAfter,h=e.getters,g=e.onClick,y=e.onDoubleClick,w=e.isBackgroundEvent,S=e.onKeyPress,D=e.components,I=D.event,M=D.eventWrapper,N=a.title(r),R=a.tooltip(r),k=a.end(r),B=a.start(r),L=h.eventProp(r,B,k,i),_=[ne.createElement("div",{key:"1",className:"rbc-event-label"},l),ne.createElement("div",{key:"2",className:"rbc-event-content"},I?ne.createElement(I,{event:r,title:N}):N)],V=t.height,Y=t.top,Z=t.width,Q=t.xOffset,K=tr(tr({},L.style),{},of({top:A0(Y),height:A0(V),width:A0(Z)},o?"right":"left",A0(Q)));return ne.createElement(M,Object.assign({type:"time"},e),ne.createElement("div",{role:"button",tabIndex:0,onClick:g,onDoubleClick:y,style:K,onKeyDown:S,title:R?(typeof l=="string"?l+": ":"")+R:void 0,className:ca(w?"rbc-background-event":"rbc-event",n,L.className,{"rbc-selected":i,"rbc-event-continues-earlier":c,"rbc-event-continues-later":f})},_))}var Kse=function(t){var n=t.children,r=t.className,a=t.style,o=t.innerRef;return ne.createElement("div",{className:r,style:a,ref:o},n)},Qse=ne.forwardRef(function(e,t){return ne.createElement(Kse,Object.assign({},e,{innerRef:t}))}),Xse=["dayProp"],ele=["eventContainerWrapper"],NF=function(e){Ao(t,e);function t(){var n;Ma(this,t);for(var r=arguments.length,a=new Array(r),o=0;o0&&arguments[0]!==void 0?arguments[0]:!1;!this.intervalTriggered&&!a&&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,a=r.min,o=r.max,i=r.getNow,l=i();if(l>=a&&l<=o){var c=this.slotMetrics.getCurrentTimePosition(l);this.intervalTriggered=!0,this.setState({timeIndicatorPosition:c})}else this.clearTimeIndicatorInterval()}},{key:"render",value:function(){var r=this.props,a=r.date,o=r.max,i=r.rtl,l=r.isNow,c=r.resource,f=r.accessors,h=r.localizer,g=r.getters,y=g.dayProp,w=Xl(g,Xse),S=r.components,D=S.eventContainerWrapper,I=Xl(S,ele),M=this.slotMetrics,N=this.state,R=N.selecting,k=N.top,B=N.height,L=N.startDate,_=N.endDate,V={start:L,end:_},Y=y(o),Z=Y.className,Q=Y.style,K=I.dayColumnWrapper||Qse;return ne.createElement(K,{ref:this.containerRef,date:a,style:Q,className:ca(Z,"rbc-day-slot","rbc-time-column",l&&"rbc-now",l&&"rbc-today",R&&"rbc-slot-selecting"),slotMetrics:M},M.groups.map(function(se,le){return ne.createElement(kF,{key:le,group:se,resource:c,getters:w,components:I})}),ne.createElement(D,{localizer:h,resource:c,accessors:f,getters:w,components:I,slotMetrics:M},ne.createElement("div",{className:ca("rbc-events-container",i&&"rtl")},this.renderEvents({events:this.props.backgroundEvents,isBackgroundEvent:!0}),this.renderEvents({events:this.props.events}))),R&&ne.createElement("div",{className:"rbc-slot-selection",style:{top:k,height:B}},ne.createElement("span",null,h.format(V,"selectRangeFormat"))),l&&this.intervalTriggered&&ne.createElement("div",{className:"rbc-current-time-indicator",style:{top:"".concat(this.state.timeIndicatorPosition,"%")}}))}}]),t}(ne.Component);NF.defaultProps={dragThroughEvents:!0,timeslots:2};function tle(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 nle=function(t){var n=t.min,r=t.max,a=t.timeslots,o=t.step,i=t.localizer,l=t.getNow,c=t.resource,f=t.components,h=t.getters,g=t.gutterRef,y=f.timeGutterWrapper,w=P.useMemo(function(){return tle({min:n,max:r,localizer:i})},[n==null?void 0:n.toISOString(),r==null?void 0:r.toISOString(),i]),S=w.start,D=w.end,I=P.useState(OI({min:S,max:D,timeslots:a,step:o,localizer:i})),M=Lu(I,2),N=M[0],R=M[1];P.useEffect(function(){N&&R(N.update({min:S,max:D,timeslots:a,step:o,localizer:i}))},[S==null?void 0:S.toISOString(),D==null?void 0:D.toISOString(),a,o]);var k=P.useCallback(function(B,L){if(L)return null;var _=N.dateIsInGroup(l(),L);return ne.createElement("span",{className:ca("rbc-label",_&&"rbc-now")},i.format(B,"timeGutterFormat"))},[N,i,l]);return ne.createElement(y,{slotMetrics:N},ne.createElement("div",{className:"rbc-time-gutter rbc-time-column",ref:g},N.groups.map(function(B,L){return ne.createElement(kF,{key:L,group:B,resource:c,components:f,renderSlot:k,getters:h})})))},rle=ne.forwardRef(function(e,t){return ne.createElement(nle,Object.assign({gutterRef:t},e))}),ale=function(t){var n=t.label;return ne.createElement(ne.Fragment,null,n)},ole=function(e){Ao(t,e);function t(){var n;Ma(this,t);for(var r=arguments.length,a=new Array(r),o=0;oa.clientHeight;r.state.isOverflowing!==o&&(r._updatingOverflow=!0,r.setState({isOverflowing:o},function(){r._updatingOverflow=!1}))}}},r.memoizedResources=G8(function(a,o){return ile(a,o)}),r.state={gutterWidth:void 0,isOverflowing:null},r.scrollRef=ne.createRef(),r.contentRef=ne.createRef(),r.containerRef=ne.createRef(),r._scrollRatio=null,r.gutterRef=P.createRef(),r}return ka(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),iM(this.rafHandle),this.measureGutterAnimationFrameRequest&&window.cancelAnimationFrame(this.measureGutterAnimationFrameRequest)}},{key:"componentDidUpdate",value:function(){this.applyScroll()}},{key:"renderEvents",value:function(r,a,o,i){var l=this,c=this.props,f=c.min,h=c.max,g=c.components,y=c.accessors,w=c.localizer,S=c.dayLayoutAlgorithm,D=this.memoizedResources(this.props.resources,y),I=D.groupEvents(a),M=D.groupEvents(o);return D.map(function(N,R){var k=Lu(N,2),B=k[0],L=k[1];return r.map(function(_,V){var Y=(I.get(B)||[]).filter(function(Q){return w.inRange(_,y.start(Q),y.end(Q),"day")}),Z=(M.get(B)||[]).filter(function(Q){return w.inRange(_,y.start(Q),y.end(Q),"day")});return ne.createElement(NF,Object.assign({},l.props,{localizer:w,min:w.merge(_,f),max:w.merge(_,h),resource:L&&B,components:g,isNow:w.isSameDate(_,i),key:R+"-"+V,date:_,events:Y,backgroundEvents:Z,dayLayoutAlgorithm:S}))})})}},{key:"render",value:function(){var r,a=this.props,o=a.events,i=a.backgroundEvents,l=a.range,c=a.width,f=a.rtl,h=a.selected,g=a.getNow,y=a.resources,w=a.components,S=a.accessors,D=a.getters,I=a.localizer,M=a.min,N=a.max,R=a.showMultiDayTimes,k=a.longPressThreshold,B=a.resizable;c=c||this.state.gutterWidth;var L=l[0],_=l[l.length-1];this.slots=l.length;var V=[],Y=[],Z=[];return o.forEach(function(Q){if(fv(Q,L,_,S,I)){var K=S.start(Q),se=S.end(Q);S.allDay(Q)||I.startAndEndAreDateOnly(K,se)||!R&&!I.isSameDate(K,se)?V.push(Q):Y.push(Q)}}),i.forEach(function(Q){fv(Q,L,_,S,I)&&Z.push(Q)}),V.sort(function(Q,K){return HT(Q,K,S,I)}),ne.createElement("div",{className:ca("rbc-time-view",y&&"rbc-time-view-resources"),ref:this.containerRef},ne.createElement(ole,{range:l,events:V,width:c,rtl:f,getNow:g,localizer:I,selected:h,allDayMaxRows:this.props.showAllEvents?1/0:(r=this.props.allDayMaxRows)!==null&&r!==void 0?r:1/0,resources:this.memoizedResources(y,S),selectable:this.props.selectable,accessors:S,getters:D,components:w,scrollRef:this.scrollRef,isOverflowing:this.state.isOverflowing,longPressThreshold:k,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(),ne.createElement("div",{ref:this.contentRef,className:"rbc-time-content",onScroll:this.handleScroll},ne.createElement(rle,{date:L,ref:this.gutterRef,localizer:I,min:I.merge(L,M),max:I.merge(L,N),step:this.props.step,getNow:this.props.getNow,timeslots:this.props.timeslots,components:w,className:"rbc-time-gutter",getters:D}),this.renderEvents(l,Y,Z,g())))}},{key:"renderOverlay",value:function(){var r,a,o=this,i=(r=(a=this.state)===null||a===void 0?void 0:a.overlay)!==null&&r!==void 0?r:{},l=this.props,c=l.accessors,f=l.localizer,h=l.components,g=l.getters,y=l.selected,w=l.popupOffset,S=l.handleDragStart,D=function(){return o.setState({overlay:null})};return ne.createElement(FI,{overlay:i,accessors:c,localizer:f,components:h,getters:g,selected:y,popupOffset:w,ref:this.containerRef,handleKeyPressEvent:this.handleKeyPressEvent,handleSelectEvent:this.handleSelectEvent,handleDoubleClickEvent:this.handleDoubleClickEvent,handleDragStart:S,show:!!i.position,overlayDisplay:this.overlayDisplay,onHide:D})}},{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 a,o=(a=r.gutterRef)!==null&&a!==void 0&&a.current?_T(r.gutterRef.current):void 0;o&&r.state.gutterWidth!==o&&r.setState({gutterWidth:o})})}},{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,a=r.min,o=r.max,i=r.scrollToTime,l=r.localizer,c=l.diff(l.merge(i,a),i,"milliseconds"),f=l.diff(a,o,"milliseconds");this._scrollRatio=c/f}}]),t}(P.Component);Qp.defaultProps={step:30,timeslots:2};var sle=["date","localizer","min","max","scrollToTime","enableAutoScroll"],Zb=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){var r=this.props,a=r.date,o=r.localizer,i=r.min,l=i===void 0?o.startOf(new Date,"day"):i,c=r.max,f=c===void 0?o.endOf(new Date,"day"):c,h=r.scrollToTime,g=h===void 0?o.startOf(new Date,"day"):h,y=r.enableAutoScroll,w=y===void 0?!0:y,S=Xl(r,sle),D=t.range(a,{localizer:o});return ne.createElement(Qp,Object.assign({},S,{range:D,eventOffset:10,localizer:o,min:l,max:f,scrollToTime:g,enableAutoScroll:w}))}}]),t}(ne.Component);Zb.range=function(e,t){var n=t.localizer;return[n.startOf(e,"day")]};Zb.navigate=function(e,t,n){var r=n.localizer;switch(t){case ri.PREVIOUS:return r.add(e,-1,"day");case ri.NEXT:return r.add(e,1,"day");default:return e}};Zb.title=function(e,t){var n=t.localizer;return n.format(e,"dayHeaderFormat")};var lle=["date","localizer","min","max","scrollToTime","enableAutoScroll"],Xc=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){var r=this.props,a=r.date,o=r.localizer,i=r.min,l=i===void 0?o.startOf(new Date,"day"):i,c=r.max,f=c===void 0?o.endOf(new Date,"day"):c,h=r.scrollToTime,g=h===void 0?o.startOf(new Date,"day"):h,y=r.enableAutoScroll,w=y===void 0?!0:y,S=Xl(r,lle),D=t.range(a,this.props);return ne.createElement(Qp,Object.assign({},S,{range:D,eventOffset:15,localizer:o,min:l,max:f,scrollToTime:g,enableAutoScroll:w}))}}]),t}(ne.Component);Xc.defaultProps=Qp.defaultProps;Xc.navigate=function(e,t,n){var r=n.localizer;switch(t){case ri.PREVIOUS:return r.add(e,-1,"week");case ri.NEXT:return r.add(e,1,"week");default:return e}};Xc.range=function(e,t){var n=t.localizer,r=n.startOfWeek(),a=n.startOf(e,"week",r),o=n.endOf(e,"week",r);return n.range(a,o)};Xc.title=function(e,t){var n=t.localizer,r=Xc.range(e,{localizer:n}),a=nF(r),o=a[0],i=a.slice(1);return n.format({start:o,end:i.pop()},"dayRangeHeaderFormat")};var ule=["date","localizer","min","max","scrollToTime","enableAutoScroll"];function PI(e,t){return Xc.range(e,t).filter(function(n){return[6,0].indexOf(n.getDay())===-1})}var Jv=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){var r=this.props,a=r.date,o=r.localizer,i=r.min,l=i===void 0?o.startOf(new Date,"day"):i,c=r.max,f=c===void 0?o.endOf(new Date,"day"):c,h=r.scrollToTime,g=h===void 0?o.startOf(new Date,"day"):h,y=r.enableAutoScroll,w=y===void 0?!0:y,S=Xl(r,ule),D=PI(a,this.props);return ne.createElement(Qp,Object.assign({},S,{range:D,eventOffset:15,localizer:o,min:l,max:f,scrollToTime:g,enableAutoScroll:w}))}}]),t}(ne.Component);Jv.defaultProps=Qp.defaultProps;Jv.range=PI;Jv.navigate=Xc.navigate;Jv.title=function(e,t){var n=t.localizer,r=PI(e,{localizer:n}),a=nF(r),o=a[0],i=a.slice(1);return n.format({start:o,end:i.pop()},"dayRangeHeaderFormat")};function ed(e){var t=e.accessors,n=e.components,r=e.date,a=e.events,o=e.getters,i=e.length,l=e.localizer,c=e.onDoubleClickEvent,f=e.onSelectEvent,h=e.selected,g=P.useRef(null),y=P.useRef(null),w=P.useRef(null),S=P.useRef(null),D=P.useRef(null);P.useEffect(function(){N()});var I=function(_,V,Y){var Z=n.event,Q=n.date;return V=V.filter(function(K){return fv(K,l.startOf(_,"day"),l.endOf(_,"day"),t,l)}),V.map(function(K,se){var le=t.title(K),fe=t.end(K),$=t.start(K),he=o.eventProp(K,$,fe,Wb(K,h)),ie=se===0&&l.format(_,"agendaDateFormat"),ce=se===0?ne.createElement("td",{rowSpan:V.length,className:"rbc-agenda-date-cell"},Q?ne.createElement(Q,{day:_,label:ie}):ie):!1;return ne.createElement("tr",{key:Y+"_"+se,className:he.className,style:he.style},ce,ne.createElement("td",{className:"rbc-agenda-time-cell"},M(_,K)),ne.createElement("td",{className:"rbc-agenda-event-cell",onClick:function(ae){return f&&f(K,ae)},onDoubleClick:function(ae){return c&&c(K,ae)}},Z?ne.createElement(Z,{event:K,title:le}):le))},[])},M=function(_,V){var Y="",Z=n.time,Q=l.messages.allDay,K=t.end(V),se=t.start(V);return t.allDay(V)||(l.eq(se,K)?Q=l.format(se,"agendaTimeFormat"):l.isSameDate(se,K)?Q=l.format({start:se,end:K},"agendaTimeRangeFormat"):l.isSameDate(_,se)?Q=l.format(se,"agendaTimeFormat"):l.isSameDate(_,K)&&(Q=l.format(K,"agendaTimeFormat"))),l.gt(_,se,"day")&&(Y="rbc-continues-prior"),l.lt(_,K,"day")&&(Y+=" rbc-continues-after"),ne.createElement("span",{className:Y.trim()},Z?ne.createElement(Z,{event:V,day:_,label:Q}):Q)},N=function(){if(D.current){var _=g.current,V=D.current.firstChild;if(V){var Y=S.current.scrollHeight>S.current.clientHeight,Z=[],Q=Z;Z=[_T(V.children[0]),_T(V.children[1])],(Q[0]!==Z[0]||Q[1]!==Z[1])&&(y.current.style.width=Z[0]+"px",w.current.style.width=Z[1]+"px"),Y?(uZ(_,"rbc-header-overflowing"),_.style.marginRight=F8()+"px"):cZ(_,"rbc-header-overflowing")}}},R=l.messages,k=l.add(r,i,"day"),B=l.range(r,k,"day");return a=a.filter(function(L){return fv(L,l.startOf(r,"day"),l.endOf(k,"day"),t,l)}),a.sort(function(L,_){return+t.start(L)-+t.start(_)}),ne.createElement("div",{className:"rbc-agenda-view"},a.length!==0?ne.createElement(ne.Fragment,null,ne.createElement("table",{ref:g,className:"rbc-agenda-table"},ne.createElement("thead",null,ne.createElement("tr",null,ne.createElement("th",{className:"rbc-header",ref:y},R.date),ne.createElement("th",{className:"rbc-header",ref:w},R.time),ne.createElement("th",{className:"rbc-header"},R.event)))),ne.createElement("div",{className:"rbc-agenda-content",ref:S},ne.createElement("table",{className:"rbc-agenda-table"},ne.createElement("tbody",{ref:D},B.map(function(L,_){return I(L,a,_)}))))):ne.createElement("span",{className:"rbc-agenda-empty"},R.noEventsInRange))}ed.defaultProps={length:30};ed.range=function(e,t){var n=t.length,r=n===void 0?ed.defaultProps.length:n,a=t.localizer,o=a.add(e,r,"day");return{start:e,end:o}};ed.navigate=function(e,t,n){var r=n.length,a=r===void 0?ed.defaultProps.length:r,o=n.localizer;switch(t){case ri.PREVIOUS:return o.add(e,-a,"day");case ri.NEXT:return o.add(e,a,"day");default:return e}};ed.title=function(e,t){var n=t.length,r=n===void 0?ed.defaultProps.length:n,a=t.localizer,o=a.add(e,r,"day");return a.format({start:e,end:o},"agendaHeaderFormat")};var dw=of(of(of(of(of({},Mo.MONTH,$b),Mo.WEEK,Xc),Mo.WORK_WEEK,Jv),Mo.DAY,Zb),Mo.AGENDA,ed),cle=["action","date","today"];function dle(e,t){var n=t.action,r=t.date,a=t.today,o=Xl(t,cle);switch(e=typeof e=="string"?dw[e]:e,n){case ri.TODAY:r=a||new Date;break;case ri.DATE:break;default:nv(e&&typeof e.navigate=="function","Calendar View components must implement a static `.navigate(date, action)` method.s"),r=e.navigate(r,n,o)}return r}var fle=function(e){Ao(t,e);function t(){var n;Ma(this,t);for(var r=arguments.length,a=new Array(r),o=0;o1)return o.map(function(l){return ne.createElement("button",{type:"button",key:l,className:ca({"rbc-active":i===l}),onClick:a.view.bind(null,l)},r[l])})}}]),t}(ne.Component);function hle(e,t){var n=null;return typeof t=="function"?n=t(e):typeof t=="string"&&zu(e)==="object"&&e!=null&&t in e&&(n=e[t]),n}var Uc=function(t){return function(n){return hle(n,t)}},ple=["view","date","getNow","onNavigate"],mle=["view","toolbar","events","backgroundEvents","style","className","elementProps","date","getNow","length","showMultiDayTimes","onShowMore","doShowMoreDrillDown","components","formats","messages","culture"];function AF(e){if(Array.isArray(e))return e;for(var t=[],n=0,r=Object.entries(e);n0&&arguments[0]!==void 0?arguments[0]:null,De=arguments.length>1?arguments[1]:void 0,je=zc(De);return je?e(ae).startOf(je).toDate():e(ae).toDate()}function l(){var ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,De=arguments.length>1?arguments[1]:void 0,je=zc(De);return je?e(ae).endOf(je).toDate():e(ae).toDate()}function c(ae,De,je){var Re=o(ae,De,je),Fe=Lu(Re,3),Be=Fe[0],Xe=Fe[1],Ze=Fe[2];return Be.isSame(Xe,Ze)}function f(ae,De,je){return!c(ae,De,je)}function h(ae,De,je){var Re=o(ae,De,je),Fe=Lu(Re,3),Be=Fe[0],Xe=Fe[1],Ze=Fe[2];return Be.isAfter(Xe,Ze)}function g(ae,De,je){var Re=o(ae,De,je),Fe=Lu(Re,3),Be=Fe[0],Xe=Fe[1],Ze=Fe[2];return Be.isBefore(Xe,Ze)}function y(ae,De,je){var Re=o(ae,De,je),Fe=Lu(Re,3),Be=Fe[0],Xe=Fe[1],Ze=Fe[2];return Be.isSameOrBefore(Xe,Ze)}function w(ae,De,je){var Re=o(ae,De,je),Fe=Lu(Re,3),Be=Fe[0],Xe=Fe[1],Ze=Fe[2];return Be.isSameOrBefore(Xe,Ze)}function S(ae,De,je){var Re=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"day",Fe=zc(Re),Be=e(ae),Xe=e(De),Ze=e(je);return Be.isBetween(Xe,Ze,Fe,"[]")}function D(ae,De){var je=e(ae),Re=e(De),Fe=e.min(je,Re);return Fe.toDate()}function I(ae,De){var je=e(ae),Re=e(De),Fe=e.max(je,Re);return Fe.toDate()}function M(ae,De){if(!ae&&!De)return null;var je=e(De).format("HH:mm:ss"),Re=e(ae).startOf("day").format("MM/DD/YYYY");return e("".concat(Re," ").concat(je),"MM/DD/YYYY HH:mm:ss").toDate()}function N(ae,De,je){var Re=zc(je);return e(ae).add(De,Re).toDate()}function R(ae,De){for(var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",Re=zc(je),Fe=e(ae).toDate(),Be=[];w(Fe,De);)Be.push(Fe),Fe=N(Fe,1,Re);return Be}function k(ae,De){var je=zc(De),Re=i(ae,je);return c(Re,ae)?Re:N(Re,1,je)}function B(ae,De){var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",Re=zc(je),Fe=e(ae),Be=e(De);return Be.diff(Fe,Re)}function L(ae){var De=e(ae);return De.minutes()}function _(ae){var De=ae?e.localeData(ae):e.localeData();return De?De.firstDayOfWeek():0}function V(ae){return e(ae).startOf("month").startOf("week").toDate()}function Y(ae){return e(ae).endOf("month").endOf("week").toDate()}function Z(ae){for(var De=V(ae),je=Y(ae),Re=[];w(De,je);)Re.push(De),De=N(De,1,"d");return Re}function Q(ae,De,je){return e(ae).startOf("day").minute(De+je).toDate()}function K(ae,De){return B(ae,De,"minutes")}function se(ae){var De=e(ae).startOf("day"),je=e(ae);return je.diff(De,"minutes")+a(ae)}function le(ae,De){var je=e(ae),Re=e(De);return je.isBefore(Re,"day")}function fe(ae,De,je){var Re=e(De),Fe=e(je);return Re.isSameOrAfter(Fe,"minutes")}function $(ae,De){var je=e(ae),Re=e(De),Fe=e.duration(Re.diff(je));return Fe.days()}function he(ae){var De=ae.evtA,je=De.start,Re=De.end,Fe=De.allDay,Be=ae.evtB,Xe=Be.start,Ze=Be.end,st=Be.allDay,Ct=+i(je,"day")-+i(Xe,"day"),tn=$(je,Re),_e=$(Xe,Ze);return Ct||_e-tn||!!st-!!Fe||+je-+Xe||+Re-+Ze}function ie(ae){var De=ae.event,je=De.start,Re=De.end,Fe=ae.range,Be=Fe.start,Xe=Fe.end,Ze=e(je).startOf("day"),st=e(Re),Ct=e(Be),tn=e(Xe),_e=Ze.isSameOrBefore(tn,"day"),et=!Ze.isSame(st,"minutes"),nt=et?st.isAfter(Ct,"minutes"):st.isSameOrAfter(Ct,"minutes");return _e&&nt}function ce(ae,De){var je=e(ae),Re=e(De);return je.isSame(Re,"day")}function X(){var ae=new Date,De=/-/.test(ae.toString())?"-":"",je=ae.getTimezoneOffset(),Re=Number("".concat(De).concat(Math.abs(je))),Fe=e().utcOffset();return Fe>Re?1:0}return new vse({formats:Dle,firstOfWeek:_,firstVisibleDay:V,lastVisibleDay:Y,visibleDays:Z,format:function(De,je,Re){return t(e(De),Re).format(je)},lt:g,lte:w,gt:h,gte:y,eq:c,neq:f,merge:M,inRange:S,startOf:i,endOf:l,range:R,add:N,diff:B,ceil:k,min:D,max:I,minutes:L,getSlotDate:Q,getTimezoneOffset:n,getDstOffset:r,getTotalMin:K,getMinutesFromMidnight:se,continuesPrior:le,continuesAfter:fe,sortEvents:he,inEventRange:ie,isSameDate:ce,daySpan:$,browserTZOffset:X})}function hk(e,t,n,r,a){const o={start:r.start(e),end:r.end(e)},i={start:t,end:n};return a.inEventRange({event:o,range:i})}function Ile(e,t){return!e||t==null?!1:mb.isEqual(e,t)}const dp={PREVIOUS:"PREV",NEXT:"NEXT",TODAY:"TODAY",DATE:"DATE"};function Vu({accessors:e,components:t,date:n,events:r,getters:a,length:o,localizer:i,onDoubleClickEvent:l,onSelectEvent:c,selected:f}){P.useRef(null);const h=P.useRef(null),g=P.useRef(null),y=P.useRef(null),w=P.useRef(null),[S,D]=P.useState(!1),[I,M]=P.useState(!1),N=(Z,Q,K)=>{const{event:se,date:le}=t;return Q=Q.filter(fe=>hk(fe,i.startOf(Z,"day"),i.endOf(Z,"day"),e,i)),Q.map((fe,$)=>{const he=e.title(fe),ie=e.end(fe),ce=e.start(fe),X=a.eventProp(fe,ce,ie,Ile(fe,f)),ae=$===0&&i.format(Z,"agendaDateFormat"),De=$===0?v.jsx("td",{rowSpan:Q.length,className:"rbc-agenda-date-cell",children:le?v.jsx(le,{day:Z,label:ae}):ae}):!1;return v.jsxs("tr",{className:X.className,style:X.style,children:[De,v.jsx("td",{className:"rbc-agenda-time-cell",children:R(Z,fe)}),v.jsx("td",{className:"rbc-agenda-event-cell",onClick:je=>c&&c(fe,je),onDoubleClick:je=>l&&l(fe,je),children:se?v.jsx(se,{event:fe,title:he}):he})]},K+"_"+$)},[])},R=(Z,Q)=>{const K=t.time;let se="",le=i.messages.allDay;const fe=e.end(Q),$=e.start(Q);return e.allDay(Q)||(i.eq($,fe)?le=i.format($,"agendaTimeFormat"):i.isSameDate($,fe)?le=i.format({start:$,end:fe},"agendaTimeRangeFormat"):i.isSameDate(Z,$)?le=i.format($,"agendaTimeFormat"):i.isSameDate(Z,fe)&&(le=i.format(fe,"agendaTimeFormat"))),i.gt(Z,$,"day")&&(se="rbc-continues-prior"),i.lt(Z,fe,"day")&&(se+=" rbc-continues-after"),v.jsx("span",{className:se.trim(),children:K?v.jsx(K,{event:Q,day:Z,label:le}):le})},{messages:k}=i,B=i.add(n,-o/2,"day"),L=i.add(n,o/2,"day"),_=i.range(B,L,"day");S&&_.reverse(),r=r.filter(Z=>hk(Z,i.startOf(B,"day"),i.endOf(L,"day"),e,i)),r.sort((Z,Q)=>+e.start(Z)-+e.start(Q)),I&&r.reverse();const V=P.useCallback(()=>setTimeout(()=>{w.current&&xb(w.current,{backgroundColor:"#ffffff",pixelRatio:window.devicePixelRatio*2}).then(Z=>{new x.Notice(E("Image is generating..."));const Q=ft.getState().settings.AutoSaveWhenOnMobile,K=ft.getState().app.vault;if(Q&&x.Platform.isMobile){const se=Z.split("base64,")[1];pb(se,"image/png").arrayBuffer().then(async fe=>{let $;const he="png",ie=qu();for(const ce in ie)if(ie[ce]instanceof x.TFile){$=ie[ce];break}$!==void 0&&await K.createBinary(await K.getAvailablePathForAttachments(`Pasted Image ${x.moment().format("YYYYMMDDHHmmss")}`,he,$),fe)})}Mb({imgUrl:Z})}).catch(Z=>{console.error(Z)})},0),[w.current,_]),Y=P.useCallback(Z=>{const Q=new x.Menu;Q.addItem(K=>{K.setIcon("share-2").setTitle(E("Share")).onClick(()=>{V()})}),Q.showAtMouseEvent(Z.nativeEvent)},[w.current,_,V]);return v.jsx("div",{className:"rbc-agenda-view",children:r.length!==0?v.jsx(ne.Fragment,{children:v.jsxs("table",{ref:w,className:"rbc-agenda-table",children:[v.jsx("thead",{onContextMenu:Y,children:v.jsxs("tr",{children:[v.jsx("th",{className:"rbc-header",ref:h,onClick:()=>{D(!S)},children:k.date+(S?" 🔼":" 🔽")}),v.jsx("th",{className:"rbc-header",ref:g,onClick:()=>{M(!I)},children:k.time+(I?" 🔼":" 🔽")}),v.jsx("th",{className:"rbc-header",children:k.event})]})}),v.jsx("tbody",{ref:y,children:_.map((Z,Q)=>N(Z,r,Q))})]})}):v.jsx("span",{className:"rbc-agenda-empty",children:k.noEventsInRange})})}Vu.propTypes={accessors:ke.object.isRequired,components:ke.object.isRequired,date:ke.instanceOf(Date),events:ke.array,getters:ke.object.isRequired,length:ke.number.isRequired,localizer:ke.object.isRequired,onSelectEvent:ke.func,onDoubleClickEvent:ke.func,selected:ke.object};Vu.defaultProps={length:30};Vu.range=(e,{length:t=Vu.defaultProps.length,localizer:n})=>{const r=n.add(e,-t/2,"day"),a=n.add(e,t/2,"day");return{customStart:r,customEnd:a}};Vu.navigate=(e,t,{length:n=Vu.defaultProps.length,localizer:r})=>{switch(t){case dp.PREVIOUS:return r.add(e,-n,"day");case dp.NEXT:return r.add(e,n,"day");default:return e}};Vu.title=(e,{length:t=Vu.defaultProps.length,localizer:n})=>{const r=n.add(e,-t/2,"day"),a=n.add(e,t/2,"day");return n.format({start:r,end:a},"agendaHeaderFormat")};function Ele(e,t){e.hoverEl.toggleClass("thino-hover-popover",!0);const n=Pv(e.hoverEl);return n.render(v.jsx(is,{store:Le,context:Lt,children:v.jsx(ai,{memo:t})})),n}function Cle({event:e}){const t=e.resource,n=t.content.split(` `)[0].slice(0,20),r=ne.useRef(null),a=ne.useRef(null),o=ne.useRef(null);P.useEffect(()=>{if(a.current)return x.setIcon(a.current,"calendar"),()=>{r.current&&(r.current=null)}},[r]);const i=P.useCallback(c=>{o.current&&(o.current.unmount(),o.current=null),o.current=c},[]),l=P.useCallback(c=>{if(!r.current||!x.Keymap.isModifier(c.nativeEvent,"Mod"))return;const f=new x.HoverPopover(ft.getState().view,r.current,100),h=Ele(f,t);i(h)},[r.current]);return v.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:l,children:[v.jsx(xle,{event:e}),v.jsx("span",{children:n})]})}const xle=({event:e})=>{const t=ne.useRef(null),n=e.resource;P.useEffect(()=>{t.current&&x.setIcon(t.current,n.thinoType==="JOURNAL"?"calendar":n.thinoType==="TASK-TODO"?"square":"check-square")},[n==null?void 0:n.thinoType,t]);const r=P.useCallback(async a=>{a.stopPropagation(),a.preventDefault(),await(async()=>{const i=await be.updateMemo(n.id,n.content,n.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");i&&be.editMemo(i)})()},[n==null?void 0:n.thinoType,n==null?void 0:n.id,n==null?void 0:n.content]);return v.jsx(v.Fragment,{children:v.jsxs("span",{className:"rbc-event-icon-group",children:[v.jsx("span",{className:"rbc-event-icon",ref:t,onClick:r}),v.jsx("span",{className:ar("rbc-event-time","hidden"),children:v.jsx("span",{className:"rbc-event-time-text",children:x.moment(e.start).format("HH:mm")})})]})})};function OF({views:e,view:t,messages:n,onView:r}){return e.map(a=>v.jsx("button",{type:"button",className:ar({"rbc-active":t===a}),onClick:()=>r(a),children:n[a]},a))}OF.propTypes={messages:ke.object,onView:ke.func,view:ke.string,views:ke.array};function PF({date:e,label:t,localizer:{messages:n},onNavigate:r,onView:a,view:o,views:i}){const l={previous:P.useRef(null),today:P.useRef(null),next:P.useRef(null)};P.useEffect(()=>{l&&(x.setIcon(l.previous.current,"chevron-left"),x.setIcon(l.today.current,"dot"),x.setIcon(l.next.current,"chevron-right"))},[l]);const c=P.useMemo(()=>v.jsxs(v.Fragment,{children:[v.jsx("button",{ref:l.previous,type:"button",onClick:()=>r(dp.PREVIOUS),"aria-label":n.previous,children:"<"}),v.jsx("button",{ref:l.today,type:"button",onClick:()=>r(dp.TODAY),"aria-label":n.today,children:"•"}),v.jsx("button",{ref:l.next,type:"button",onClick:()=>r(dp.NEXT),"aria-label":n.next,children:">"})]}),[n]);return v.jsxs("div",{className:"rbc-toolbar",children:[v.jsx("span",{className:ar("rbc-btn-group","thino-view-custom-toolbar"),children:c}),v.jsx("span",{className:"rbc-toolbar-label",children:v.jsx(Fw,{type:"text",handleValueChange:f=>{r(dp.DATE,x.moment(f,"YYYY-MM-DD").format("YYYY-MM-DDTHH:mm:ssZ"))},defaultText:t+(o==="week"?x.moment(e.valueOf(),"x").format(" [W]WW"):""),defaultValue:x.moment(e.valueOf(),"x").valueOf()})}),v.jsx("span",{className:"rbc-btn-group",children:v.jsx(OF,{view:o,views:i,messages:n,onView:a})})]})}PF.propTypes={date:ke.instanceOf(Date),label:ke.string,localizer:ke.object,messages:ke.object,onNavigate:ke.func,onView:ke.func,view:ke.string,views:ke.array};function Mle({event:e,children:t,showPopup:n,callRender:r,...a}){const o=P.useRef(null),i=P.useRef(null),l=P.useCallback(c=>{if(!c.isTrusted){r();return}i.current=c.nativeEvent.target,i.current&&(i.current.hasClass("rbc-event")||(i.current=i.current.closest(".rbc-event")),o.current!==null?(window.clearTimeout(o.current),o.current=null):o.current=window.setTimeout(()=>{n(e,i.current),o.current=null},250))},[e,n]);return v.jsx(v.Fragment,{children:v.jsx("div",{className:"rbc-event-wrapper","aria-describedby":"thino",onClick:l,children:t})})}const kle=Tle(x.moment),Nle=({event:e})=>{const t=e.resource;return v.jsx(v.Fragment,{children:v.jsx(ai,{memo:t})})},Ale=e=>{var K;const{thinos:t}=e,[n,r]=ne.useState([]),[a,o]=ne.useState((app==null?void 0:app.loadLocalStorage("thino-calendar-view"))||"month"),[i,l]=ne.useState(null),c=ne.useRef(null),f=ne.useRef(null),[h,g]=ne.useState(!1),y=P.useRef(null),[w,S]=P.useState(new Date);P.useEffect(()=>()=>{c.current&&(c.current=null),f.current&&(f.current=null),y.current&&(y.current=null)},[]),P.useEffect(()=>{const se=t.map(le=>{const fe=x.moment(le.createdAt,"YYYY/MM/DD HH:mm:ss"),$=fe.clone().add(1,"minute");return{title:le.content,start:new Date(fe.format("YYYY-MM-DDTHH:mm:ss")),end:new Date($.format("YYYY-MM-DDTHH:mm:ss")),resource:le}});r(se)},[t]),P.useEffect(()=>{app==null||app.saveLocalStorage("thino-calendar-view",a)},[a]),P.useEffect(()=>{i&&h&&l(t.find(se=>se.id===i.id))},[t,i,h]),P.useEffect(()=>{i&&y.current.update()},[i]),y.current=Cb(c.current,f.current,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,4]}}]});const D=P.useCallback(()=>{y.current.update(),y.current.update()},[]),I=P.useCallback((se,le)=>{l(null),k(),y.current.state.elements.reference=le,l(se.resource),B()},[]),M=P.useCallback(()=>{k(),l(null)},[]),N=P.useCallback((se,le,fe)=>{var $;if(R(se),le==="week"||le==="day"){const he=c.current.find(".rbc-event-wrapper");if(c.current.closest(".memolist-wrapper"),he){($=he.children[0])==null||$.click();return}else{setTimeout(()=>{var ce,X;const ie=c.current.find(".rbc-event-wrapper");(X=(ce=ie==null?void 0:ie.children)==null?void 0:ce[0])==null||X.click()},0);return}}},[]),R=P.useCallback(se=>{S(se)},[S]);Rv(f,M);const k=P.useCallback(()=>{g(!1)},[g]),B=P.useCallback(()=>{y.current.update(),g(!0)},[g]),L=P.useCallback(se=>{const le=se.resource;dt.setEditMemoId(le.id)},[]),_=P.useCallback(se=>{o(se)},[o]),{components:V,views:Y,messages:Z}=P.useMemo(()=>({components:{toolbar:PF,eventWrapper:se=>v.jsx(Mle,{...se,callRender:D,showPopup:I}),agenda:{event:Nle},event:Cle},views:{month:!0,agenda:Vu,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")}}),[]),Q=P.useMemo(()=>({timeGutterFormat:(se,le,fe)=>fe.format(se,"HH:mm",le),agendaTimeRangeFormat:({start:se,end:le},fe,$)=>$.format(se,"HH:mm",fe)+" — "+$.format(le,"HH:mm",fe),agendaHeaderFormat:({start:se,end:le},fe,$)=>$.format(se,"YYYY-MM-DD")+" — "+$.format(le,"YYYY-MM-DD")}),[]);return v.jsxs("div",{ref:c,className:"calendar-view",children:[v.jsx(vle,{date:w,messages:Z,components:V,localizer:kle,events:n,views:Y,onView:_,onDoubleClickEvent:L,onNavigate:N,formats:Q,defaultView:a,tooltipAccessor:null,startAccessor:"start",endAccessor:"end"}),v.jsx("div",{ref:f,style:(K=y.current)==null?void 0:K.styles.popper,className:ar("thino-popup-container",h?"":"hidden"),children:i&&v.jsx(ai,{memo:i})})]})};function Jc(e,t){return typeof e=="function"?e(t):e}function Ai(e,t){return n=>{t.setState(r=>({...r,[e]:Jc(n,r[e])}))}}function qw(e){return e instanceof Function}function Fle(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Ole(e,t){const n=[],r=a=>{a.forEach(o=>{n.push(o);const i=t(o);i!=null&&i.length&&r(i)})};return r(e),n}function Bt(e,t,n){let r=[],a;return o=>{let i;n.key&&n.debug&&(i=Date.now());const l=e(o);if(!(l.length!==r.length||l.some((h,g)=>r[g]!==h)))return a;r=l;let f;if(n.key&&n.debug&&(f=Date.now()),a=t(...l),n==null||n.onChange==null||n.onChange(a),n.key&&n.debug&&n!=null&&n.debug()){const h=Math.round((Date.now()-i)*100)/100,y=Math.round((Date.now()-f)*100)/100/16,w=(S,D)=>{for(S=String(S);S.length{var a;return(a=e==null?void 0:e.debugAll)!=null?a:e[t]},key:!1,onChange:r}}function Ple(e,t,n,r){var a,o;const l={...e._getDefaultColumnDef(),...t},c=l.accessorKey;let f=(a=(o=l.id)!=null?o:c?c.replace(".","_"):void 0)!=null?a:typeof l.header=="string"?l.header:void 0,h;if(l.accessorFn?h=l.accessorFn:c&&(c.includes(".")?h=y=>{let w=y;for(const D of c.split(".")){var S;w=(S=w)==null?void 0:S[D]}return w}:h=y=>y[l.accessorKey]),!f)throw new Error;let g={id:`${String(f)}`,accessorFn:h,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:Bt(()=>[!0],()=>{var y;return[g,...(y=g.columns)==null?void 0:y.flatMap(w=>w.getFlatColumns())]},Ht(e.options,"debugColumns")),getLeafColumns:Bt(()=>[e._getOrderColumnsFn()],y=>{var w;if((w=g.columns)!=null&&w.length){let S=g.columns.flatMap(D=>D.getLeafColumns());return y(S)}return[g]},Ht(e.options,"debugColumns"))};for(const y of e._features)y.createColumn==null||y.createColumn(g,e);return g}const oo="debugHeaders";function pk(e,t,n){var r;let o={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 i=[],l=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(l),i.push(c)};return l(o),i},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(o,e)}),o}const jle={createTable:e=>{e.getHeaderGroups=Bt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,a)=>{var o,i;const l=(o=r==null?void 0:r.map(g=>n.find(y=>y.id===g)).filter(Boolean))!=null?o:[],c=(i=a==null?void 0:a.map(g=>n.find(y=>y.id===g)).filter(Boolean))!=null?i:[],f=n.filter(g=>!(r!=null&&r.includes(g.id))&&!(a!=null&&a.includes(g.id)));return F0(t,[...l,...f,...c],e)},Ht(e.options,oo)),e.getCenterHeaderGroups=Bt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,a)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(a!=null&&a.includes(o.id))),F0(t,n,e,"center")),Ht(e.options,oo)),e.getLeftHeaderGroups=Bt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var a;const o=(a=r==null?void 0:r.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?a:[];return F0(t,o,e,"left")},Ht(e.options,oo)),e.getRightHeaderGroups=Bt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var a;const o=(a=r==null?void 0:r.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?a:[];return F0(t,o,e,"right")},Ht(e.options,oo)),e.getFooterGroups=Bt(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ht(e.options,oo)),e.getLeftFooterGroups=Bt(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ht(e.options,oo)),e.getCenterFooterGroups=Bt(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ht(e.options,oo)),e.getRightFooterGroups=Bt(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ht(e.options,oo)),e.getFlatHeaders=Bt(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ht(e.options,oo)),e.getLeftFlatHeaders=Bt(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ht(e.options,oo)),e.getCenterFlatHeaders=Bt(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ht(e.options,oo)),e.getRightFlatHeaders=Bt(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ht(e.options,oo)),e.getCenterLeafHeaders=Bt(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ht(e.options,oo)),e.getLeftLeafHeaders=Bt(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ht(e.options,oo)),e.getRightLeafHeaders=Bt(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ht(e.options,oo)),e.getLeafHeaders=Bt(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var a,o,i,l,c,f;return[...(a=(o=t[0])==null?void 0:o.headers)!=null?a:[],...(i=(l=n[0])==null?void 0:l.headers)!=null?i:[],...(c=(f=r[0])==null?void 0:f.headers)!=null?c:[]].map(h=>h.getLeafHeaders()).flat()},Ht(e.options,oo))}};function F0(e,t,n,r){var a,o;let i=0;const l=function(y,w){w===void 0&&(w=1),i=Math.max(i,w),y.filter(S=>S.getIsVisible()).forEach(S=>{var D;(D=S.columns)!=null&&D.length&&l(S.columns,w+1)},0)};l(e);let c=[];const f=(y,w)=>{const S={depth:w,id:[r,`${w}`].filter(Boolean).join("_"),headers:[]},D=[];y.forEach(I=>{const M=[...D].reverse()[0],N=I.column.depth===S.depth;let R,k=!1;if(N&&I.column.parent?R=I.column.parent:(R=I.column,k=!0),M&&(M==null?void 0:M.column)===R)M.subHeaders.push(I);else{const B=pk(n,R,{id:[r,w,R.id,I==null?void 0:I.id].filter(Boolean).join("_"),isPlaceholder:k,placeholderId:k?`${D.filter(L=>L.column===R).length}`:void 0,depth:w,index:D.length});B.subHeaders.push(I),D.push(B)}S.headers.push(I),I.headerGroup=S}),c.push(S),w>0&&f(D,w-1)},h=t.map((y,w)=>pk(n,y,{depth:i,index:w}));f(h,i-1),c.reverse();const g=y=>y.filter(S=>S.column.getIsVisible()).map(S=>{let D=0,I=0,M=[0];S.subHeaders&&S.subHeaders.length?(M=[],g(S.subHeaders).forEach(R=>{let{colSpan:k,rowSpan:B}=R;D+=k,M.push(B)})):D=1;const N=Math.min(...M);return I+=N,S.colSpan=D,S.rowSpan=I,{colSpan:D,rowSpan:I}});return g((a=(o=c[0])==null?void 0:o.headers)!=null?a:[]),c}const O0={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},JS=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Lle={getDefaultColumnDef:()=>O0,getInitialState:e=>({columnSizing:{},columnSizingInfo:JS(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ai("columnSizing",e),onColumnSizingInfoChange:Ai("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,a;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:O0.minSize,(r=o??e.columnDef.size)!=null?r:O0.size),(a=e.columnDef.maxSize)!=null?a:O0.maxSize)},e.getStart=Bt(n=>[n,zg(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((a,o)=>a+o.getSize(),0),Ht(t.options,"debugColumns")),e.getAfter=Bt(n=>[n,zg(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((a,o)=>a+o.getSize(),0),Ht(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...a}=n;return a})},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=a=>{if(a.subHeaders.length)a.subHeaders.forEach(r);else{var o;n+=(o=a.column.getSize())!=null?o: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),a=r==null?void 0:r.getCanResize();return o=>{if(!r||!a||(o.persist==null||o.persist(),KS(o)&&o.touches&&o.touches.length>1))return;const i=e.getSize(),l=e?e.getLeafHeaders().map(M=>[M.column.id,M.column.getSize()]):[[r.id,r.getSize()]],c=KS(o)?Math.round(o.touches[0].clientX):o.clientX,f={},h=(M,N)=>{typeof N=="number"&&(t.setColumnSizingInfo(R=>{var k,B;const L=t.options.columnResizeDirection==="rtl"?-1:1,_=(N-((k=R==null?void 0:R.startOffset)!=null?k:0))*L,V=Math.max(_/((B=R==null?void 0:R.startSize)!=null?B:0),-.999999);return R.columnSizingStart.forEach(Y=>{let[Z,Q]=Y;f[Z]=Math.round(Math.max(Q+Q*V,0)*100)/100}),{...R,deltaOffset:_,deltaPercentage:V}}),(t.options.columnResizeMode==="onChange"||M==="end")&&t.setColumnSizing(R=>({...R,...f})))},g=M=>h("move",M),y=M=>{h("end",M),t.setColumnSizingInfo(N=>({...N,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},w=n||typeof document<"u"?document:null,S={moveHandler:M=>g(M.clientX),upHandler:M=>{w==null||w.removeEventListener("mousemove",S.moveHandler),w==null||w.removeEventListener("mouseup",S.upHandler),y(M.clientX)}},D={moveHandler:M=>(M.cancelable&&(M.preventDefault(),M.stopPropagation()),g(M.touches[0].clientX),!1),upHandler:M=>{var N;w==null||w.removeEventListener("touchmove",D.moveHandler),w==null||w.removeEventListener("touchend",D.upHandler),M.cancelable&&(M.preventDefault(),M.stopPropagation()),y((N=M.touches[0])==null?void 0:N.clientX)}},I=Rle()?{passive:!1}:!1;KS(o)?(w==null||w.addEventListener("touchmove",D.moveHandler,I),w==null||w.addEventListener("touchend",D.upHandler,I)):(w==null||w.addEventListener("mousemove",S.moveHandler,I),w==null||w.addEventListener("mouseup",S.upHandler,I)),t.setColumnSizingInfo(M=>({...M,startOffset:c,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,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?JS():(n=e.initialState.columnSizingInfo)!=null?n:JS())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0}}};let P0=null;function Rle(){if(typeof P0=="boolean")return P0;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 P0=e,P0}function KS(e){return e.type==="touchstart"}const _le={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ai("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,a;if(!t){e._queue(()=>{t=!0});return}if((r=(a=e.options.autoResetAll)!=null?a: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 a,o;e.setExpanded(r?{}:(a=(o=e.initialState)==null?void 0:o.expanded)!=null?a:{})},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(a=>!a.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const i=o.split(".");r=Math.max(r,i.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 a;const o=r===!0?!0:!!(r!=null&&r[e.id]);let i={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{i[l]=!0}):i=r,n=(a=n)!=null?a:!o,!o&&n)return{...i,[e.id]:!0};if(o&&!n){const{[e.id]:l,...c}=i;return c}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,a;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((a=e.subRows)!=null&&a.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()}}}},jF=(e,t,n)=>{var r;const a=n.toLowerCase();return!!(!((r=e.getValue(t))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(a))};jF.autoRemove=e=>Ys(e);const LF=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};LF.autoRemove=e=>Ys(e);const RF=(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())};RF.autoRemove=e=>Ys(e);const _F=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};_F.autoRemove=e=>Ys(e)||!(e!=null&&e.length);const BF=(e,t,n)=>!n.some(r=>{var a;return!((a=e.getValue(t))!=null&&a.includes(r))});BF.autoRemove=e=>Ys(e)||!(e!=null&&e.length);const HF=(e,t,n)=>n.some(r=>{var a;return(a=e.getValue(t))==null?void 0:a.includes(r)});HF.autoRemove=e=>Ys(e)||!(e!=null&&e.length);const YF=(e,t,n)=>e.getValue(t)===n;YF.autoRemove=e=>Ys(e);const UF=(e,t,n)=>e.getValue(t)==n;UF.autoRemove=e=>Ys(e);const jI=(e,t,n)=>{let[r,a]=n;const o=e.getValue(t);return o>=r&&o<=a};jI.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,a=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,i=n===null||Number.isNaN(a)?1/0:a;if(o>i){const l=o;o=i,i=l}return[o,i]};jI.autoRemove=e=>Ys(e)||Ys(e[0])&&Ys(e[1]);const Ou={includesString:jF,includesStringSensitive:LF,equalsString:RF,arrIncludes:_F,arrIncludesAll:BF,arrIncludesSome:HF,equals:YF,weakEquals:UF,inNumberRange:jI};function Ys(e){return e==null||e===""}const Ble={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ai("columnFilters",e),onGlobalFilterChange:Ai("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"?Ou.includesString:typeof r=="number"?Ou.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Ou.equals:Array.isArray(r)?Ou.arrIncludes:Ou.weakEquals},e.getFilterFn=()=>{var n,r;return qw(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:Ou[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,a;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&!!e.accessorFn},e.getCanGlobalFilter=()=>{var n,r,a,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!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(a=>a.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const a=e.getFilterFn(),o=r==null?void 0:r.find(h=>h.id===e.id),i=Jc(n,o?o.value:void 0);if(mk(a,i,e)){var l;return(l=r==null?void 0:r.filter(h=>h.id!==e.id))!=null?l:[]}const c={id:e.id,value:i};if(o){var f;return(f=r==null?void 0:r.map(h=>h.id===e.id?c:h))!=null?f:[]}return r!=null&&r.length?[...r,c]:[c]})},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=()=>Ou.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return qw(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Ou[r]},e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=a=>{var o;return(o=Jc(t,a))==null?void 0:o.filter(i=>{const l=n.find(c=>c.id===i.id);if(l){const c=l.getFilterFn();if(mk(c,i.value,l))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 mk(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Hle=(e,t,n)=>n.reduce((r,a)=>{const o=a.getValue(e);return r+(typeof o=="number"?o:0)},0),Yle=(e,t,n)=>{let r;return n.forEach(a=>{const o=a.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},Ule=(e,t,n)=>{let r;return n.forEach(a=>{const o=a.getValue(e);o!=null&&(r=o)&&(r=o)}),r},zle=(e,t,n)=>{let r,a;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r===void 0?i>=i&&(r=a=i):(r>i&&(r=i),a{let n=0,r=0;if(t.forEach(a=>{let o=a.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},Wle=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!Fle(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),a=n.sort((o,i)=>o-i);return n.length%2!==0?a[r]:(a[r-1]+a[r])/2},$le=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Zle=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,qle=(e,t)=>t.length,QS={sum:Hle,min:Yle,max:Ule,extent:zle,mean:Vle,median:Wle,unique:$le,uniqueCount:Zle,count:qle},Gle={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:Ai("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,a,o;return(n=(r=(a=(o=e.columnDef.enableGrouping)!=null?o:!0)!=null?a: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 QS.sum;if(Object.prototype.toString.call(r)==="[object Date]")return QS.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return qw(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:QS[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 a;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((a=n.subRows)!=null&&a.length)}}};function Jle(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(i=>i.id===o)).filter(Boolean),...r]}const Kle={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ai("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Bt(n=>[zg(t,n)],n=>n.findIndex(r=>r.id===e.id),Ht(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=zg(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const a=zg(t,n);return((r=a[a.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=Bt(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>a=>{let o=[];if(!(t!=null&&t.length))o=a;else{const i=[...t],l=[...a];for(;l.length&&i.length;){const c=i.shift(),f=l.findIndex(h=>h.id===c);f>-1&&o.push(l.splice(f,1)[0])}o=[...o,...l]}return Jle(o,n,r)},Ht(e.options,"debugTable"))}},YT=0,UT=10,XS=()=>({pageIndex:YT,pageSize:UT}),Qle={getInitialState:e=>({...e,pagination:{...XS(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ai("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,a;if(!t){e._queue(()=>{t=!0});return}if((r=(a=e.options.autoResetAll)!=null?a:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const a=o=>Jc(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(a)},e.resetPagination=r=>{var a;e.setPagination(r?XS():(a=e.initialState.pagination)!=null?a:XS())},e.setPageIndex=r=>{e.setPagination(a=>{let o=Jc(r,a.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,i)),{...a,pageIndex:o}})},e.resetPageIndex=r=>{var a,o;e.setPageIndex(r?YT:(a=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?a:YT)},e.resetPageSize=r=>{var a,o;e.setPageSize(r?UT:(a=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?a:UT)},e.setPageSize=r=>{e.setPagination(a=>{const o=Math.max(1,Jc(r,a.pageSize)),i=a.pageSize*a.pageIndex,l=Math.floor(i/o);return{...a,pageIndex:l,pageSize:o}})},e.setPageCount=r=>e.setPagination(a=>{var o;let i=Jc(r,(o=e.options.pageCount)!=null?o:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...a,pageCount:i}}),e.getPageOptions=Bt(()=>[e.getPageCount()],r=>{let a=[];return r&&r>0&&(a=[...new Array(r)].fill(null).map((o,i)=>i)),a},Ht(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,a=e.getPageCount();return a===-1?!0:a===0?!1:re.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}}},eD=()=>({left:[],right:[]}),tD=()=>({top:[],bottom:[]}),Xle={getInitialState:e=>({columnPinning:eD(),rowPinning:tD(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ai("columnPinning",e),onRowPinningChange:Ai("rowPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(a=>a.id).filter(Boolean);t.setColumnPinning(a=>{var o,i;if(n==="right"){var l,c;return{left:((l=a==null?void 0:a.left)!=null?l:[]).filter(g=>!(r!=null&&r.includes(g))),right:[...((c=a==null?void 0:a.right)!=null?c:[]).filter(g=>!(r!=null&&r.includes(g))),...r]}}if(n==="left"){var f,h;return{left:[...((f=a==null?void 0:a.left)!=null?f:[]).filter(g=>!(r!=null&&r.includes(g))),...r],right:((h=a==null?void 0:a.right)!=null?h:[]).filter(g=>!(r!=null&&r.includes(g)))}}return{left:((o=a==null?void 0:a.left)!=null?o:[]).filter(g=>!(r!=null&&r.includes(g))),right:((i=a==null?void 0:a.right)!=null?i:[]).filter(g=>!(r!=null&&r.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var a,o,i;return((a=r.columnDef.enablePinning)!=null?a:!0)&&((o=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:r,right:a}=t.getState().columnPinning,o=n.some(l=>r==null?void 0:r.includes(l)),i=n.some(l=>a==null?void 0:a.includes(l));return o?"left":i?"right":!1},e.getPinnedIndex=()=>{var n,r;const a=e.getIsPinned();return a?(n=(r=t.getState().columnPinning)==null||(r=r[a])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.pin=(n,r,a)=>{const o=r?e.getLeafRows().map(c=>{let{id:f}=c;return f}):[],i=a?e.getParentRows().map(c=>{let{id:f}=c;return f}):[],l=new Set([...i,e.id,...o]);t.setRowPinning(c=>{var f,h;if(n==="bottom"){var g,y;return{top:((g=c==null?void 0:c.top)!=null?g:[]).filter(D=>!(l!=null&&l.has(D))),bottom:[...((y=c==null?void 0:c.bottom)!=null?y:[]).filter(D=>!(l!=null&&l.has(D))),...Array.from(l)]}}if(n==="top"){var w,S;return{top:[...((w=c==null?void 0:c.top)!=null?w:[]).filter(D=>!(l!=null&&l.has(D))),...Array.from(l)],bottom:((S=c==null?void 0:c.bottom)!=null?S:[]).filter(D=>!(l!=null&&l.has(D)))}}return{top:((f=c==null?void 0:c.top)!=null?f:[]).filter(D=>!(l!=null&&l.has(D))),bottom:((h=c==null?void 0:c.bottom)!=null?h:[]).filter(D=>!(l!=null&&l.has(D)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:a}=t.options;return typeof r=="function"?r(e):(n=r??a)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:a}=t.getState().rowPinning,o=n.some(l=>r==null?void 0:r.includes(l)),i=n.some(l=>a==null?void 0:a.includes(l));return o?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const a=e.getIsPinned();if(!a)return-1;const o=(n=t._getPinnedRows(a))==null?void 0:n.map(i=>{let{id:l}=i;return l});return(r=o==null?void 0:o.indexOf(e.id))!=null?r:-1},e.getCenterVisibleCells=Bt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,a)=>{const o=[...r??[],...a??[]];return n.filter(i=>!o.includes(i.column.id))},Ht(t.options,"debugRows")),e.getLeftVisibleCells=Bt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(i=>i.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Ht(t.options,"debugRows")),e.getRightVisibleCells=Bt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(i=>i.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Ht(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?eD():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:eD())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var a,o;return!!((a=r.left)!=null&&a.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Bt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),Ht(e.options,"debugColumns")),e.getRightLeafColumns=Bt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),Ht(e.options,"debugColumns")),e.getCenterLeafColumns=Bt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const a=[...n??[],...r??[]];return t.filter(o=>!a.includes(o.id))},Ht(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?tD():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:tD())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var a,o;return!!((a=r.top)!=null&&a.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=Bt(t=>[e.getRowModel().rows,e.getState().rowPinning[t],t],(t,n,r)=>{var a;return((a=e.options.keepPinnedRows)==null||a?(n??[]).map(i=>{const l=e.getRow(i,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(i=>t.find(l=>l.id===i))).filter(Boolean).map(i=>({...i,position:r}))},Ht(e.options,"debugRows")),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=Bt(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const a=new Set([...n??[],...r??[]]);return t.filter(o=>!a.has(o.id))},Ht(e.options,"debugRows"))}},eue={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ai("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},a=e.getPreGroupedRowModel().flatRows;return t?a.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):a.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),a={...n};return e.getRowModel().rows.forEach(o=>{zT(a,o.id,r,!0,e)}),a}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Bt(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?nD(e,n):{rows:[],flatRows:[],rowsById:{}},Ht(e.options,"debugTable")),e.getFilteredSelectedRowModel=Bt(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?nD(e,n):{rows:[],flatRows:[],rowsById:{}},Ht(e.options,"debugTable")),e.getGroupedSelectedRowModel=Bt(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?nD(e,n):{rows:[],flatRows:[],rowsById:{}},Ht(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(a=>a.getCanSelect()&&!n[a.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(a=>a.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(a=>!n[a.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n{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 a=e.getIsSelected();t.setRowSelection(o=>{var i;if(n=typeof n<"u"?n:!a,e.getCanSelect()&&a===n)return o;const l={...o};return zT(l,e.id,n,(i=r==null?void 0:r.selectChildren)!=null?i:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return LI(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return VT(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return VT(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 a;n&&e.toggleSelected((a=r.target)==null?void 0:a.checked)}}}},zT=(e,t,n,r,a)=>{var o;const i=a.getRow(t,!0);n?(i.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),i.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=i.subRows)!=null&&o.length&&i.getCanSelectSubRows()&&i.subRows.forEach(l=>zT(e,l.id,n,r,a))};function nD(e,t){const n=e.getState().rowSelection,r=[],a={},o=function(i,l){return i.map(c=>{var f;const h=LI(c,n);if(h&&(r.push(c),a[c.id]=c),(f=c.subRows)!=null&&f.length&&(c={...c,subRows:o(c.subRows)}),h)return c}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:a}}function LI(e,t){var n;return(n=t[e.id])!=null?n:!1}function VT(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let a=!0,o=!1;return e.subRows.forEach(i=>{if(!(o&&!a)&&(i.getCanSelect()&&(LI(i,t)?o=!0:a=!1),i.subRows&&i.subRows.length)){const l=VT(i,t);l==="all"?o=!0:(l==="some"&&(o=!0),a=!1)}}),a?"all":o?"some":!1}const WT=/([0-9]+)/gm,tue=(e,t,n)=>zF(td(e.getValue(n)).toLowerCase(),td(t.getValue(n)).toLowerCase()),nue=(e,t,n)=>zF(td(e.getValue(n)),td(t.getValue(n))),rue=(e,t,n)=>RI(td(e.getValue(n)).toLowerCase(),td(t.getValue(n)).toLowerCase()),aue=(e,t,n)=>RI(td(e.getValue(n)),td(t.getValue(n))),oue=(e,t,n)=>{const r=e.getValue(n),a=t.getValue(n);return r>a?1:rRI(e.getValue(n),t.getValue(n));function RI(e,t){return e===t?0:e>t?1:-1}function td(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function zF(e,t){const n=e.split(WT).filter(Boolean),r=t.split(WT).filter(Boolean);for(;n.length&&r.length;){const a=n.shift(),o=r.shift(),i=parseInt(a,10),l=parseInt(o,10),c=[i,l].sort();if(isNaN(c[0])){if(a>o)return 1;if(o>a)return-1;continue}if(isNaN(c[1]))return isNaN(i)?-1:1;if(i>l)return 1;if(l>i)return-1}return n.length-r.length}const up={alphanumeric:tue,alphanumericCaseSensitive:nue,text:rue,textCaseSensitive:aue,datetime:oue,basic:iue},sue={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ai("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const a of n){const o=a==null?void 0:a.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return up.datetime;if(typeof o=="string"&&(r=!0,o.split(WT).length>1))return up.alphanumeric}return r?up.text:up.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 qw(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:up[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const a=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(i=>{const l=i==null?void 0:i.find(w=>w.id===e.id),c=i==null?void 0:i.findIndex(w=>w.id===e.id);let f=[],h,g=o?n:a==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?l?h="toggle":h="add":i!=null&&i.length&&c!==i.length-1?h="replace":l?h="toggle":h="replace",h==="toggle"&&(o||a||(h="remove")),h==="add"){var y;f=[...i,{id:e.id,desc:g}],f.splice(0,f.length-((y=t.options.maxMultiSortColCount)!=null?y:Number.MAX_SAFE_INTEGER))}else h==="toggle"?f=i.map(w=>w.id===e.id?{...w,desc:g}:w):h==="remove"?f=i.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,a;const o=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(a=t.options.enableMultiRemove)!=null)||a)?!1:i==="desc"?"asc":"desc":o},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(a=>a.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(a=>a.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())}},lue={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ai("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 a=e.columns;return(n=a.length?a.some(o=>o.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=Bt(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ht(t.options,"debugRows")),e.getVisibleCells=Bt(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,a)=>[...n,...r,...a],Ht(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>Bt(()=>[r(),r().filter(a=>a.getIsVisible()).map(a=>a.id).join("_")],a=>a.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Ht(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((a,o)=>({...a,[o.id]:n||!(o.getCanHide!=null&&o.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 zg(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const gk=[jle,lue,Kle,Xle,Ble,sue,Gle,_le,Qle,eue,Lle];function uue(e){var t;e.debugAll||e.debugTable;let n={_features:gk};const r=n._features.reduce((h,g)=>Object.assign(h,g.getDefaultOptions==null?void 0:g.getDefaultOptions(n)),{}),a=h=>n.options.mergeOptions?n.options.mergeOptions(r,h):{...r,...h};let i={...{},...(t=e.initialState)!=null?t:{}};n._features.forEach(h=>{var g;i=(g=h.getInitialState==null?void 0:h.getInitialState(i))!=null?g:i});const l=[];let c=!1;const f={_features:gk,options:{...r,...e},initialState:i,_queue:h=>{l.push(h),c||(c=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();c=!1}).catch(g=>setTimeout(()=>{throw g})))},reset:()=>{n.setState(n.initialState)},setOptions:h=>{const g=Jc(h,n.options);n.options=a(g)},getState:()=>n.options.state,setState:h=>{n.options.onStateChange==null||n.options.onStateChange(h)},_getRowId:(h,g,y)=>{var w;return(w=n.options.getRowId==null?void 0:n.options.getRowId(h,g,y))!=null?w:`${y?[y.id,g].join("."):g}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(h,g)=>{let y=(g?n.getPrePaginationRowModel():n.getRowModel()).rowsById[h];if(!y&&(y=n.getCoreRowModel().rowsById[h],!y))throw new Error;return y},_getDefaultColumnDef:Bt(()=>[n.options.defaultColumn],h=>{var g;return h=(g=h)!=null?g:{},{header:y=>{const w=y.header.column.columnDef;return w.accessorKey?w.accessorKey:w.accessorFn?w.id:null},cell:y=>{var w,S;return(w=(S=y.renderValue())==null||S.toString==null?void 0:S.toString())!=null?w:null},...n._features.reduce((y,w)=>Object.assign(y,w.getDefaultColumnDef==null?void 0:w.getDefaultColumnDef()),{}),...h}},Ht(e,"debugColumns")),_getColumnDefs:()=>n.options.columns,getAllColumns:Bt(()=>[n._getColumnDefs()],h=>{const g=function(y,w,S){return S===void 0&&(S=0),y.map(D=>{const I=Ple(n,D,S,w),M=D;return I.columns=M.columns?g(M.columns,I,S+1):[],I})};return g(h)},Ht(e,"debugColumns")),getAllFlatColumns:Bt(()=>[n.getAllColumns()],h=>h.flatMap(g=>g.getFlatColumns()),Ht(e,"debugColumns")),_getAllFlatColumnsById:Bt(()=>[n.getAllFlatColumns()],h=>h.reduce((g,y)=>(g[y.id]=y,g),{}),Ht(e,"debugColumns")),getAllLeafColumns:Bt(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(h,g)=>{let y=h.flatMap(w=>w.getLeafColumns());return g(y)},Ht(e,"debugColumns")),getColumn:h=>n._getAllFlatColumnsById()[h]};Object.assign(n,f);for(let h=0;h{var i;return(i=o.getValue())!=null?i:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:a,getContext:Bt(()=>[e,n,t,o],(i,l,c,f)=>({table:i,column:l,row:c,cell:f,getValue:f.getValue,renderValue:f.renderValue}),Ht(e.options,"debugCells"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(o,n,t,e)},{}),o}const _I=(e,t,n,r,a,o,i)=>{let l={id:t,index:r,original:n,depth:a,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(l._valuesCache.hasOwnProperty(c))return l._valuesCache[c];const f=e.getColumn(c);if(f!=null&&f.accessorFn)return l._valuesCache[c]=f.accessorFn(l.original,r),l._valuesCache[c]},getUniqueValues:c=>{if(l._uniqueValuesCache.hasOwnProperty(c))return l._uniqueValuesCache[c];const f=e.getColumn(c);if(f!=null&&f.accessorFn)return f.columnDef.getUniqueValues?(l._uniqueValuesCache[c]=f.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[c]):(l._uniqueValuesCache[c]=[l.getValue(c)],l._uniqueValuesCache[c])},renderValue:c=>{var f;return(f=l.getValue(c))!=null?f:e.options.renderFallbackValue},subRows:o??[],getLeafRows:()=>Ole(l.subRows,c=>c.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let c=[],f=l;for(;;){const h=f.getParentRow();if(!h)break;c.push(h),f=h}return c.reverse()},getAllCells:Bt(()=>[e.getAllLeafColumns()],c=>c.map(f=>cue(e,l,f,f.id)),Ht(e.options,"debugRows")),_getAllCellsByColumnId:Bt(()=>[l.getAllCells()],c=>c.reduce((f,h)=>(f[h.column.id]=h,f),{}),Ht(e.options,"debugRows"))};for(let c=0;cBt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(a,o,i){o===void 0&&(o=0);const l=[];for(let f=0;fe._autoResetPageIndex()))}function VF(e,t,n){return n.options.filterFromLeafRows?fue(e,t,n):hue(e,t,n)}function fue(e,t,n){var r;const a=[],o={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(c,f){f===void 0&&(f=0);const h=[];for(let y=0;yBt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let y=0;y{var w;const S=e.getColumn(y.id);if(!S)return;const D=S.getFilterFn();D&&a.push({id:y.id,filterFn:D,resolvedValue:(w=D.resolveFilterValue==null?void 0:D.resolveFilterValue(y.value))!=null?w:y.value})});const i=n.map(y=>y.id),l=e.getGlobalFilterFn(),c=e.getAllLeafColumns().filter(y=>y.getCanGlobalFilter());r&&l&&c.length&&(i.push("__global__"),c.forEach(y=>{var w;o.push({id:y.id,filterFn:l,resolvedValue:(w=l.resolveFilterValue==null?void 0:l.resolveFilterValue(r))!=null?w:r})}));let f,h;for(let y=0;y{w.columnFiltersMeta[D]=I})}if(o.length){for(let S=0;S{w.columnFiltersMeta[D]=I})){w.columnFilters.__global__=!0;break}}w.columnFilters.__global__!==!0&&(w.columnFilters.__global__=!1)}}const g=y=>{for(let w=0;we._autoResetPageIndex()))}function mue(){return(e,t)=>Bt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,a)=>{if(!n.rows.length||!(r!=null&&r.length)&&!a)return n;const o=[...r.map(l=>l.id).filter(l=>l!==t),a?"__global__":void 0].filter(Boolean),i=l=>{for(let c=0;cBt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let o=0;oBt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{var r;if(!n)return;const a=(r=n.flatRows[0])==null?void 0:r.getUniqueValues(t);if(typeof a>"u")return;let o=[a,a];for(let i=0;io[1]&&(o[1]=f)}}return o},Ht(e.options,"debugTable"))}function yue(){return e=>Bt(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,a=[],o=r.filter(c=>{var f;return(f=e.getColumn(c.id))==null?void 0:f.getCanSort()}),i={};o.forEach(c=>{const f=e.getColumn(c.id);f&&(i[c.id]={sortUndefined:f.columnDef.sortUndefined,invertSorting:f.columnDef.invertSorting,sortingFn:f.getSortingFn()})});const l=c=>{const f=c.map(h=>({...h}));return f.sort((h,g)=>{for(let w=0;w{var g;a.push(h),(g=h.subRows)!=null&&g.length&&(h.subRows=l(h.subRows))}),f};return{rows:l(n.rows),flatRows:a,rowsById:n.rowsById}},Ht(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function wue(e){const t=[],n=r=>{var a;t.push(r),(a=r.subRows)!=null&&a.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function bue(e){return t=>Bt(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:a,pageIndex:o}=n;let{rows:i,flatRows:l,rowsById:c}=r;const f=a*o,h=f+a;i=i.slice(f,h);let g;t.options.paginateExpandedRows?g={rows:i,flatRows:l,rowsById:c}:g=wue({rows:i,flatRows:l,rowsById:c}),g.flatRows=[];const y=w=>{g.flatRows.push(w),w.subRows.length&&w.subRows.forEach(y)};return g.rows.forEach(y),g},Ht(t.options,"debugTable"))}function vk(e,t){return e?Sue(e)?P.createElement(e,t):e:null}function Sue(e){return Due(e)||typeof e=="function"||Tue(e)}function Due(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Tue(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Iue(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=P.useState(()=>({current:uue(t)})),[r,a]=P.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:i=>{a(i),e.onStateChange==null||e.onStateChange(i)}})),n.current}const WF={À:"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"},Eue=Object.keys(WF).join("|"),Cue=new RegExp(Eue,"g");function xue(e){return e.replace(Cue,t=>WF[t])}const Qo={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function Mue(e,t,n){var r;if(n=n||{},n.threshold=(r=n.threshold)!=null?r:Qo.MATCHES,!n.accessors){const i=yk(e,t,n);return{rankedValue:e,rank:i,accessorIndex:-1,accessorThreshold:n.threshold,passed:i>=n.threshold}}const a=Oue(e,n.accessors),o={rankedValue:e,rank:Qo.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let i=0;i=Qo.MATCHES?c=f:c>h&&(c=h),c=Math.min(c,h),c>=g&&c>o.rank&&(o.rank=c,o.passed=!0,o.accessorIndex=i,o.accessorThreshold=g,o.rankedValue=l.itemValue)}return o}function yk(e,t,n){return e=wk(e,n),t=wk(t,n),t.length>e.length?Qo.NO_MATCH:e===t?Qo.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase(),t=t.toLowerCase(),e===t?Qo.EQUAL:e.startsWith(t)?Qo.STARTS_WITH:e.includes(` ${t}`)?Qo.WORD_STARTS_WITH:e.includes(t)?Qo.CONTAINS:t.length===1?Qo.NO_MATCH:kue(e).includes(t)?Qo.ACRONYM:Nue(e,t))}function kue(e){let t="";return e.split(" ").forEach(r=>{r.split("-").forEach(o=>{t+=o.substr(0,1)})}),t}function Nue(e,t){let n=0,r=0;function a(c,f,h){for(let g=h,y=f.length;g-1))return Qo.NO_MATCH}const l=r-i;return o(l)}function Aue(e,t){return e.rank===t.rank?0:e.rank>t.rank?-1:1}function wk(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=xue(e)),e}function Fue(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 Oue(e,t){const n=[];for(let r=0,a=t.length;rObject.assign({},jue,e);let _ue=class extends Error{constructor(t){super(t),this.name="CsvGenerationError"}},Bue=class extends Error{constructor(t){super(t),this.name="EmptyHeadersError"}};var Kv=e=>e,Us=e=>e,qb=Kv,Ep=Kv,Sk=Kv,Dk=Kv,Hue=function(e,t){return t=='"'&&e.indexOf('"')>-1?e.replace(/"/g,'""'):e},Yue=e=>Sk(typeof e=="object"?e.key:e),Uue=e=>Dk(typeof e=="object"?e.displayLabel:e),zue=(e,...t)=>t.reduce((n,r)=>r(n),e),Vue=e=>t=>e.useBom?qb(Us(t)+Rue):t,Wue=e=>t=>e.showTitle?BI(qb(Us(t)+e.title))(Ep("")):t,BI=e=>t=>qb(Us(e)+Us(t)+Lue),ZF=e=>(t,n)=>$ue(e)(Ep(t+n)),$ue=e=>t=>Kv(Us(t)+e.fieldSeparator),Zue=(e,t)=>n=>{if(!e.showColumnHeaders)return n;if(t.length<1)throw new Bue("Option to show headers but none supplied. Make sure there are keys in your collection or that you've supplied headers through the config options.");let r=Ep("");for(let a=0;ar=>{let a=r;for(var o=0;o"u"?e.replaceUndefinedWith:n[o][Us(c)];i=ZF(e)(i,qF(e,f))}i=Ep(Us(i).slice(0,-1)),a=BI(a)(i)}return a},Gue=Us,Tk=e=>+e===e&&(!isFinite(e)||!!(e%1)),qF=(e,t)=>{if(e.decimalSeparator==="locale"&&Tk(t))return t.toLocaleString();if(e.decimalSeparator!=="."&&Tk(t))return t.toString().replace(".",e.decimalSeparator);if(typeof t=="string"){let n=t;return(e.quoteStrings||e.fieldSeparator&&t.indexOf(e.fieldSeparator)>-1||e.quoteCharacter&&t.indexOf(e.quoteCharacter)>-1||t.indexOf(` `)>-1||t.indexOf("\r")>-1)&&(n=e.quoteCharacter+Hue(t,e.quoteCharacter)+e.quoteCharacter),n}if(typeof t=="boolean"&&e.boolDisplay){const n=t?"true":"false";return e.boolDisplay[n]}return t},Jue=e=>t=>{const n=$F(e),r=n.useKeysAsHeaders?Object.keys(t[0]):n.columnHeaders;let a=zue(qb(""),Vue(n),Wue(n),Zue(n,r),que(n,r,t));if(Us(a).length<1)throw new _ue("Output is empty. Is your data formatted correctly?");return a};const Kue=({thino:e})=>{const t=P.useRef(null);P.useEffect(()=>(t.current&&x.setIcon(t.current,"pin"),()=>{t.current&&(t.current=null)}),[t]);const n=P.useCallback(async()=>{e.pinned?await be.unpinMemoById(e.id):await be.pinMemoById(e.id)},[e]);return v.jsx("span",{ref:t,className:ar("pinned-status",e.pinned?"pinned":"not-pinned"),onClick:n})},Que=({thino:e})=>{var r;const t=P.useRef(null);P.useEffect(()=>(t.current&&x.setIcon(t.current,e.thinoType==="JOURNAL"?"calendar":"check-square"),()=>{t.current&&(t.current=null)}),[t,e==null?void 0:e.thinoType]);const n=P.useCallback(async()=>{if(e.thinoType==="JOURNAL")return;const a=await be.updateMemo(e.id,e.content,e.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");a&&be.editMemo(a)},[e]);return v.jsx(v.Fragment,{children:e.thinoType!=="JOURNAL"?v.jsx("input",{className:ar("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":(r=e.thinoType)==null?void 0:r.slice(5),onClick:n}):v.jsx("span",{ref:t,className:"thino-type-status"})})},Xue=({id:e,path:t})=>{const n=P.useRef(null);P.useEffect(()=>(n.current&&x.setIcon(n.current,"link"),()=>{n.current&&(n.current=null)}),[]);const r=P.useCallback(()=>{!e||!t||be.openThinoByID(e)},[e,t]);return v.jsxs("span",{className:"source-thino",onClick:r,children:[v.jsx("span",{children:t}),v.jsx("span",{ref:n,className:"source-thino-icon"})]})},ece=({id:e,sourceType:t})=>{const n=P.useRef(null);P.useEffect(()=>{var a;return n.current&&x.setIcon(n.current,((a=Gg.find(o=>o.title===t))==null?void 0:a.icon)||"list"),()=>{n.current&&(n.current=null)}},[]);const r=P.useCallback(async()=>{e&&await be.openThinoByID(e)},[e]);return v.jsx("span",{ref:n,className:"source-type-icon",onClick:r})},Ik=(e,t,n,r)=>{const a=Mue(e.getValue(t),n);return r({itemRank:a}),a.passed},Ek=(e,t,n)=>{var a,o;let r=0;return e.columnFiltersMeta[n]&&(r=Aue((a=e.columnFiltersMeta[n])==null?void 0:a.itemRank,(o=t.columnFiltersMeta[n])==null?void 0:o.itemRank)),r===0?up.alphanumeric(e,t,n):r},tce=$F({fieldSeparator:",",decimalSeparator:".",useKeysAsHeaders:!0}),nce=e=>e+` `;function rce({thinos:e,isFiltering:t}){var w;ne.useReducer(()=>({}),{})[1];const[n,r]=ne.useState([]),[a,o]=ne.useState(""),i=ne.useMemo(()=>[{header:E("Basic Info"),footer:S=>S.column.id,columns:[{accessorKey:"createdAt",header:()=>v.jsx("span",{className:"create-at-header-cell",children:E("Created At")}),cell:S=>S.getValue(),footer:S=>S.column.id,enableColumnFilter:!1},{accessorFn:S=>S.content,id:"content",header:()=>v.jsx("span",{className:"thino-header-cell",children:E("Thino")}),cell:S=>v.jsx(ai,{memo:S.row.original,type:"table"}),footer:S=>S.column.id,filterFn:"fuzzy",sortingFn:Ek},{accessorFn:S=>S.thinoType,id:"thinoType",cell:S=>v.jsx(Que,{thino:S.row.original}),header:()=>v.jsx("span",{children:E("Thino Type")}),footer:S=>S.column.id},{accessorFn:S=>S.sourceType,id:"sourceType",cell:S=>v.jsx(ece,{id:S.row.original.id,sourceType:S.getValue()}),header:()=>v.jsx("span",{children:E("Source Type")}),footer:S=>S.column.id}]},{header:E("Additional Info"),footer:S=>S.column.id,columns:[{accessorKey:"pinned",header:()=>v.jsx("span",{children:E("Pinned Status")}),cell:S=>v.jsx(Kue,{thino:S.row.original}),footer:S=>S.column.id,filterFn:"fuzzy",sortingFn:Ek},{accessorKey:"rowStatus",header:()=>v.jsx("span",{children:E("Row status")}),cell:S=>v.jsx("span",{children:S.getValue()==="NORMAL"?"":S.getValue()}),footer:S=>S.column.id},{accessorKey:"path",header:()=>E("Path"),cell:S=>v.jsx(Xue,{id:S.row.original.id,path:S.getValue()}),footer:S=>S.column.id}]}],[]),[l,c]=ne.useState(()=>e),f=()=>c(S=>e);P.useEffect(()=>{f()},[e]);const h=Iue({data:l,columns:i,filterFns:{fuzzy:Ik},initialState:{pagination:{pageSize:20}},state:{columnFilters:n,globalFilter:a},onColumnFiltersChange:r,onGlobalFilterChange:o,globalFilterFn:Ik,getCoreRowModel:due(),getFilteredRowModel:pue(),getSortedRowModel:yue(),getPaginationRowModel:bue(),getFacetedRowModel:mue(),getFacetedUniqueValues:gue(),getFacetedMinMaxValues:vue(),debugTable:!1,debugHeaders:!1,debugColumns:!1});ne.useEffect(()=>{var S,D;((S=h.getState().columnFilters[0])==null?void 0:S.id)==="createdAt"&&((D=h.getState().sorting[0])==null?void 0:D.id)!=="createdAt"&&h.setSorting([{id:"createdAt",desc:!1}])},[(w=h.getState().columnFilters[0])==null?void 0:w.id]);async function g(S,D){const I=E("Created At"),M=E("Updated At"),N=E("Content"),R=E("Path"),k=S.map(Y=>({[I]:Y.createdAt,[M]:Y.updatedAt,[N]:Y.content,Thino:`=hyperlink("obsidian://thino?openId=${Y.id}","${Y.id}")`,[R]:`=hyperlink("obsidian://open?path=${x.normalizePath(Y.path)},"${Y.path}")`})),B=Jue(tce)(k),L=ft.getState().app||window.app,_=nce(Gue(B));return{file:await L.vault.create(`${D}-${ut.randomId(6)}.csv`,_),app:L}}async function y(S){const{file:D,app:I}=await g(S.map(R=>R.original),"thino-export"),M=document.createDocumentFragment(),N=M.createEl("div",{cls:"export-file-btn-group"});M.createEl("div",{cls:"open-file-button"}),new x.Setting(N).setName(E("Exported CSV file")).addButton(R=>{R.setButtonText(E("Open File")).onClick(()=>{const k=x.normalizePath(D.path);I.openWithDefaultApp(k)})}),new x.Notice(M)}return v.jsxs("div",{className:"table-view",children:[v.jsxs("div",{children:[v.jsx(fw,{value:a||"",onChange:S=>o(String(S)),className:"table-search-bar",placeholder:E("Search all columns...")}),x.Platform.isDesktop&&(a||n.length>0||t)&&v.jsx("button",{className:"mod-cta",disabled:h.getPrePaginationRowModel().rows.length===0,onClick:()=>y(h.getPrePaginationRowModel().rows),children:E("Export to CSV")})]}),v.jsxs("table",{className:"thino-table",children:[v.jsx("thead",{children:h.getHeaderGroups().map(S=>v.jsx("tr",{children:S.headers.map(D=>v.jsx("th",{colSpan:D.colSpan,children:D.isPlaceholder?null:v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:ar(D.column.getCanSort()?"filter-header":"","table-header",D.column.id==="content"?"content-header":""),onClick:D.column.getToggleSortingHandler(),children:[vk(D.column.columnDef.header,D.getContext()),{asc:" 🔼",desc:" 🔽"}[D.column.getIsSorted()]??null]}),D.column.getCanFilter()?v.jsx(oce,{column:D.column,table:h}):null]})},D.id))},S.id))}),v.jsx("tbody",{children:h.getRowModel().rows.map(S=>v.jsx("tr",{className:ar(S.getValue("pinned")?"pinned":""),children:S.getVisibleCells().map(D=>v.jsx("td",{children:vk(D.column.columnDef.cell,D.getContext())},D.id))},S.id))})]}),v.jsxs("div",{className:"table-nav-bar",children:[v.jsx("button",{className:"prev-start-btn",onClick:()=>h.setPageIndex(0),disabled:!h.getCanPreviousPage(),children:"<<"}),v.jsx("button",{className:"prev-btn",onClick:()=>h.previousPage(),disabled:!h.getCanPreviousPage(),children:"<"}),v.jsx("button",{className:"next-btn",onClick:()=>h.nextPage(),disabled:!h.getCanNextPage(),children:">"}),v.jsx("button",{className:"next-end-btn",onClick:()=>h.setPageIndex(h.getPageCount()-1),disabled:!h.getCanNextPage(),children:">>"}),v.jsxs("span",{className:"table-page-info",children:[v.jsx("div",{children:E("Page")}),v.jsxs("strong",{children:[h.getState().pagination.pageIndex+1," of ",h.getPageCount()]})]}),v.jsxs("span",{className:"table-page-jump",children:["| ",E("Go to page"),":",v.jsx("input",{type:"number",defaultValue:h.getState().pagination.pageIndex+1,onChange:S=>{const D=S.target.value?Number(S.target.value)-1:0;h.setPageIndex(D)},className:"jump-inputer"})]}),v.jsx("select",{value:h.getState().pagination.pageSize,onChange:S=>{h.setPageSize(Number(S.target.value))},children:[10,20,30,40,50].map(S=>v.jsxs("option",{value:S,children:[E("Show")," ",S," ",E("rows")]},S))})]})]})}const ace=e=>e==="sourceType"?["ALL"]:["ALL","ALL-TASK"];function oce({column:e,table:t}){var o,i,l,c,f,h,g,y,w;const n=(o=t.getPreFilteredRowModel().flatRows[0])==null?void 0:o.getValue(e.id),r=e.getFilterValue(),a=ne.useMemo(()=>typeof n=="number"?[]:Array.from(e.getFacetedUniqueValues().keys()).sort(),[e.getFacetedUniqueValues()]);return typeof n=="number"?v.jsx("div",{children:v.jsxs("div",{className:"filter-input-group",children:[v.jsx(fw,{type:"number",min:Number(((i=e.getFacetedMinMaxValues())==null?void 0:i[0])??""),max:Number(((l=e.getFacetedMinMaxValues())==null?void 0:l[1])??""),value:(r==null?void 0:r[0])??"",onChange:S=>e.setFilterValue(D=>[S,D==null?void 0:D[1]]),placeholder:`Min ${(c=e.getFacetedMinMaxValues())!=null&&c[0]?`(${(f=e.getFacetedMinMaxValues())==null?void 0:f[0]})`:""}`,className:"filter-input-short"}),v.jsx(fw,{type:"number",min:Number(((h=e.getFacetedMinMaxValues())==null?void 0:h[0])??""),max:Number(((g=e.getFacetedMinMaxValues())==null?void 0:g[1])??""),value:(r==null?void 0:r[1])??"",onChange:S=>e.setFilterValue(D=>[D==null?void 0:D[0],S]),placeholder:`Max ${(y=e.getFacetedMinMaxValues())!=null&&y[1]?`(${(w=e.getFacetedMinMaxValues())==null?void 0:w[1]})`:""}`,className:"filter-input-short"})]})}):v.jsx(v.Fragment,{children:a.length>1?v.jsxs(v.Fragment,{children:[e.id!=="path"&&e.id!=="content"&&e.id!=="thinoType"&&e.id!=="sourceType"&&v.jsx("datalist",{id:e.id+"list",children:a.slice(0,5e3).map(S=>v.jsx("option",{value:S},S))}),e.id==="thinoType"||e.id==="sourceType"?v.jsx("select",{id:e.id,onChange:S=>e.setFilterValue(S.target.value==="ALL"?"":S.target.value==="ALL-TASK"?"TASK":S.target.value),children:[...ace(e.id),...a].map(S=>v.jsx("option",{value:S,children:E(S)||S},S))}):"",e.id!=="thinoType"&&e.id!=="sourceType"?v.jsx(fw,{type:"text",value:r??"",onChange:S=>e.setFilterValue(S),placeholder:`Search... (${e.getFacetedUniqueValues().size})`,className:"filter-input-long",list:e.id+"list"}):""]}):""})}function fw({value:e,onChange:t,debounce:n=500,...r}){const[a,o]=ne.useState(e);return ne.useEffect(()=>{o(e)},[e]),ne.useEffect(()=>{const i=setTimeout(()=>{t(a)},n);return()=>clearTimeout(i)},[a]),v.jsx("input",{...r,value:a,onChange:i=>o(i.target.value)})}function ice(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var a=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");a.setAttribute("name",e),a.setAttribute("content",t),r.head.appendChild(a)}}catch{}}function sce(){ice("react-scroll-to-bottom:version","4.2.0")}var Tg=function(e){return e&&e.Math===Math&&e},Za=Tg(typeof globalThis=="object"&&globalThis)||Tg(typeof window=="object"&&window)||Tg(typeof self=="object"&&self)||Tg(typeof dr=="object"&&dr)||Tg(typeof dr=="object"&&dr)||function(){return this}()||Function("return this")(),da=function(e){try{return!!e()}catch{return!0}},lce=da,Gb=!lce(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),uce=Gb,GF=Function.prototype,Ck=GF.apply,xk=GF.call,HI=typeof Reflect=="object"&&Reflect.apply||(uce?xk.bind(Ck):function(){return xk.apply(Ck,arguments)}),JF=Gb,KF=Function.prototype,$T=KF.call,cce=JF&&KF.bind.bind($T,$T),fa=JF?cce:function(e){return function(){return $T.apply(e,arguments)}},QF=fa,dce=QF({}.toString),fce=QF("".slice),Xp=function(e){return fce(dce(e),8,-1)},hce=Xp,pce=fa,YI=function(e){if(hce(e)==="Function")return pce(e)},rD=typeof document=="object"&&document.all,co=typeof rD>"u"&&rD!==void 0?function(e){return typeof e=="function"||e===rD}:function(e){return typeof e=="function"},Qv={},mce=da,ii=!mce(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),gce=Gb,j0=Function.prototype.call,tu=gce?j0.bind(j0):function(){return j0.apply(j0,arguments)},UI={},XF={}.propertyIsEnumerable,e9=Object.getOwnPropertyDescriptor,vce=e9&&!XF.call({1:2},1);UI.f=vce?function(t){var n=e9(this,t);return!!n&&n.enumerable}:XF;var Xv=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},yce=fa,wce=da,bce=Xp,aD=Object,Sce=yce("".split),t9=wce(function(){return!aD("z").propertyIsEnumerable(0)})?function(e){return bce(e)==="String"?Sce(e,""):aD(e)}:aD,zI=function(e){return e==null},Dce=zI,Tce=TypeError,VI=function(e){if(Dce(e))throw new Tce("Can't call method on "+e);return e},Ice=t9,Ece=VI,nu=function(e){return Ice(Ece(e))},Cce=co,Ku=function(e){return typeof e=="object"?e!==null:Cce(e)},qa={},oD=qa,iD=Za,xce=co,Mk=function(e){return xce(e)?e:void 0},ru=function(e,t){return arguments.length<2?Mk(oD[e])||Mk(iD[e]):oD[e]&&oD[e][t]||iD[e]&&iD[e][t]},Mce=fa,Qu=Mce({}.isPrototypeOf),n9=typeof navigator<"u"&&String(navigator.userAgent)||"",r9=Za,sD=n9,kk=r9.process,Nk=r9.Deno,Ak=kk&&kk.versions||Nk&&Nk.version,Fk=Ak&&Ak.v8,Rs,Gw;Fk&&(Rs=Fk.split("."),Gw=Rs[0]>0&&Rs[0]<4?1:+(Rs[0]+Rs[1]));!Gw&&sD&&(Rs=sD.match(/Edge\/(\d+)/),(!Rs||Rs[1]>=74)&&(Rs=sD.match(/Chrome\/(\d+)/),Rs&&(Gw=+Rs[1])));var WI=Gw,Ok=WI,kce=da,Nce=Za,Ace=Nce.String,em=!!Object.getOwnPropertySymbols&&!kce(function(){var e=Symbol("symbol detection");return!Ace(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ok&&Ok<41}),Fce=em,a9=Fce&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Oce=ru,Pce=co,jce=Qu,Lce=a9,Rce=Object,ey=Lce?function(e){return typeof e=="symbol"}:function(e){var t=Oce("Symbol");return Pce(t)&&jce(t.prototype,Rce(e))},_ce=String,Jb=function(e){try{return _ce(e)}catch{return"Object"}},Bce=co,Hce=Jb,Yce=TypeError,$I=function(e){if(Bce(e))return e;throw new Yce(Hce(e)+" is not a function")},Uce=$I,zce=zI,ZI=function(e,t){var n=e[t];return zce(n)?void 0:Uce(n)},lD=tu,uD=co,cD=Ku,Vce=TypeError,Wce=function(e,t){var n,r;if(t==="string"&&uD(n=e.toString)&&!cD(r=lD(n,e))||uD(n=e.valueOf)&&!cD(r=lD(n,e))||t!=="string"&&uD(n=e.toString)&&!cD(r=lD(n,e)))return r;throw new Vce("Can't convert object to primitive value")},o9={exports:{}},Pk=Za,$ce=Object.defineProperty,Zce=function(e,t){try{$ce(Pk,e,{value:t,configurable:!0,writable:!0})}catch{Pk[e]=t}return t},qce=Za,Gce=Zce,jk="__core-js_shared__",Lk=o9.exports=qce[jk]||Gce(jk,{});(Lk.versions||(Lk.versions=[])).push({version:"3.37.0",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE",source:"https://github.com/zloirock/core-js"});var qI=o9.exports,Rk=qI,tm=function(e,t){return Rk[e]||(Rk[e]=t||{})},Jce=VI,Kce=Object,Xu=function(e){return Kce(Jce(e))},Qce=fa,Xce=Xu,ede=Qce({}.hasOwnProperty),Fi=Object.hasOwn||function(t,n){return ede(Xce(t),n)},tde=fa,nde=0,rde=Math.random(),ade=tde(1 .toString),GI=function(e){return"Symbol("+(e===void 0?"":e)+")_"+ade(++nde+rde,36)},ode=Za,ide=tm,_k=Fi,sde=GI,lde=em,ude=a9,fp=ode.Symbol,dD=ide("wks"),cde=ude?fp.for||fp:fp&&fp.withoutSetter||sde,Na=function(e){return _k(dD,e)||(dD[e]=lde&&_k(fp,e)?fp[e]:cde("Symbol."+e)),dD[e]},dde=tu,Bk=Ku,Hk=ey,fde=ZI,hde=Wce,pde=Na,mde=TypeError,gde=pde("toPrimitive"),vde=function(e,t){if(!Bk(e)||Hk(e))return e;var n=fde(e,gde),r;if(n){if(t===void 0&&(t="default"),r=dde(n,e,t),!Bk(r)||Hk(r))return r;throw new mde("Can't convert object to primitive value")}return t===void 0&&(t="number"),hde(e,t)},yde=vde,wde=ey,JI=function(e){var t=yde(e,"string");return wde(t)?t:t+""},bde=Za,Yk=Ku,ZT=bde.document,Sde=Yk(ZT)&&Yk(ZT.createElement),i9=function(e){return Sde?ZT.createElement(e):{}},Dde=ii,Tde=da,Ide=i9,s9=!Dde&&!Tde(function(){return Object.defineProperty(Ide("div"),"a",{get:function(){return 7}}).a!==7}),Ede=ii,Cde=tu,xde=UI,Mde=Xv,kde=nu,Nde=JI,Ade=Fi,Fde=s9,Uk=Object.getOwnPropertyDescriptor;Qv.f=Ede?Uk:function(t,n){if(t=kde(t),n=Nde(n),Fde)try{return Uk(t,n)}catch{}if(Ade(t,n))return Mde(!Cde(xde.f,t,n),t[n])};var Ode=da,Pde=co,jde=/#|\.prototype\./,ty=function(e,t){var n=Rde[Lde(e)];return n===Bde?!0:n===_de?!1:Pde(t)?Ode(t):!!t},Lde=ty.normalize=function(e){return String(e).replace(jde,".").toLowerCase()},Rde=ty.data={},_de=ty.NATIVE="N",Bde=ty.POLYFILL="P",Hde=ty,zk=YI,Yde=$I,Ude=Gb,zde=zk(zk.bind),KI=function(e,t){return Yde(e),t===void 0?e:Ude?zde(e,t):function(){return e.apply(t,arguments)}},$s={},Vde=ii,Wde=da,l9=Vde&&Wde(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),$de=Ku,Zde=String,qde=TypeError,sd=function(e){if($de(e))return e;throw new qde(Zde(e)+" is not an object")},Gde=ii,Jde=s9,Kde=l9,L0=sd,Vk=JI,Qde=TypeError,fD=Object.defineProperty,Xde=Object.getOwnPropertyDescriptor,hD="enumerable",pD="configurable",mD="writable";$s.f=Gde?Kde?function(t,n,r){if(L0(t),n=Vk(n),L0(r),typeof t=="function"&&n==="prototype"&&"value"in r&&mD in r&&!r[mD]){var a=Xde(t,n);a&&a[mD]&&(t[n]=r.value,r={configurable:pD in r?r[pD]:a[pD],enumerable:hD in r?r[hD]:a[hD],writable:!1})}return fD(t,n,r)}:fD:function(t,n,r){if(L0(t),n=Vk(n),L0(r),Jde)try{return fD(t,n,r)}catch{}if("get"in r||"set"in r)throw new Qde("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var efe=ii,tfe=$s,nfe=Xv,Kb=efe?function(e,t,n){return tfe.f(e,t,nfe(1,n))}:function(e,t,n){return e[t]=n,e},Ig=Za,rfe=HI,afe=YI,ofe=co,ife=Qv.f,sfe=Hde,tp=qa,lfe=KI,np=Kb,Wk=Fi,ufe=function(e){var t=function(n,r,a){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,a)}return rfe(e,this,arguments)};return t.prototype=e.prototype,t},Gn=function(e,t){var n=e.target,r=e.global,a=e.stat,o=e.proto,i=r?Ig:a?Ig[n]:Ig[n]&&Ig[n].prototype,l=r?tp:tp[n]||np(tp,n,{})[n],c=l.prototype,f,h,g,y,w,S,D,I,M;for(y in t)f=sfe(r?y:n+(a?".":"#")+y,e.forced),h=!f&&i&&Wk(i,y),S=l[y],h&&(e.dontCallGetSet?(M=ife(i,y),D=M&&M.value):D=i[y]),w=h&&D?D:t[y],!(!f&&!o&&typeof S==typeof w)&&(e.bind&&h?I=lfe(w,Ig):e.wrap&&h?I=ufe(w):o&&ofe(w)?I=afe(w):I=w,(e.sham||w&&w.sham||S&&S.sham)&&np(I,"sham",!0),np(l,y,I),o&&(g=n+"Prototype",Wk(tp,g)||np(tp,g,{}),np(tp[g],y,w),e.real&&c&&(f||!c[y])&&np(c,y,w)))},cfe=Xp,nm=Array.isArray||function(t){return cfe(t)==="Array"},dfe=Gn,ffe=nm;dfe({target:"Array",stat:!0},{isArray:ffe});var hfe=qa,pfe=hfe.Array.isArray,mfe=pfe,u9=mfe,gfe=u9,vfe=gfe,yfe=vfe,wfe=yfe,bfe=wfe;const c9=qt(bfe);function Sfe(e){if(c9(e))return e}var Dfe=Math.ceil,Tfe=Math.floor,Ife=Math.trunc||function(t){var n=+t;return(n>0?Tfe:Dfe)(n)},Efe=Ife,Qb=function(e){var t=+e;return t!==t||t===0?0:Efe(t)},Cfe=Qb,xfe=Math.min,Mfe=function(e){var t=Cfe(e);return t>0?xfe(t,9007199254740991):0},kfe=Mfe,Ff=function(e){return kfe(e.length)},Nfe=TypeError,Afe=9007199254740991,QI=function(e){if(e>Afe)throw Nfe("Maximum allowed index exceeded");return e},Ffe=ii,Ofe=$s,Pfe=Xv,ny=function(e,t,n){Ffe?Ofe.f(e,t,Pfe(0,n)):e[t]=n},jfe=Na,Lfe=jfe("toStringTag"),d9={};d9[Lfe]="z";var XI=String(d9)==="[object z]",Rfe=XI,_fe=co,hw=Xp,Bfe=Na,Hfe=Bfe("toStringTag"),Yfe=Object,Ufe=hw(function(){return arguments}())==="Arguments",zfe=function(e,t){try{return e[t]}catch{}},ry=Rfe?hw:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=zfe(t=Yfe(e),Hfe))=="string"?n:Ufe?hw(t):(r=hw(t))==="Object"&&_fe(t.callee)?"Arguments":r},Vfe=fa,Wfe=co,qT=qI,$fe=Vfe(Function.toString);Wfe(qT.inspectSource)||(qT.inspectSource=function(e){return $fe(e)});var Zfe=qT.inspectSource,qfe=fa,Gfe=da,f9=co,Jfe=ry,Kfe=ru,Qfe=Zfe,h9=function(){},p9=Kfe("Reflect","construct"),eE=/^\s*(?:class|function)\b/,Xfe=qfe(eE.exec),ehe=!eE.test(h9),Eg=function(t){if(!f9(t))return!1;try{return p9(h9,[],t),!0}catch{return!1}},m9=function(t){if(!f9(t))return!1;switch(Jfe(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ehe||!!Xfe(eE,Qfe(t))}catch{return!0}};m9.sham=!0;var tE=!p9||Gfe(function(){var e;return Eg(Eg.call)||!Eg(Object)||!Eg(function(){e=!0})||e})?m9:Eg,$k=nm,the=tE,nhe=Ku,rhe=Na,ahe=rhe("species"),Zk=Array,ohe=function(e){var t;return $k(e)&&(t=e.constructor,the(t)&&(t===Zk||$k(t.prototype))?t=void 0:nhe(t)&&(t=t[ahe],t===null&&(t=void 0))),t===void 0?Zk:t},ihe=ohe,nE=function(e,t){return new(ihe(e))(t===0?0:t)},she=da,lhe=Na,uhe=WI,che=lhe("species"),Xb=function(e){return uhe>=51||!she(function(){var t=[],n=t.constructor={};return n[che]=function(){return{foo:1}},t[e](Boolean).foo!==1})},dhe=Gn,fhe=da,hhe=nm,phe=Ku,mhe=Xu,ghe=Ff,qk=QI,Gk=ny,vhe=nE,yhe=Xb,whe=Na,bhe=WI,g9=whe("isConcatSpreadable"),She=bhe>=51||!fhe(function(){var e=[];return e[g9]=!1,e.concat()[0]!==e}),Dhe=function(e){if(!phe(e))return!1;var t=e[g9];return t!==void 0?!!t:hhe(e)},The=!She||!yhe("concat");dhe({target:"Array",proto:!0,arity:1,forced:The},{concat:function(t){var n=mhe(this),r=vhe(n,0),a=0,o,i,l,c,f;for(o=-1,l=arguments.length;oi;)if(l=a[i++],l!==l)return!0}else for(;o>i;i++)if((e||i in a)&&a[i]===n)return e||i||0;return!e&&-1}},v9={includes:Jk(!0),indexOf:Jk(!1)},t1={},Fhe=fa,gD=Fi,Ohe=nu,Phe=v9.indexOf,jhe=t1,Kk=Fhe([].push),y9=function(e,t){var n=Ohe(e),r=0,a=[],o;for(o in n)!gD(jhe,o)&&gD(n,o)&&Kk(a,o);for(;t.length>r;)gD(n,o=t[r++])&&(~Phe(a,o)||Kk(a,o));return a},aE=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Lhe=y9,Rhe=aE,oE=Object.keys||function(t){return Lhe(t,Rhe)},_he=ii,Bhe=l9,Hhe=$s,Yhe=sd,Uhe=nu,zhe=oE;e1.f=_he&&!Bhe?Object.defineProperties:function(t,n){Yhe(t);for(var r=Uhe(n),a=zhe(n),o=a.length,i=0,l;o>i;)Hhe.f(t,l=a[i++],r[l]);return t};var Vhe=ru,Whe=Vhe("document","documentElement"),$he=tm,Zhe=GI,Qk=$he("keys"),n1=function(e){return Qk[e]||(Qk[e]=Zhe(e))},qhe=sd,Ghe=e1,Xk=aE,Jhe=t1,Khe=Whe,Qhe=i9,Xhe=n1,e3=">",t3="<",GT="prototype",JT="script",w9=Xhe("IE_PROTO"),vD=function(){},b9=function(e){return t3+JT+e3+e+t3+"/"+JT+e3},n3=function(e){e.write(b9("")),e.close();var t=e.parentWindow.Object;return e=null,t},epe=function(){var e=Qhe("iframe"),t="java"+JT+":",n;return e.style.display="none",Khe.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(b9("document.F=Object")),n.close(),n.F},R0,pw=function(){try{R0=new ActiveXObject("htmlfile")}catch{}pw=typeof document<"u"?document.domain&&R0?n3(R0):epe():n3(R0);for(var e=Xk.length;e--;)delete pw[GT][Xk[e]];return pw()};Jhe[w9]=!0;var iE=Object.create||function(t,n){var r;return t!==null?(vD[GT]=qhe(t),r=new vD,vD[GT]=null,r[w9]=t):r=pw(),n===void 0?r:Ghe.f(r,n)},r1={},tpe=y9,npe=aE,rpe=npe.concat("length","prototype");r1.f=Object.getOwnPropertyNames||function(t){return tpe(t,rpe)};var S9={},ape=fa,a1=ape([].slice),ope=Xp,ipe=nu,D9=r1.f,spe=a1,T9=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],lpe=function(e){try{return D9(e)}catch{return spe(T9)}};S9.f=function(t){return T9&&ope(t)==="Window"?lpe(t):D9(ipe(t))};var o1={};o1.f=Object.getOwnPropertySymbols;var upe=Kb,i1=function(e,t,n,r){return r&&r.enumerable?e[t]=n:upe(e,t,n),e},cpe=$s,dpe=function(e,t,n){return cpe.f(e,t,n)},oy={},fpe=Na;oy.f=fpe;var r3=qa,hpe=Fi,ppe=oy,mpe=$s.f,Ir=function(e){var t=r3.Symbol||(r3.Symbol={});hpe(t,e)||mpe(t,e,{value:ppe.f(e)})},gpe=tu,vpe=ru,ype=Na,wpe=i1,I9=function(){var e=vpe("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=ype("toPrimitive");t&&!t[r]&&wpe(t,r,function(a){return gpe(n,this)},{arity:1})},bpe=XI,Spe=ry,Dpe=bpe?{}.toString:function(){return"[object "+Spe(this)+"]"},Tpe=XI,Ipe=$s.f,Epe=Kb,Cpe=Fi,xpe=Dpe,Mpe=Na,a3=Mpe("toStringTag"),rm=function(e,t,n,r){var a=n?e:e&&e.prototype;a&&(Cpe(a,a3)||Ipe(a,a3,{configurable:!0,value:t}),r&&!Tpe&&Epe(a,"toString",xpe))},kpe=Za,Npe=co,o3=kpe.WeakMap,Ape=Npe(o3)&&/native code/.test(String(o3)),Fpe=Ape,E9=Za,Ope=Ku,Ppe=Kb,yD=Fi,wD=qI,jpe=n1,Lpe=t1,i3="Object already initialized",KT=E9.TypeError,Rpe=E9.WeakMap,Jw,hv,Kw,_pe=function(e){return Kw(e)?hv(e):Jw(e,{})},Bpe=function(e){return function(t){var n;if(!Ope(t)||(n=hv(t)).type!==e)throw new KT("Incompatible receiver, "+e+" required");return n}};if(Fpe||wD.state){var Fl=wD.state||(wD.state=new Rpe);Fl.get=Fl.get,Fl.has=Fl.has,Fl.set=Fl.set,Jw=function(e,t){if(Fl.has(e))throw new KT(i3);return t.facade=e,Fl.set(e,t),t},hv=function(e){return Fl.get(e)||{}},Kw=function(e){return Fl.has(e)}}else{var rp=jpe("state");Lpe[rp]=!0,Jw=function(e,t){if(yD(e,rp))throw new KT(i3);return t.facade=e,Ppe(e,rp,t),t},hv=function(e){return yD(e,rp)?e[rp]:{}},Kw=function(e){return yD(e,rp)}}var sE={set:Jw,get:hv,has:Kw,enforce:_pe,getterFor:Bpe},Hpe=KI,Ype=fa,Upe=t9,zpe=Xu,Vpe=Ff,Wpe=nE,s3=Ype([].push),Vc=function(e){var t=e===1,n=e===2,r=e===3,a=e===4,o=e===6,i=e===7,l=e===5||o;return function(c,f,h,g){for(var y=zpe(c),w=Upe(y),S=Vpe(w),D=Hpe(f,h),I=0,M=g||Wpe,N=t?M(c,S):n||i?M(c,0):void 0,R,k;S>I;I++)if((l||I in w)&&(R=w[I],k=D(R,I,y),e))if(t)N[I]=k;else if(k)switch(e){case 3:return!0;case 5:return R;case 6:return I;case 2:s3(N,R)}else switch(e){case 4:return!1;case 7:s3(N,R)}return o?-1:r||a?a:N}},lE={forEach:Vc(0),map:Vc(1),filter:Vc(2),some:Vc(3),every:Vc(4),find:Vc(5),findIndex:Vc(6),filterReject:Vc(7)},s1=Gn,iy=Za,uE=tu,$pe=fa,Cp=ii,xp=em,Zpe=da,xa=Fi,qpe=Qu,QT=sd,l1=nu,cE=JI,Gpe=ay,XT=Xv,Mp=iE,C9=oE,Jpe=r1,x9=S9,Kpe=o1,M9=Qv,k9=$s,Qpe=e1,N9=UI,l3=i1,Xpe=dpe,dE=tm,eme=n1,A9=t1,u3=GI,tme=Na,nme=oy,rme=Ir,ame=I9,ome=rm,F9=sE,u1=lE.forEach,Xo=eme("hidden"),c1="Symbol",pv="prototype",ime=F9.set,c3=F9.getterFor(c1),Hs=Object[pv],mf=iy.Symbol,Rg=mf&&mf[pv],sme=iy.RangeError,lme=iy.TypeError,bD=iy.QObject,O9=M9.f,gf=k9.f,P9=x9.f,ume=N9.f,j9=$pe([].push),Wu=dE("symbols"),sy=dE("op-symbols"),cme=dE("wks"),e2=!bD||!bD[pv]||!bD[pv].findChild,L9=function(e,t,n){var r=O9(Hs,t);r&&delete Hs[t],gf(e,t,n),r&&e!==Hs&&gf(Hs,t,r)},t2=Cp&&Zpe(function(){return Mp(gf({},"a",{get:function(){return gf(this,"a",{value:7}).a}})).a!==7})?L9:gf,SD=function(e,t){var n=Wu[e]=Mp(Rg);return ime(n,{type:c1,tag:e,description:t}),Cp||(n.description=t),n},d1=function(t,n,r){t===Hs&&d1(sy,n,r),QT(t);var a=cE(n);return QT(r),xa(Wu,a)?(r.enumerable?(xa(t,Xo)&&t[Xo][a]&&(t[Xo][a]=!1),r=Mp(r,{enumerable:XT(0,!1)})):(xa(t,Xo)||gf(t,Xo,XT(1,Mp(null))),t[Xo][a]=!0),t2(t,a,r)):gf(t,a,r)},fE=function(t,n){QT(t);var r=l1(n),a=C9(r).concat(H9(r));return u1(a,function(o){(!Cp||uE(R9,r,o))&&d1(t,o,r[o])}),t},dme=function(t,n){return n===void 0?Mp(t):fE(Mp(t),n)},R9=function(t){var n=cE(t),r=uE(ume,this,n);return this===Hs&&xa(Wu,n)&&!xa(sy,n)?!1:r||!xa(this,n)||!xa(Wu,n)||xa(this,Xo)&&this[Xo][n]?r:!0},_9=function(t,n){var r=l1(t),a=cE(n);if(!(r===Hs&&xa(Wu,a)&&!xa(sy,a))){var o=O9(r,a);return o&&xa(Wu,a)&&!(xa(r,Xo)&&r[Xo][a])&&(o.enumerable=!0),o}},B9=function(t){var n=P9(l1(t)),r=[];return u1(n,function(a){!xa(Wu,a)&&!xa(A9,a)&&j9(r,a)}),r},H9=function(e){var t=e===Hs,n=P9(t?sy:l1(e)),r=[];return u1(n,function(a){xa(Wu,a)&&(!t||xa(Hs,a))&&j9(r,Wu[a])}),r};xp||(mf=function(){if(qpe(Rg,this))throw new lme("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:Gpe(arguments[0]),n=u3(t),r=function(a){var o=this===void 0?iy:this;o===Hs&&uE(r,sy,a),xa(o,Xo)&&xa(o[Xo],n)&&(o[Xo][n]=!1);var i=XT(1,a);try{t2(o,n,i)}catch(l){if(!(l instanceof sme))throw l;L9(o,n,i)}};return Cp&&e2&&t2(Hs,n,{configurable:!0,set:r}),SD(n,t)},Rg=mf[pv],l3(Rg,"toString",function(){return c3(this).tag}),l3(mf,"withoutSetter",function(e){return SD(u3(e),e)}),N9.f=R9,k9.f=d1,Qpe.f=fE,M9.f=_9,Jpe.f=x9.f=B9,Kpe.f=H9,nme.f=function(e){return SD(tme(e),e)},Cp&&Xpe(Rg,"description",{configurable:!0,get:function(){return c3(this).description}}));s1({global:!0,constructor:!0,wrap:!0,forced:!xp,sham:!xp},{Symbol:mf});u1(C9(cme),function(e){rme(e)});s1({target:c1,stat:!0,forced:!xp},{useSetter:function(){e2=!0},useSimple:function(){e2=!1}});s1({target:"Object",stat:!0,forced:!xp,sham:!Cp},{create:dme,defineProperty:d1,defineProperties:fE,getOwnPropertyDescriptor:_9});s1({target:"Object",stat:!0,forced:!xp},{getOwnPropertyNames:B9});ame();ome(mf,c1);A9[Xo]=!0;var fme=em,Y9=fme&&!!Symbol.for&&!!Symbol.keyFor,hme=Gn,pme=ru,mme=Fi,gme=ay,U9=tm,vme=Y9,DD=U9("string-to-symbol-registry"),yme=U9("symbol-to-string-registry");hme({target:"Symbol",stat:!0,forced:!vme},{for:function(e){var t=gme(e);if(mme(DD,t))return DD[t];var n=pme("Symbol")(t);return DD[t]=n,yme[n]=t,n}});var wme=Gn,bme=Fi,Sme=ey,Dme=Jb,Tme=tm,Ime=Y9,d3=Tme("symbol-to-string-registry");wme({target:"Symbol",stat:!0,forced:!Ime},{keyFor:function(t){if(!Sme(t))throw new TypeError(Dme(t)+" is not a symbol");if(bme(d3,t))return d3[t]}});var Eme=fa,f3=nm,Cme=co,h3=Xp,xme=ay,p3=Eme([].push),Mme=function(e){if(Cme(e))return e;if(f3(e)){for(var t=e.length,n=[],r=0;r=t.length)return e.target=void 0,Y0(void 0,!0);switch(e.kind){case"keys":return Y0(n,!1);case"values":return Y0(t[n],!1)}return Y0([n,t[n]],!1)},"values");M3.Arguments=M3.Array;var Jge={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Kge=Jge,Qge=Za,Xge=rm,k3=am;for(var CD in Kge)Xge(Qge[CD],CD),k3[CD]=k3.Array;var eve=cge,tve=eve,nve=Na,rve=$s.f,N3=nve("metadata"),A3=Function.prototype;A3[N3]===void 0&&rve(A3,N3,{value:null});var ave=Ir;ave("asyncDispose");var ove=Ir;ove("dispose");var ive=Ir;ive("metadata");var sve=tve,lve=sve,uve=ru,cve=fa,pE=uve("Symbol"),dve=pE.keyFor,fve=cve(pE.prototype.valueOf),a5=pE.isRegisteredSymbol||function(t){try{return dve(fve(t))!==void 0}catch{return!1}},hve=Gn,pve=a5;hve({target:"Symbol",stat:!0},{isRegisteredSymbol:pve});var mve=tm,o5=ru,gve=fa,vve=ey,yve=Na,Qw=o5("Symbol"),F3=Qw.isWellKnownSymbol,i5=o5("Object","getOwnPropertyNames"),wve=gve(Qw.prototype.valueOf),O3=mve("wks");for(var xD=0,P3=i5(Qw),bve=P3.length;xD=o?e?"":void 0:(i=L3(r,a),i<55296||i>56319||a+1===o||(l=L3(r,a+1))<56320||l>57343?e?Bve(r,a):i:e?Hve(r,a,a+2):(i-55296<<10)+(l-56320)+65536)}},Yve={codeAt:R3(!1),charAt:R3(!0)},Uve=Yve.charAt,zve=ay,l5=sE,Vve=e5,_3=t5,u5="String Iterator",Wve=l5.set,$ve=l5.getterFor(u5);Vve(String,"String",function(e){Wve(this,{type:u5,string:zve(e),index:0})},function(){var t=$ve(this),n=t.string,r=t.index,a;return r>=n.length?_3(void 0,!0):(a=Uve(n,r),t.index+=a.length,_3(a,!1))});var Zve=ry,B3=ZI,qve=zI,Gve=am,Jve=Na,Kve=Jve("iterator"),gE=function(e){if(!qve(e))return B3(e,Kve)||B3(e,"@@iterator")||Gve[Zve(e)]},Qve=gE,Xve=Qve,eye=Xve,tye=eye,nye=tye,rye=nye,aye=rye,oye=aye,iye=oye;const c5=qt(iye);var sye=ii,lye=nm,uye=TypeError,cye=Object.getOwnPropertyDescriptor,dye=sye&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),d5=dye?function(e,t){if(lye(e)&&!cye(e,"length").writable)throw new uye("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},fye=Gn,hye=Xu,pye=Ff,mye=d5,gye=QI,vye=da,yye=vye(function(){return[].push.call({length:4294967296},1)!==4294967297}),wye=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},bye=yye||!wye();fye({target:"Array",proto:!0,arity:1,forced:bye},{push:function(t){var n=hye(this),r=pye(n),a=arguments.length;gye(r+a);for(var o=0;o1?arguments[1]:void 0,i=o!==void 0;i&&(o=C0e(o,a>2?arguments[2]:void 0));var l=P0e(n),c=0,f,h,g,y,w,S;if(l&&!(this===V3&&N0e(l)))for(h=r?new this:[],y=O0e(n,l),w=y.next;!(g=x0e(w,y)).done;c++)S=i?k0e(y,o,[g.value,c],!0):g.value,z3(h,c,S);else for(f=F0e(n),h=r?new this(f):V3(f);f>c;c++)S=i?o(n[c],c):n[c],z3(h,c,S);return h.length=c,h},L0e=Na,f5=L0e("iterator"),h5=!1;try{var R0e=0,W3={next:function(){return{done:!!R0e++}},return:function(){h5=!0}};W3[f5]=function(){return this},Array.from(W3,function(){throw 2})}catch{}var _0e=function(e,t){try{if(!t&&!h5)return!1}catch{return!1}var n=!1;try{var r={};r[f5]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},B0e=Gn,H0e=j0e,Y0e=_0e,U0e=!Y0e(function(e){Array.from(e)});B0e({target:"Array",stat:!0,forced:U0e},{from:H0e});var z0e=qa,V0e=z0e.Array.from,W0e=V0e,$0e=W0e,Z0e=$0e,q0e=Z0e,G0e=q0e,J0e=G0e,K0e=J0e;const p5=qt(K0e);function o2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=74)&&(Ol=PD.match(/Chrome\/(\d+)/),Ol&&(Xw=Ol[1])));var ibe=Xw&&+Xw,e4=ibe,sbe=Zs,C5=!!Object.getOwnPropertySymbols&&!sbe(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&e4&&e4<41}),lbe=C5,x5=lbe&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ube=ls,cbe=m1,dbe=x5,M5=dbe?function(e){return typeof e=="symbol"}:function(e){var t=cbe("Symbol");return ube(t)&&Object(e)instanceof t},fbe=function(e){try{return String(e)}catch{return"Object"}},hbe=ls,pbe=fbe,mbe=function(e){if(hbe(e))return e;throw TypeError(pbe(e)+" is not a function")},gbe=mbe,k5=function(e,t){var n=e[t];return n==null?void 0:gbe(n)},jD=ls,LD=uy,vbe=function(e,t){var n,r;if(t==="string"&&jD(n=e.toString)&&!LD(r=n.call(e))||jD(n=e.valueOf)&&!LD(r=n.call(e))||t!=="string"&&jD(n=e.toString)&&!LD(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},N5={exports:{}},t4=Oi,xE=function(e,t){try{Object.defineProperty(t4,e,{value:t,configurable:!0,writable:!0})}catch{t4[e]=t}return t},ybe=Oi,wbe=xE,n4="__core-js_shared__",bbe=ybe[n4]||wbe(n4,{}),ME=bbe,r4=ME;(N5.exports=function(e,t){return r4[e]||(r4[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var kE=N5.exports,Sbe=p1,A5=function(e){return Object(Sbe(e))},Dbe=A5,Tbe={}.hasOwnProperty,jf=Object.hasOwn||function(t,n){return Tbe.call(Dbe(t),n)},Ibe=0,Ebe=Math.random(),F5=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++Ibe+Ebe).toString(36)},Cbe=Oi,xbe=kE,a4=jf,Mbe=F5,o4=C5,kbe=x5,Cg=xbe("wks"),Vg=Cbe.Symbol,Nbe=kbe?Vg:Vg&&Vg.withoutSetter||Mbe,cy=function(e){return(!a4(Cg,e)||!(o4||typeof Cg[e]=="string"))&&(o4&&a4(Vg,e)?Cg[e]=Vg[e]:Cg[e]=Nbe("Symbol."+e)),Cg[e]},i4=uy,s4=M5,Abe=k5,Fbe=vbe,Obe=cy,Pbe=Obe("toPrimitive"),jbe=function(e,t){if(!i4(e)||s4(e))return e;var n=Abe(e,Pbe),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!i4(r)||s4(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),Fbe(e,t)},Lbe=jbe,Rbe=M5,O5=function(e){var t=Lbe(e,"string");return Rbe(t)?t:String(t)},_be=Oi,l4=uy,i2=_be.document,Bbe=l4(i2)&&l4(i2.createElement),P5=function(e){return Bbe?i2.createElement(e):{}},Hbe=Pf,Ybe=Zs,Ube=P5,j5=!Hbe&&!Ybe(function(){return Object.defineProperty(Ube("div"),"a",{get:function(){return 7}}).a!=7}),zbe=Pf,Vbe=S5,Wbe=I5,$be=CE,Zbe=O5,qbe=jf,Gbe=j5,u4=Object.getOwnPropertyDescriptor;IE.f=zbe?u4:function(t,n){if(t=$be(t),n=Zbe(n),Gbe)try{return u4(t,n)}catch{}if(qbe(t,n))return Wbe(!Vbe.f.call(t,n),t[n])};var dy={},Jbe=uy,ld=function(e){if(Jbe(e))return e;throw TypeError(String(e)+" is not an object")},Kbe=Pf,Qbe=j5,c4=ld,Xbe=O5,d4=Object.defineProperty;dy.f=Kbe?d4:function(t,n,r){if(c4(t),n=Xbe(n),c4(r),Qbe)try{return d4(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var e1e=Pf,t1e=dy,n1e=I5,g1=e1e?function(e,t,n){return t1e.f(e,t,n1e(1,n))}:function(e,t,n){return e[t]=n,e},L5={exports:{}},r1e=ls,s2=ME,a1e=Function.toString;r1e(s2.inspectSource)||(s2.inspectSource=function(e){return a1e.call(e)});var R5=s2.inspectSource,o1e=Oi,i1e=ls,s1e=R5,f4=o1e.WeakMap,l1e=i1e(f4)&&/native code/.test(s1e(f4)),u1e=kE,c1e=F5,h4=u1e("keys"),_5=function(e){return h4[e]||(h4[e]=c1e(e))},NE={},d1e=l1e,f1e=Oi,h1e=uy,p1e=g1,RD=jf,_D=ME,m1e=_5,g1e=NE,p4="Object already initialized",v1e=f1e.WeakMap,eb,gv,tb,y1e=function(e){return tb(e)?gv(e):eb(e,{})},w1e=function(e){return function(t){var n;if(!h1e(t)||(n=gv(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(d1e||_D.state){var ef=_D.state||(_D.state=new v1e),b1e=ef.get,m4=ef.has,S1e=ef.set;eb=function(e,t){if(m4.call(ef,e))throw new TypeError(p4);return t.facade=e,S1e.call(ef,e,t),t},gv=function(e){return b1e.call(ef,e)||{}},tb=function(e){return m4.call(ef,e)}}else{var ap=m1e("state");g1e[ap]=!0,eb=function(e,t){if(RD(e,ap))throw new TypeError(p4);return t.facade=e,p1e(e,ap,t),t},gv=function(e){return RD(e,ap)?e[ap]:{}},tb=function(e){return RD(e,ap)}}var B5={set:eb,get:gv,has:tb,enforce:y1e,getterFor:w1e},l2=Pf,D1e=jf,H5=Function.prototype,T1e=l2&&Object.getOwnPropertyDescriptor,AE=D1e(H5,"name"),I1e=AE&&(function(){}).name==="something",E1e=AE&&(!l2||l2&&T1e(H5,"name").configurable),FE={EXISTS:AE,PROPER:I1e,CONFIGURABLE:E1e},C1e=Oi,g4=ls,x1e=jf,v4=g1,M1e=xE,k1e=R5,Y5=B5,N1e=FE.CONFIGURABLE,A1e=Y5.get,F1e=Y5.enforce,O1e=String(String).split("String");(L5.exports=function(e,t,n,r){var a=r?!!r.unsafe:!1,o=r?!!r.enumerable:!1,i=r?!!r.noTargetGet:!1,l=r&&r.name!==void 0?r.name:t,c;if(g4(n)&&(String(l).slice(0,7)==="Symbol("&&(l="["+String(l).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!x1e(n,"name")||N1e&&n.name!==l)&&v4(n,"name",l),c=F1e(n),c.source||(c.source=O1e.join(typeof l=="string"?l:""))),e===C1e){o?e[t]=n:M1e(t,n);return}else a?!i&&e[t]&&(o=!0):delete e[t];o?e[t]=n:v4(e,t,n)})(Function.prototype,"toString",function(){return g4(this)&&A1e(this).source||k1e(this)});var fy=L5.exports,U5={},P1e=Math.ceil,j1e=Math.floor,v1=function(e){var t=+e;return t!==t||t===0?0:(t>0?j1e:P1e)(t)},L1e=v1,R1e=Math.max,_1e=Math.min,B1e=function(e,t){var n=L1e(e);return n<0?R1e(n+t,0):_1e(n,t)},H1e=v1,Y1e=Math.min,z5=function(e){return e>0?Y1e(H1e(e),9007199254740991):0},U1e=z5,z1e=function(e){return U1e(e.length)},V1e=CE,W1e=B1e,$1e=z1e,y4=function(e){return function(t,n,r){var a=V1e(t),o=$1e(a),i=W1e(r,o),l;if(e&&n!=n){for(;o>i;)if(l=a[i++],l!=l)return!0}else for(;o>i;i++)if((e||i in a)&&a[i]===n)return e||i||0;return!e&&-1}},Z1e={includes:y4(!0),indexOf:y4(!1)},BD=jf,q1e=CE,G1e=Z1e.indexOf,J1e=NE,V5=function(e,t){var n=q1e(e),r=0,a=[],o;for(o in n)!BD(J1e,o)&&BD(n,o)&&a.push(o);for(;t.length>r;)BD(n,o=t[r++])&&(~G1e(a,o)||a.push(o));return a},OE=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],K1e=V5,Q1e=OE,X1e=Q1e.concat("length","prototype");U5.f=Object.getOwnPropertyNames||function(t){return K1e(t,X1e)};var W5={};W5.f=Object.getOwnPropertySymbols;var eSe=m1,tSe=U5,nSe=W5,rSe=ld,aSe=eSe("Reflect","ownKeys")||function(t){var n=tSe.f(rSe(t)),r=nSe.f;return r?n.concat(r(t)):n},oSe=jf,iSe=aSe,sSe=IE,lSe=dy,uSe=function(e,t){for(var n=iSe(t),r=lSe.f,a=sSe.f,o=0;oo;)HSe.f(t,i=r[o++],n[i]);return t},VSe=m1,WSe=VSe("document","documentElement"),$Se=ld,ZSe=zSe,w4=OE,qSe=NE,GSe=WSe,JSe=P5,KSe=_5,b4=">",S4="<",u2="prototype",c2="script",K5=KSe("IE_PROTO"),YD=function(){},Q5=function(e){return S4+c2+b4+e+S4+"/"+c2+b4},D4=function(e){e.write(Q5("")),e.close();var t=e.parentWindow.Object;return e=null,t},QSe=function(){var e=JSe("iframe"),t="java"+c2+":",n;return e.style.display="none",GSe.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(Q5("document.F=Object")),n.close(),n.F},z0,gw=function(){try{z0=new ActiveXObject("htmlfile")}catch{}gw=typeof document<"u"?document.domain&&z0?D4(z0):QSe():D4(z0);for(var e=w4.length;e--;)delete gw[u2][w4[e]];return gw()};qSe[K5]=!0;var XSe=Object.create||function(t,n){var r;return t!==null?(YD[u2]=$Se(t),r=new YD,YD[u2]=null,r[K5]=t):r=gw(),n===void 0?r:ZSe(r,n)},eDe=Zs,tDe=Oi,nDe=tDe.RegExp,rDe=eDe(function(){var e=nDe(".","s");return!(e.dotAll&&e.exec(` `)&&e.flags==="s")}),aDe=Zs,oDe=Oi,iDe=oDe.RegExp,sDe=aDe(function(){var e=iDe("(?b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$c")!=="bc"}),lDe=y1,uDe=q5,T4=jE,cDe=kE,dDe=XSe,fDe=B5.get,hDe=rDe,pDe=sDe,nb=RegExp.prototype.exec,mDe=cDe("native-string-replace",String.prototype.replace),d2=nb,f2=function(){var e=/a/,t=/b*/g;return nb.call(e,"a"),nb.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),X5=T4.UNSUPPORTED_Y||T4.BROKEN_CARET,h2=/()??/.exec("")[1]!==void 0,gDe=f2||h2||X5||hDe||pDe;gDe&&(d2=function(t){var n=this,r=fDe(n),a=lDe(t),o=r.raw,i,l,c,f,h,g,y;if(o)return o.lastIndex=n.lastIndex,i=d2.call(o,a),n.lastIndex=o.lastIndex,i;var w=r.groups,S=X5&&n.sticky,D=uDe.call(n),I=n.source,M=0,N=a;if(S&&(D=D.replace("y",""),D.indexOf("g")===-1&&(D+="g"),N=a.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&a.charAt(n.lastIndex-1)!==` `)&&(I="(?: "+I+")",N=" "+N,M++),l=new RegExp("^(?:"+I+")",D)),h2&&(l=new RegExp("^"+I+"$(?!\\s)",D)),f2&&(c=n.lastIndex),f=nb.call(S?l:n,N),S?f?(f.input=f.input.slice(M),f[0]=f[0].slice(M),f.index=n.lastIndex,n.lastIndex+=f[0].length):n.lastIndex=0:f2&&f&&(n.lastIndex=n.global?f.index+f[0].length:c),h2&&f&&f.length>1&&mDe.call(f[0],l,function(){for(h=1;h=o?e?"":void 0:(i=r.charCodeAt(a),i<55296||i>56319||a+1===o||(l=r.charCodeAt(a+1))<56320||l>57343?e?r.charAt(a):i:e?r.slice(a,a+2):(i-55296<<10)+(l-56320)+65536)}},EDe={codeAt:x4(!1),charAt:x4(!0)},CDe=EDe.charAt,xDe=function(e,t,n){return t+(n?CDe(e,t).length:1)},MDe=A5,kDe=Math.floor,NDe="".replace,ADe=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,FDe=/\$([$&'`]|\d{1,2})/g,ODe=function(e,t,n,r,a,o){var i=n+e.length,l=r.length,c=FDe;return a!==void 0&&(a=MDe(a),c=ADe),NDe.call(o,c,function(f,h){var g;switch(h.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(i);case"<":g=a[h.slice(1,-1)];break;default:var y=+h;if(y===0)return f;if(y>l){var w=kDe(y/10);return w===0?f:w<=l?r[w-1]===void 0?h.charAt(1):r[w-1]+h.charAt(1):f}g=r[y-1]}return g===void 0?"":g})},PDe=ld,jDe=ls,LDe=EE,RDe=LE,_De=function(e,t){var n=e.exec;if(jDe(n)){var r=n.call(e,t);return r!==null&&PDe(r),r}if(LDe(e)==="RegExp")return RDe.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},BDe=SDe,HDe=Zs,YDe=ld,UDe=ls,zDe=v1,VDe=z5,op=y1,WDe=p1,$De=xDe,ZDe=k5,qDe=ODe,GDe=_De,JDe=cy,p2=JDe("replace"),KDe=Math.max,QDe=Math.min,XDe=function(e){return e===void 0?e:String(e)},eTe=function(){return"a".replace(/./,"$0")==="$0"}(),M4=function(){return/./[p2]?/./[p2]("a","$0")==="":!1}(),tTe=!HDe(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$")!=="7"});BDe("replace",function(e,t,n){var r=M4?"$":"$0";return[function(o,i){var l=WDe(this),c=o==null?void 0:ZDe(o,p2);return c?c.call(o,l,i):t.call(op(l),o,i)},function(a,o){var i=YDe(this),l=op(a);if(typeof o=="string"&&o.indexOf(r)===-1&&o.indexOf("$<")===-1){var c=n(t,i,l,o);if(c.done)return c.value}var f=UDe(o);f||(o=op(o));var h=i.global;if(h){var g=i.unicode;i.lastIndex=0}for(var y=[];;){var w=GDe(i,l);if(w===null||(y.push(w),!h))break;var S=op(w[0]);S===""&&(i.lastIndex=$De(l,VDe(i.lastIndex),g))}for(var D="",I=0,M=0;M=I&&(D+=l.slice(I,R)+V,I=R+N.length)}return D+l.slice(I)}]},!tTe||!eTe||M4);var nTe=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",rTe=TypeError,aTe=function(e,t){if(en,i=iTe(r)?r:dTe(r),l=o?uTe(arguments,n):[],c=o?function(){oTe(i,this,l)}:i;return t?e(c,a):e(c)}:e},hTe=Gn,rO=Za,pTe=nO,k4=pTe(rO.setInterval,!0);hTe({global:!0,bind:!0,forced:rO.setInterval!==k4},{setInterval:k4});var mTe=Gn,aO=Za,gTe=nO,N4=gTe(aO.setTimeout,!0);mTe({global:!0,bind:!0,forced:aO.setTimeout!==N4},{setTimeout:N4});var vTe=qa,yTe=vTe.setInterval,wTe=yTe;const bTe=qt(wTe);var STe=da,oO=function(e,t){var n=[][e];return!!n&&STe(function(){n.call(null,t||function(){return 1},1)})},DTe=Gn,TTe=YI,ITe=v9.indexOf,ETe=oO,m2=TTe([].indexOf),iO=!!m2&&1/m2([1],1,-0)<0,CTe=iO||!ETe("indexOf");DTe({target:"Array",proto:!0,forced:CTe},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return iO?m2(this,t,n)||0:ITe(this,t,n)}});var xTe=Of,MTe=xTe("Array","indexOf"),kTe=Qu,NTe=MTe,zD=Array.prototype,ATe=function(e){var t=e.indexOf;return e===zD||kTe(zD,e)&&t===zD.indexOf?NTe:t},FTe=ATe,OTe=FTe,PTe=OTe;const jTe=qt(PTe);var A4=Jb,LTe=TypeError,RTe=function(e,t){if(!delete e[t])throw new LTe("Cannot delete property "+A4(t)+" of "+A4(e))},_Te=Gn,BTe=Xu,HTe=rE,YTe=Qb,UTe=Ff,zTe=d5,VTe=QI,WTe=nE,$Te=ny,VD=RTe,ZTe=Xb,qTe=ZTe("splice"),GTe=Math.max,JTe=Math.min;_Te({target:"Array",proto:!0,forced:!qTe},{splice:function(t,n){var r=BTe(this),a=UTe(r),o=HTe(t,a),i=arguments.length,l,c,f,h,g,y;for(i===0?l=c=0:i===1?(l=0,c=a-o):(l=i-2,c=JTe(GTe(YTe(n),0),a-o)),VTe(a+l-c),f=WTe(r,c),h=0;ha-c+l;h--)VD(r,h-1)}else if(l>c)for(h=a-c;h>o;h--)g=h+c-1,y=h+l-1,g in r?r[y]=r[g]:VD(r,y);for(h=0;h1?arguments[1]:void 0)},C2e=Gn,F4=E2e;C2e({target:"Array",proto:!0,forced:[].forEach!==F4},{forEach:F4});var x2e=Of,M2e=x2e("Array","forEach"),k2e=M2e,N2e=k2e,A2e=ry,F2e=Fi,O2e=Qu,P2e=N2e,ZD=Array.prototype,j2e={DOMTokenList:!0,NodeList:!0},L2e=function(e){var t=e.forEach;return e===ZD||O2e(ZD,e)&&t===ZD.forEach||F2e(j2e,A2e(e))?P2e:t},R2e=L2e;const rb=qt(R2e);var _2e=Gn,B2e=Xu,lO=oE,H2e=da,Y2e=H2e(function(){lO(1)});_2e({target:"Object",stat:!0,forced:Y2e},{keys:function(t){return lO(B2e(t))}});var U2e=qa,z2e=U2e.Object.keys,V2e=z2e,W2e=V2e,$2e=W2e;const Z2e=qt($2e);var q2e=qa,G2e=q2e.Object.getOwnPropertySymbols,J2e=G2e,K2e=J2e,Q2e=K2e;const O4=qt(Q2e);var X2e=Gn,eIe=lE.filter,tIe=Xb,nIe=tIe("filter");X2e({target:"Array",proto:!0,forced:!nIe},{filter:function(t){return eIe(this,t,arguments.length>1?arguments[1]:void 0)}});var rIe=Of,aIe=rIe("Array","filter"),oIe=Qu,iIe=aIe,qD=Array.prototype,sIe=function(e){var t=e.filter;return e===qD||oIe(qD,e)&&t===qD.filter?iIe:t},lIe=sIe,uIe=lIe,cIe=uIe;const dIe=qt(cIe);var uO={exports:{}},fIe=Gn,hIe=da,pIe=nu,cO=Qv.f,dO=ii,mIe=!dO||hIe(function(){cO(1)});fIe({target:"Object",stat:!0,forced:mIe,sham:!dO},{getOwnPropertyDescriptor:function(t,n){return cO(pIe(t),n)}});var gIe=qa,fO=gIe.Object,vIe=uO.exports=function(t,n){return fO.getOwnPropertyDescriptor(t,n)};fO.getOwnPropertyDescriptor.sham&&(vIe.sham=!0);var yIe=uO.exports,wIe=yIe,bIe=wIe,SIe=bIe;const hO=qt(SIe);var DIe=ru,TIe=fa,IIe=r1,EIe=o1,CIe=sd,xIe=TIe([].concat),MIe=DIe("Reflect","ownKeys")||function(t){var n=IIe.f(CIe(t)),r=EIe.f;return r?xIe(n,r(t)):n},kIe=Gn,NIe=ii,AIe=MIe,FIe=nu,OIe=Qv,PIe=ny;kIe({target:"Object",stat:!0,sham:!NIe},{getOwnPropertyDescriptors:function(t){for(var n=FIe(t),r=OIe.f,a=AIe(n),o={},i=0,l,c;a.length>i;)c=r(n,l=a[i++]),c!==void 0&&PIe(o,l,c);return o}});var jIe=qa,LIe=jIe.Object.getOwnPropertyDescriptors,RIe=LIe,_Ie=RIe,BIe=_Ie;const P4=qt(BIe);var pO={exports:{}},HIe=Gn,YIe=ii,j4=e1.f;HIe({target:"Object",stat:!0,forced:Object.defineProperties!==j4,sham:!YIe},{defineProperties:j4});var UIe=qa,mO=UIe.Object,zIe=pO.exports=function(t,n){return mO.defineProperties(t,n)};mO.defineProperties.sham&&(zIe.sham=!0);var VIe=pO.exports,WIe=VIe,$Ie=WIe,ZIe=$Ie;const qIe=qt(ZIe);var GIe=b5;const JIe=qt(GIe);function KIe(e){if(e.sheet)return e.sheet;for(var t=0;t0?Va(om,--oi):0,kp--,ea===10&&(kp=1,b1--),ea}function ki(){return ea=oi2||yv(ea)>3?"":" "}function cEe(e,t){for(;--t&&ki()&&!(ea<48||ea>102||ea>57&&ea<65||ea>70&&ea<97););return py(e,vw()+(t<6&&Gl()==32&&ki()==32))}function v2(e){for(;ki();)switch(ea){case e:return oi;case 34:case 39:e!==34&&e!==39&&v2(ea);break;case 40:e===41&&v2(e);break;case 92:ki();break}return oi}function dEe(e,t){for(;ki()&&e+ea!==57;)if(e+ea===84&&Gl()===47)break;return"/*"+py(t,oi-1)+"*"+w1(e===47?e:ki())}function fEe(e){for(;!yv(Gl());)ki();return py(e,oi)}function hEe(e){return SO(ww("",null,null,null,[""],e=bO(e),0,[0],e))}function ww(e,t,n,r,a,o,i,l,c){for(var f=0,h=0,g=i,y=0,w=0,S=0,D=1,I=1,M=1,N=0,R="",k=a,B=o,L=r,_=R;I;)switch(S=N,N=ki()){case 40:if(S!=108&&Va(_,g-1)==58){g2(_+=_n(yw(N),"&","&\f"),"&\f")!=-1&&(M=-1);break}case 34:case 39:case 91:_+=yw(N);break;case 9:case 10:case 13:case 32:_+=uEe(S);break;case 92:_+=cEe(vw()-1,7);continue;case 47:switch(Gl()){case 42:case 47:V0(pEe(dEe(ki(),vw()),t,n),c);break;default:_+="/"}break;case 123*D:l[f++]=Yl(_)*M;case 125*D:case 59:case 0:switch(N){case 0:case 125:I=0;case 59+h:M==-1&&(_=_n(_,/\f/g,"")),w>0&&Yl(_)-g&&V0(w>32?R4(_+";",r,n,g-1):R4(_n(_," ","")+";",r,n,g-2),c);break;case 59:_+=";";default:if(V0(L=L4(_,t,n,f,h,a,l,R,k=[],B=[],g),o),N===123)if(h===0)ww(_,t,L,L,k,o,g,l,B);else switch(y===99&&Va(_,3)===110?100:y){case 100:case 108:case 109:case 115:ww(e,L,L,r&&V0(L4(e,L,L,0,0,a,l,R,a,k=[],g),B),a,B,g,l,r?k:B);break;default:ww(_,L,L,L,[""],B,0,l,B)}}f=h=w=0,D=M=1,R=_="",g=i;break;case 58:g=1+Yl(_),w=S;default:if(D<1){if(N==123)--D;else if(N==125&&D++==0&&lEe()==125)continue}switch(_+=w1(N),N*D){case 38:M=h>0?1:(_+="\f",-1);break;case 44:l[f++]=(Yl(_)-1)*M,M=1;break;case 64:Gl()===45&&(_+=yw(ki())),y=Gl(),h=g=Yl(R=_+=fEe(vw())),N++;break;case 45:S===45&&Yl(_)==2&&(D=0)}}return o}function L4(e,t,n,r,a,o,i,l,c,f,h){for(var g=a-1,y=a===0?o:[""],w=BE(y),S=0,D=0,I=0;S0?y[M]+" "+N:_n(N,/&\f/g,y[M])))&&(c[I++]=R);return S1(e,t,n,a===0?RE:l,c,f,h)}function pEe(e,t,n){return S1(e,t,n,gO,w1(sEe()),vv(e,2,-2),0)}function R4(e,t,n,r){return S1(e,t,n,_E,vv(e,0,r),vv(e,r+1,-1),r)}function gp(e,t){for(var n="",r=BE(e),a=0;a6)switch(Va(e,t+1)){case 109:if(Va(e,t+4)!==45)break;case 102:return _n(e,/(.+:)(.+)-([^]+)/,"$1"+Rn+"$2-$3$1"+ab+(Va(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~g2(e,"stretch")?DO(_n(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Va(e,t+1)!==115)break;case 6444:switch(Va(e,Yl(e)-3-(~g2(e,"!important")&&10))){case 107:return _n(e,":",":"+Rn)+e;case 101:return _n(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Rn+(Va(e,14)===45?"inline-":"")+"box$3$1"+Rn+"$2$3$1"+io+"$2box$3")+e}break;case 5936:switch(Va(e,t+11)){case 114:return Rn+e+io+_n(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Rn+e+io+_n(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Rn+e+io+_n(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Rn+e+io+e+e}return e}var IEe=function(t,n,r,a){if(t.length>-1&&!t.return)switch(t.type){case _E:t.return=DO(t.value,t.length);break;case vO:return gp([xg(t,{value:_n(t.value,"@","@"+Rn)})],a);case RE:if(t.length)return iEe(t.props,function(o){switch(oEe(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return gp([xg(t,{props:[_n(o,/:(read-\w+)/,":"+ab+"$1")]})],a);case"::placeholder":return gp([xg(t,{props:[_n(o,/:(plac\w+)/,":"+Rn+"input-$1")]}),xg(t,{props:[_n(o,/:(plac\w+)/,":"+ab+"$1")]}),xg(t,{props:[_n(o,/:(plac\w+)/,io+"input-$1")]})],a)}return""})}},EEe=[IEe],CEe=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(D){var I=D.getAttribute("data-emotion");I.indexOf(" ")!==-1&&(document.head.appendChild(D),D.setAttribute("data-s",""))})}var a=t.stylisPlugins||EEe,o={},i,l=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(D){for(var I=D.getAttribute("data-emotion").split(" "),M=1;M=4;++r,a-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var MEe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},kEe=/[A-Z]|^ms/g,NEe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,TO=function(t){return t.charCodeAt(1)===45},B4=function(t){return t!=null&&typeof t!="boolean"},GD=yEe(function(e){return TO(e)?e:e.replace(kEe,"-$&").toLowerCase()}),H4=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(NEe,function(r,a,o){return Ul={name:a,styles:o,next:Ul},a})}return MEe[t]!==1&&!TO(t)&&typeof n=="number"&&n!==0?n+"px":n};function wv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":if(n.anim===1)return Ul={name:n.name,styles:n.styles,next:Ul},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Ul={name:r.name,styles:r.styles,next:Ul},r=r.next;var a=n.styles+";";return a}return AEe(e,t,n);case"function":if(e!==void 0){var o=Ul,i=n(e);return Ul=o,wv(e,t,i)}break}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function AEe(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function q4(e,t){for(var n,r,a=arguments.length,o=new Array(a>2?a-2:0),i=2;i1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var a=arguments.length,o=new Array(a),i=0;it?(e.apply(void 0,o),n=l):(clearTimeout(r),r=pCe(function(){e.apply(void 0,o),n=Qc()},Math.max(0,t-l+n)))}}var kO=function(t){var n=t.debounce,r=t.name,a=t.onEvent,o=t.target,i=P.useRef();i.current=a;var l=P.useMemo(function(){return mCe(function(f){var h=i.current;h&&h(f)},n)},[n,i]),c=P.useCallback(function(f){f.timeStampLow=Qc(),l(f)},[l]);return P.useLayoutEffect(function(){return o.addEventListener(r,c,{passive:!0}),c({target:o,type:r}),function(){return o.removeEventListener(r,c)}},[r,c,o]),!1};kO.defaultProps={debounce:200};var gCe=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},vCe=Gn,yCe=gCe;vCe({target:"Math",stat:!0},{sign:yCe});var wCe=qa,bCe=wCe.Math.sign,SCe=bCe,DCe=SCe,TCe=DCe;const ICe=qt(TCe);function ECe(e,t){var n=ICe(t-e),r=Math.sqrt(Math.abs(t-e)),a=e+r*n;return n>0?Math.min(t,a):Math.max(t,a)}function CCe(e,t,n,r){for(var a=e,o=0;o4&&arguments[4]!==void 0?arguments[4]:Qc();(g==="100%"||typeof g=="number")&&(cancelAnimationFrame(i.current),i.current=requestAnimationFrame(function(){if(a){var S=g==="100%"?a.scrollHeight-a.offsetHeight:g,D=CCe(h,S,ECe,(Qc()-w)/5);Math.abs(S-D)<1.5&&(D=S),a[f]=D,S===D?r&&r(!0):l(f,h,g,y+1,w)}}))},[i,r,a]),c=P.useCallback(function(){cancelAnimationFrame(i.current),r&&r(!1)},[r]);return P.useLayoutEffect(function(){return l(n,a[n],o,1),a?(a.addEventListener("pointerdown",c,{passive:!0}),a.addEventListener("wheel",c,{passive:!0}),function(){a.removeEventListener("pointerdown",c),a.removeEventListener("wheel",c),cancelAnimationFrame(i.current)}):function(){return cancelAnimationFrame(i.current)}},[l,i,c,n,a,o]),!1};NO.propTypes={name:Mn.string.isRequired,onEnd:Mn.func,target:Mn.any.isRequired,value:Mn.oneOfType([Mn.number,Mn.oneOf(["100%"])]).isRequired};function KD(e){var t=P.useState(e),n=Hl(t,2),r=n[0],a=n[1],o=P.useRef(),i=P.useCallback(function(l){typeof l=="function"?i(function(c){return l=l(c),o.current=l,l}):(o.current=l,i(l))},[o]);return o.current=r,[r,a,o]}function G4(e,t){var n=Z2e(e);if(O4){var r=O4(e);t&&(r=dIe(r).call(r,function(a){return hO(e,a).enumerable})),n.push.apply(n,r)}return n}function J4(e){for(var t=1;t",{force:o})},[o]);l=l===Ls?Ls:MCe;var g=P.useRef(0),y=P.useRef(i),w=KD(l===Ls?0:"100%"),S=Hl(w,3),D=S[0],I=S[1],M=S[2],N=KD(null),R=Hl(N,3),k=R[0],B=R[1],L=R[2],_=P.useRef(0),V=P.useRef(0),Y=P.useRef(0),Z=P.useState(!0),Q=Hl(Z,2),K=Q[0],se=Q[1],le=P.useState(!0),fe=Hl(le,2),$=fe[0],he=fe[1],ie=P.useState(!0),ce=Hl(ie,2),X=ce[0],ae=ce[1],De=P.useState(!1),je=Hl(De,2),Re=je[0],Fe=je[1],Be=KD(!0),Xe=Hl(Be,3),Ze=Xe[0],st=Xe[1],Ct=Xe[2],tn=P.useRef([]),_e=P.useCallback(function(pt){var Mt=L.current;return tn.current.push(pt),Mt&&pt({scrollTop:Mt.scrollTop}),function(){var Jt=tn.current,sn=jTe(Jt).call(Jt,pt);~sn&&o2e(Jt).call(Jt,sn,1)}},[tn,L]),et=P.useCallback(function(){var pt=M.current;h(function(){var Mt;return Dr(Mt=["%cSpineTo%c: %conEnd%c is fired."]).call(Mt,En(Vn("magenta")),En(Vn("orange")),[{animateTo:pt}])}),g.current=Qc(),Mg(pt,l)||st(!1),I(null)},[M,h,g,l,I,st]),nt=P.useCallback(function(pt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Jt=Mt.behavior,sn=L.current;if(typeof pt!="number"&&pt!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');h(function(){var ln;return[Dr(ln=["%cscrollTo%c: Will scroll to %c".concat(typeof pt=="number"?pt+"px":pt.replace(/%/g,"%%"),"%c")]).call(ln,En(Vn("lime","")),En(Vn("purple"))),{behavior:Jt,nextAnimateTo:pt,target:sn}]}),Jt==="auto"?(et(),sn&&(sn.scrollTop=pt==="100%"?sn.scrollHeight-sn.offsetHeight:pt)):(Jt!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),I(pt)),Mg(pt,l)&&(h(function(){var ln;return[Dr(ln=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(ln,En(Vn("lime","")),En(Vn("purple"))),[{mode:l,nextAnimateTo:pt}]]}),st(!0))},[h,et,l,I,st,L]),ht=P.useCallback(function(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Mt=pt.behavior;h(function(){var Jt;return Dr(Jt=["%cscrollToBottom%c: Called"]).call(Jt,En(Vn("yellow","")))}),Mt!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),nt("100%",{behavior:Mt||"smooth"})},[h,nt]),St=P.useCallback(function(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Mt=pt.behavior;h(function(){var Jt;return Dr(Jt=["%cscrollToTop%c: Called"]).call(Jt,En(Vn("yellow","")))}),Mt!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),nt(0,{behavior:Mt||"smooth"})},[h,nt]),Tt=P.useCallback(function(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Mt=pt.behavior;h(function(){var sn;return Dr(sn=["%cscrollToEnd%c: Called"]).call(sn,En(Vn("yellow","")))}),Mt!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var Jt={behavior:Mt||"smooth"};l===Ls?St(Jt):ht(Jt)},[h,l,ht,St]),Gt=P.useCallback(function(){var pt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Mt=pt.behavior;h(function(){var sn;return Dr(sn=["%cscrollToStart%c: Called"]).call(sn,En(Vn("yellow","")))}),Mt!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var Jt={behavior:Mt||"smooth"};l===Ls?ht(Jt):St(Jt)},[h,l,ht,St]),_t=P.useCallback(function(){var pt=L.current;if(pt){if(y.current==="auto"){h(function(){var Lr;return Dr(Lr=["%ctarget changed%c: Initial scroll"]).call(Lr,En(Vn("blue")))}),pt.scrollTop=l===Ls?0:pt.scrollHeight-pt.offsetHeight,y.current=!1;return}var Mt=_.current,Jt=pt.offsetHeight,sn=pt.scrollHeight,ln=pt.scrollTop,vr=l===Ls?0:Math.max(0,sn-Jt-ln),fr=Math.max(0,Mt-ln),ha=f({maxValue:vr,minValue:fr,offsetHeight:Jt,scrollHeight:sn,scrollTop:ln}),jr=Math.max(0,Math.min(vr,ha)),nr;l===Ls||jr!==vr?nr=ln+jr:nr="100%",h(function(){var Lr,te,me;return[Dr(Lr=[Dr(te=Dr(me="%cscrollToSticky%c: Will animate from %c".concat(Mt,"px%c to %c")).call(me,typeof nr=="number"?nr+"px":nr.replace(/%/g,"%%"),"%c (%c")).call(te,(nr==="100%"?vr:nr)+Mt,"px%c)")]).call(Lr,En(Vn("orange")),En(Vn("purple")),En(Vn("purple")),En(Vn("purple"))),{animateFrom:Mt,maxValue:vr,minValue:fr,nextAnimateTo:nr,nextValue:jr,offsetHeight:Jt,rawNextValue:ha,scrollHeight:sn,scrollTop:ln}]}),nt(nr,{behavior:"smooth"})}},[_,h,l,f,nt,L]),Vt=P.useCallback(function(pt){var Mt,Jt=pt.timeStampLow,sn=M.current,ln=L.current,vr=sn!==null;if(!(Jt<=g.current||!ln)){var fr=eN({mode:l,target:ln}),ha=fr.atBottom,jr=fr.atEnd,nr=fr.atStart,Lr=fr.atTop;se(ha),he(jr),Fe(nr),ae(Lr);var te=ln.offsetHeight,me=ln.scrollHeight,xe=V.current,Ye=Y.current,He=te!==xe,Qe=me!==Ye;if(He&&(V.current=te),Qe&&(Y.current=me),!He&&!Qe){var tt=vr&&Mg(sn,l)||jr;Ct.current!==tt&&(h(function(){var Yt,On,yn,Cr;return[Dr(Yt=["%conScroll%c: %csetSticky%c(%c".concat(tt,"%c)")]).call(Yt,En(Vn("red")),En(Vn("red")),En(Vn("purple"))),Dr(On=[Dr(yn=Dr(Cr="(animating = %c".concat(vr,"%c && isEnd = %c")).call(Cr,Mg(sn,l),"%c) || atEnd = %c")).call(yn,jr,"%c")]).call(On,En(Vn("purple")),En(Vn("purple")),En(Vn("purple")),[{animating:vr,animateTo:sn,atEnd:jr,mode:l,offsetHeight:ln.offsetHeight,scrollHeight:ln.scrollHeight,sticky:Ct.current,nextSticky:tt}])]}),st(tt))}else Ct.current&&(h(function(){var Yt;return[Dr(Yt=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(Yt,En(Vn("red")),En(Vn("orange")),[{offsetHeightChanged:He,scrollHeightChanged:Qe}]),{nextOffsetHeight:te,prevOffsetHeight:xe,nextScrollHeight:me,prevScrollHeight:Ye}]}),_t());var kt=ln.scrollTop;rb(Mt=tn.current).call(Mt,function(Yt){return Yt({scrollTop:kt})})}},[M,h,g,l,V,Y,tn,_t,se,he,Fe,ae,st,Ct,L]);P.useEffect(function(){if(k){var pt=!1,Mt=NCe(function(){var Jt=L.current,sn=M.current!==null;Ct.current?eN({mode:l,target:Jt}).atEnd?pt=!1:pt?Qc()-pt>kCe&&(sn||(_.current=Jt.scrollTop,h(function(){var ln;return Dr(ln=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(ln,En(Vn("navy")),En(Vn("orange")))}),_t()),pt=!1):pt=Qc():Jt.scrollHeight<=Jt.offsetHeight&&!Ct.current&&(h(function(){var ln;return[Dr(ln=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(ln,En(Vn("navy")),En(Vn("purple"))),[{offsetHeight:Jt.offsetHeight,scrollHeight:Jt.scrollHeight,sticky:Ct.current}]]}),st(!0))},Math.max(K4,n)||K4);return function(){return clearInterval(Mt)}}},[M,n,h,l,_t,st,Ct,k,L]);var Xt=P.useMemo(function(){var pt=X4[c]||(X4[c]=jEe({key:"react-scroll-to-bottom--css-"+nCe(),nonce:c}));return function(Mt){return pt.css(Mt)+""}},[c]),dn=P.useMemo(function(){return{observeScrollPosition:_e,setTarget:B,styleToClassName:Xt}},[_e,B,Xt]),en=P.useMemo(function(){return{atBottom:K,atEnd:$,atStart:Re,atTop:X,mode:l}},[K,$,Re,X,l]),Zn=P.useMemo(function(){var pt=D!==null;return{animating:pt,animatingToEnd:pt&&Mg(D,l),sticky:Ze}},[D,l,Ze]),kn=P.useMemo(function(){return J4(J4({},en),Zn)},[en,Zn]),Er=P.useMemo(function(){return{scrollTo:nt,scrollToBottom:ht,scrollToEnd:Tt,scrollToStart:Gt,scrollToTop:St}},[nt,ht,Tt,Gt,St]);return P.useEffect(function(){if(k){var pt=function(){Y.current=k.scrollHeight};return k.addEventListener("focus",pt,{capture:!0,passive:!0}),function(){return k.removeEventListener("focus",pt)}}},[k]),h(function(){var pt;return[Dr(pt=["%cRender%c: Render"]).call(pt,En(Vn("cyan",""))),{animateTo:D,animating:D!==null,sticky:Ze,target:k}]}),ne.createElement(h1.Provider,{value:dn},ne.createElement(yE.Provider,{value:Er},ne.createElement(SE.Provider,{value:kn},ne.createElement(wE.Provider,{value:en},ne.createElement(bE.Provider,{value:Zn},r,k&&ne.createElement(kO,{debounce:a,name:"scroll",onEvent:Vt,target:k}),k&&D!==null&&ne.createElement(NO,{name:"scrollTop",onEnd:et,target:k,value:D}))))))};UE.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:xCe};UE.propTypes={checkInterval:Mn.number,children:Mn.any,debounce:Mn.number,debug:Mn.bool,initialScrollBehavior:Mn.oneOf(["auto","smooth"]),mode:Mn.oneOf(["bottom","top"]),nonce:Mn.string,scroller:Mn.func};var ACe={height:"100%",overflowY:"auto",width:"100%"},zE=function(t){var n=t.children,r=t.className,a=P.useContext(h1),o=a.setTarget,i=DE()(ACe);return ne.createElement("div",{className:vE(i,(r||"")+""),ref:o},n)};zE.defaultProps={children:void 0,className:void 0};zE.propTypes={children:Mn.any,className:Mn.string};var FCe={position:"relative"},VE=function(t){var n=t.children,r=t.className,a=t.followButtonClassName,o=t.scrollViewClassName,i=DE()(FCe);return ne.createElement("div",{className:vE(i,(r||"")+"")},ne.createElement(zE,{className:(o||"")+""},n),ne.createElement(TE,{className:(a||"")+""}))};VE.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0};VE.propTypes={children:Mn.any,className:Mn.string,followButtonClassName:Mn.string,scrollViewClassName:Mn.string};var WE=function(t){var n=t.checkInterval,r=t.children,a=t.className,o=t.debounce,i=t.debug,l=t.followButtonClassName,c=t.initialScrollBehavior,f=t.mode,h=t.nonce,g=t.scroller,y=t.scrollViewClassName;return ne.createElement(UE,{checkInterval:n,debounce:o,debug:i,initialScrollBehavior:c,mode:f,nonce:h,scroller:g},ne.createElement(VE,{className:a,followButtonClassName:l,scrollViewClassName:y},r))};WE.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0};WE.propTypes={checkInterval:Mn.number,children:Mn.any,className:Mn.string,debounce:Mn.number,debug:Mn.bool,followButtonClassName:Mn.string,initialScrollBehavior:Mn.oneOf(["auto","smooth"]),mode:Mn.oneOf(["bottom","top"]),nonce:Mn.string,scroller:Mn.func,scrollViewClassName:Mn.string};function OCe(){var e=f1(),t=e.scrollToBottom;return t}function PCe(){var e=f1(),t=e.scrollToStart;return t}function jCe(){var e=f1(),t=e.scrollToTop;return t}sce();const LCe=e=>{const{locationState:{query:t},globalState:{memoListView:n,manifest:r},dailyNotesState:{app:a,settings:o}}=P.useContext(Lt),{thinos:i}=e,[l,c]=ne.useState(bv(i,"day")),f=ne.useRef(null),h=OCe(),g=P.useRef([]);P.useRef(0),P.useEffect(()=>{const S=bv(i,"day");Iw.isEqual(S,l)||c(S)},[i]),P.useEffect(()=>{var N,R;if(Iw.isEqual(g.current,i))return;const S=i.filter(k=>k.pinned),D=i.filter(k=>!k.pinned),I=g.current.filter(k=>k.pinned)[0],M=g.current.filter(k=>!k.pinned)[0];(I&&I.id!==((N=S[0])==null?void 0:N.id)||M&&M.id!==((R=D[0])==null?void 0:R.id))&&h()},[i]),P.useEffect(()=>{f.current&&h()},[t]);const y=P.useCallback(()=>{a.setting.open(),a.setting.openTabById(r.id||"obsidian-memos")},[a]),w=P.useMemo(()=>v.jsx(v.Fragment,{children:Object.keys(l).map((S,D)=>v.jsx(v.Fragment,{children:v.jsx(RCe,{thinos:l[S],dayMark:S,handleOpenSettings:y},S+D)}))}),[l]);return v.jsx("div",{ref:f,className:ar("chat-view",`${o==null?void 0:o.chatViewStyle}-style`),children:w})},RCe=({thinos:e,dayMark:t,handleOpenSettings:n})=>{const{dailyNotesState:{settings:r,app:a}}=P.useContext(Lt),[o,i]=ne.useState(!0),l=ne.useRef(null),[c,f]=ne.useState(r==null?void 0:r.MomentsIcon);P.useEffect(()=>{if(!(r!=null&&r.MomentsIcon)||!a)return;const w=a.vault.adapter.getResourcePath(x.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 h=w=>{if(x.Keymap.isModifier(w.nativeEvent,"Mod")){const S=x.moment(t,"YYYY-MM-DD");at.setFromAndToQuery(S.startOf("day").valueOf(),S.endOf("day").valueOf());return}i(!o),l.current.scrollIntoView(!0)},g=w=>{Up(w)},y=P.useMemo(()=>e.map((w,S)=>v.jsxs("div",{className:"thino-bubble right",children:[v.jsx(_Ce,{icon:c,handleOpenSettings:n}),v.jsx("div",{className:"wrap",children:v.jsx(BCe,{thino:w,handleClickTimeStamp:g},`${w.id}-${x.moment(w.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${S}`)})]},w.id+S)),[e,c]);return v.jsxs(v.Fragment,{children:[o&&y,v.jsx("div",{className:`thino-chat-day-mark day-mark ${o?"":"folded"}`,onClick:h,children:v.jsx("div",{className:"day-mark-bubble",children:(t==="PINNED"?t+" 📌":t)+(o?"":"...")})})]})},_Ce=({icon:e,handleOpenSettings:t})=>v.jsx("div",{ref:n=>{if(e){n==null||n.empty();return}e||n&&x.setIcon(n,"Memos")},className:"icon-img",style:{backgroundImage:`url("${e}")`}}),BCe=({thino:e,handleClickTimeStamp:t})=>{const n=P.useCallback(async()=>{if(e.thinoType==="JOURNAL")return;const o=await be.updateMemo(e.id,e.content,e.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");o&&be.editMemo(o)},[e]),r=P.useMemo(()=>v.jsxs("div",{className:"content",children:[v.jsx("div",{className:"time-stamp","data-date":x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),"data-time":x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm:ss"),onClick:()=>{t(e)},children:x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm:ss")}),v.jsx(ai,{memo:e})]}),[e.content]),a=P.useMemo(()=>{var o;return v.jsxs("div",{className:"content task",children:[v.jsx("div",{className:"task-inputer",children:v.jsx("input",{className:ar("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":(o=e.thinoType)==null?void 0:o.slice(5),onClick:n})}),v.jsx("div",{className:"time-stamp","data-date":x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),"data-time":x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm:ss"),onClick:()=>{t(e)},children:x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm:ss")}),v.jsx(ai,{memo:e})]})},[e.content,e.thinoType]);return e.thinoType==="JOURNAL"?r:a},HCe=3e3;function YCe({statusRef:e,isComplete:t,handleFetchMoreClick:n,cachedMemos:r}){P.useEffect(()=>{const a=e.current;if(!a)return;const o=mb.throttle(async()=>{await n()},HCe,{trailing:!1}),i=new IntersectionObserver(([l])=>{l.isIntersecting&&!t&&o()});return i.observe(a),()=>{i.unobserve(a),o.cancel()}},[t,e,n]),P.useEffect(()=>{r.length<40&&!t&&n()},[r.length,t,n])}function bv(e,t){const n={},r={day:"YYYY-MM-DD ddd",week:"YYYY-[W]WW",month:"YYYY-MM",quarter:"YYYY-[Q]Q",year:"YYYY"};return e.forEach(a=>{const o=a.pinned?"PINNED":x.moment(a.createdAt,"YYYY/MM/DD HH:mm:ss").format(r[t]);n[o]||(n[o]=[]),n[o].push(a)}),n}function AO(e){return e.slice().sort((t,n)=>t.pinned!==n.pinned?t.pinned?-1:1:x.moment(t.createdAt,"YYYY/MM/DD HH:mm:ss").isAfter(x.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss"))?-1:1)}function UCe(e,t){if(e.length===0)return t;const n=new Map(t.map(i=>[i.id,i])),r=[],a=e==null?void 0:e.reduce((i,l)=>{if(n.has(l.id)){const c=n.get(l.id);Iw.isEqual(l,c)?i.push(l):i.push({...c}),n.delete(l.id)}return i},[]);n.forEach(i=>r.push(i));const o=a.concat(r);return AO(o)}function kg(e){const{tag:t,duration:n,type:r,text:a,filter:o,path:i,metadata:l}=e,c=on.getQueryById(o),f=!l||Object.keys(l).length===0;return!(!!(t||n&&n.from((e.match(r)||[]).forEach(a=>{const i=(a==null?void 0:a.replace(r,"$1").trim()).split("/");let l="";i.forEach(c=>{l+=c,n.add(l),l+="/"})}),n),new Set)}function VCe(e){if(!Array.isArray(e)||e.length===0)return new Set;const t=e.filter(r=>!!r).map(r=>r.toString().trim());if(t.length===0)return new Set;const n=new Set;return t.forEach(r=>{const a=r.split("/");let o="";a.forEach((i,l)=>{o+=(l>0?"/":"")+i,n.add(o)})}),n}const WCe=({tempMemos:e,query:t,HideDoneTasks:n})=>{const r=e.filter(D=>D.rowStatus!=="ARCHIVED"&&!D.deletedAt),{tag:a,duration:o,type:i,text:l,filter:c,path:f,metadata:h}=t,g=on.getQueryById(c),y=l.toLowerCase(),w=!h||Object.keys(h).length===0;return!!(a||o&&o.from{var I,M;if(D.content.contains("comment:")||n&&D.thinoType==="TASK-DONE")return!1;if(g){const N=JSON.parse(g.querystring);if(Array.isArray(N)&&!Yp(D,N))return!1}if(!w&&Object.keys(h).some(R=>{var k;return((k=D.fileInfo)==null?void 0:k.frontmatter[R])!==h[R]})||f&&!D.path.toLowerCase().includes(f.toLowerCase())||a&&((I=D==null?void 0:D.fileInfo)!=null&&I.tags)&&!zCe(D.content).has(a)&&!VCe((M=D==null?void 0:D.fileInfo)==null?void 0:M.tags).has(a)||o&&o.from!==0&&o.to!==0&&(ut.getTimeStampByDate(D.createdAt)o.to))return!1;if(i)switch(i){case"NOT_TAGGED":if(D.content.match($r)||D.content.match(Wa)||D.content.match(ua))return!1;break;case"LINKED":if(!D.content.match(Mf))return!1;break;case"IMAGED":if(!D.content.match(kf))return!1;break;case"CONNECTED":if(!D.content.match(rd))return!1;break}return!!D.content.toLowerCase().includes(y)}):r},$Ce=({updateThinos:e,listView:t})=>{const{locationState:{query:n},memoState:{memos:r},dailyNotesState:{app:a,settings:o}}=P.useContext(Lt),i=jCe(),l=PCe(),[c,f]=P.useState(!1),[h,g]=P.useState(!1),[y,w,S]=xo([]),[D,I]=P.useState([]),[M,N]=P.useState({}),[R,k]=P.useState((a==null?void 0:a.loadLocalStorage("showDayMark"))||!1),[B,L]=P.useState((a==null?void 0:a.loadLocalStorage("dayMarkRange"))||"day"),[_,V,Y]=xo([]),Z=P.useRef(null),Q=P.useRef(null),K=P.useRef(null),se=P.useRef(!1);P.useEffect(()=>{l(),w(_.slice(0,y.length>20?Math.min(y.length,20):20))},[t]),P.useEffect(()=>()=>{Q.current&&(Q.current=null),K.current&&(K.current=null)},[]),P.useLayoutEffect(()=>{if(r.length!==0&&se.current===!0)return;const ie=ZCe(a||window.app);!ie||ie.length===0||(V(ie),I(ie),k((a==null?void 0:a.loadLocalStorage("showDayMark"))||!1),a!=null&&a.loadLocalStorage("showDayMark")&&N(bv(ie,(a==null?void 0:a.loadLocalStorage("dayMarkRange"))||"day")))},[]),P.useEffect(()=>{if(r.length===0&&!be.initialized)return;f(!1);const ie=AO(r),ce=WCe({tempMemos:ie,query:n,HideDoneTasks:(o==null?void 0:o.HideDoneTasks)||!1});return se.current=!0,e&&e(ce),V(ce),()=>{se.current=!1}},[r,n,o==null?void 0:o.HideDoneTasks]),P.useEffect(()=>{const ce=_.slice(0,y.length>20?Math.min(y.length,20):20);w(X=>UCe(X,ce))},[_]),P.useEffect(()=>{var ie;y.length<20&&((ie=K.current)==null||ie.click())},[_]),P.useEffect(()=>{(kg(n)&&y.length<_.length||y.length<_.length&&!kg(n))&&g(!1),(kg(n)&&y.length===r.length&&r.length>0||!kg(n)&&y.length===_.length&&_.length>0)&&g(!0),qCe(y||[],a),I(y),a==null||a.saveLocalStorage("showDayMark",o==null?void 0:o.showDayMark),a==null||a.saveLocalStorage("dayMarkRange",o==null?void 0:o.dayMarkRange),k((o==null?void 0:o.showDayMark)||!1),L((o==null?void 0:o.dayMarkRange)||"day"),o!=null&&o.showDayMark&&N(bv(y,(o==null?void 0:o.dayMarkRange)||"day"))},[y,o==null?void 0:o.showDayMark,o==null?void 0:o.dayMarkRange]),P.useEffect(()=>{i()},[n]);const le=async()=>{try{if(Y.current.length>S.current.length){f(!0);const ie=Math.min(S.current.length+20,Y.current.length)-S.current.length,ce=Y.current.slice(S.current.length,S.current.length+ie);w(X=>[...X,...ce]),f(!1),g(ce.length<20)}}catch(ie){console.error(ie),new x.Notice(ie.response.data.message)}};YCe({statusRef:Q,isComplete:h,handleFetchMoreClick:le,cachedMemos:y});const fe=P.useMemo(()=>v.jsx("div",{ref:Q,className:ar("status-text-container",t==="calendar"||t==="table"?"hidden":""),children:v.jsx("p",{className:"status-text",children:c?E("Fetching data..."):h?_.length===0?E("Noooop!"):E("All Data is Loaded 🎉"):v.jsx(v.Fragment,{children:v.jsx("span",{ref:K,className:"cursor-pointer hover:text-green-600",onClick:le,children:E("fetch more")})})})}),[t,le,_,c,h,Q]),$=ie=>{switch(ie){case"list":return v.jsx(Lw,{breakpointCols:1,className:`${t}-view masonry-memolist`,columnClassName:"masonry-memolist-grid_column",children:R?v.jsx(v.Fragment,{children:Object.keys(M).sort((ce,X)=>X-ce).map(ce=>v.jsx(xT,{type:"list",thinos:M[ce],dayMark:ce,dayMarkRange:B},ce))}):D.map((ce,X)=>v.jsx(ai,{memo:ce},`${ce.id}-${X}`))});case"waterfall":return v.jsx(v.Fragment,{children:R&&Object.keys(M).length>0?Object.keys(M).map(ce=>v.jsx(xT,{type:"waterfall",thinos:M[ce],dayMark:ce,dayMarkRange:B},ce)):v.jsx(Lw,{breakpointCols:3,className:`${t}-view masonry-memolist`,columnClassName:"masonry-memolist-grid_column",children:D.map((ce,X)=>v.jsx(ai,{memo:ce},`${ce.id}-${X}`))})});case"chat":return v.jsx(LCe,{thinos:D});case"calendar":return v.jsx(Ale,{thinos:_});case"table":return v.jsx(rce,{thinos:_,isFiltering:!kg(n)});case"moments":return v.jsx(JCe,{thinos:D})}},he=ie=>{switch(ie){case"top":return t==="chat"&&fe;case"bottom":return t!=="chat"&&fe}};return v.jsxs(WE,{className:`memolist-wrapper ${h?"completed":""} `,mode:t==="chat"?"bottom":"top",initialScrollBehavior:"auto",checkInterval:30,followButtonClassName:ar("scroll-to-bottom-button",t==="chat"?"to-bottom":"to-top"),scrollViewClassName:"memolist-scrollview",children:[he("top"),v.jsx("div",{ref:Z,className:"memolist-container",children:$(t)}),he("bottom")]})};function FO(e){return`memosListCache:${e}`}function ZCe(e){var t;try{const n=FO(e==null?void 0:e.appId),r=la.get([n])[n];return r?((t=JSON.parse(r))==null?void 0:t.memos)||[]:[]}catch(n){return console.error(n),[]}}function qCe(e,t){try{if(!e)return;const n=e==null?void 0:e.slice(0,100),r=FO(t==null?void 0:t.appId);la.set({[r]:JSON.stringify({memos:n})})}catch(n){console.error(n)}}const GCe=({userIcon:e})=>v.jsx("div",{className:"moments-view-user-icon",ref:t=>{if(e){t==null||t.empty();return}e||t&&x.setIcon(t,"Memos")},style:{backgroundImage:`url("${e}")`}}),y2="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=",bw="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=",JCe=e=>{const{globalState:{memoListView:t,markMemoId:n,manifest:r,editMemoId:a},dailyNotesState:{app:o,settings:i}}=P.useContext(Lt),{thinos:l}=e,c=ne.useRef(null),f=ne.useRef(null),[h,g]=ne.useState(!1),[y,w]=P.useState({}),[S,D]=P.useState((o==null?void 0:o.loadLocalStorage("dayMarkRange"))||"day"),[I,M]=ne.useState(i==null?void 0:i.MomentsIcon);P.useEffect(()=>{if(!(i!=null&&i.MomentsIcon)||!o)return;const R=o.vault.adapter.getResourcePath(x.normalizePath(i.MomentsIcon));R&&!(i!=null&&i.MomentsIcon.startsWith("http"))?M(R):M(i==null?void 0:i.MomentsIcon)},[i==null?void 0:i.MomentsIcon,o]),P.useEffect(()=>{i!=null&&i.showDayMark&&w(bv(l,(o==null?void 0:o.loadLocalStorage("dayMarkRange"))||"day"))},[l]),P.useEffect(()=>{c.current.closest(".workspace-window")&&g(!0)},[c.current]),P.useEffect(()=>{n&&g(!0)},[n]),P.useEffect(()=>{a?(g(!0),setTimeout(()=>{o.workspace.trigger("focus-on-textarea")},200)):g(!1)},[a]),P.useEffect(()=>{f.current&&(!h&&x.setIcon(f.current,"camera"),h&&x.setIcon(f.current,"camera-off"))},[f.current,h]);const N=P.useCallback(()=>{o.setting.open(),o.setting.openTabById(r.id||"obsidian-memos")},[o]);return v.jsxs("div",{ref:c,className:ar("moments-view",h?"show-editor":""),children:[v.jsxs("div",{className:"moments-view-background-wrapper",children:[v.jsx(KCe,{}),v.jsx("div",{ref:f,className:"moments-show-editor-btn",onClick:()=>{a&&h||((h||a)&&g(!h),!h&&!a&&new CT(o).open())}}),v.jsxs("div",{className:"moments-view-background-overlay",children:[v.jsxs("div",{className:"moments-view-user-info",children:[v.jsx("div",{className:"moments-view-user-name",children:i==null?void 0:i.UserName}),v.jsx(GCe,{userIcon:I})]}),v.jsx("div",{className:"moments-view-user-idea",children:i.MomentsQuote||" "})]})]}),i!=null&&i.showDayMark?y&&Object.keys(y).length>0&&Object.keys(y).map((R,k)=>v.jsx(xT,{type:"list",thinos:y[R],dayMark:R,dayMarkRange:S,thinoWrapper:B=>v.jsx(tN,{thino:B.thino,handleOpenSettings:N},B.thino.createdAt+k)},R)):l.map((R,k)=>v.jsx(tN,{thino:R,handleOpenSettings:N},R.createdAt+k))]})},KCe=()=>{const{dailyNotesState:{app:e,view:t,settings:n}}=P.useContext(Lt),[r,a]=P.useState((n==null?void 0:n.MomentsBackgroundImage)||bw);return P.useEffect(()=>{if(!(n!=null&&n.MomentsBackgroundImage)||!e){a(document.body.hasClass("theme-dark")?y2:bw);return}const o=e.vault.adapter.getResourcePath(x.normalizePath(n.MomentsBackgroundImage));o&&!(n!=null&&n.MomentsBackgroundImage.startsWith("http"))?a(o):a(n==null?void 0:n.MomentsBackgroundImage)},[n==null?void 0:n.MomentsBackgroundImage,e]),P.useEffect(()=>{t&&t.registerEvent(t.app.workspace.on("css-change",()=>{a(document.body.hasClass("theme-dark")&&!(n!=null&&n.MomentsBackgroundImage)?y2:!document.body.hasClass("theme-dark")&&!(n!=null&&n.MomentsBackgroundImage)?bw:n==null?void 0:n.MomentsBackgroundImage)}))},[t]),v.jsx("div",{className:"moments-view-background",style:{backgroundImage:`url("${r}")`}})},QCe=e=>{const{icon:t}=e,n=P.useCallback(()=>{app.setting.open(),app.setting.openTabById(manifest.id||"obsidian-memos")},[]);return v.jsx("div",{className:"thino-moment-icon",ref:r=>{if(t){r==null||r.empty();return}t||r&&x.setIcon(r,"Memos")},style:{backgroundImage:`url("${t}")`},onClick:n})},tN=e=>{const{dailyNotesState:{settings:t,app:n}}=P.useContext(Lt),r=P.useRef(null),a=P.useRef(null),{thino:o}=e,[i,l]=P.useState("");return P.useEffect(()=>{if(!(t!=null&&t.MomentsIcon)||!n)return;const c=n.vault.adapter.getResourcePath(x.normalizePath(t.MomentsIcon));c&&!(t!=null&&t.MomentsIcon.startsWith("http"))?l(c):l(t==null?void 0:t.MomentsIcon)},[t==null?void 0:t.MomentsIcon,n]),P.useEffect(()=>{r.current&&x.setIcon(r.current,"more-horizontal")},[r.current]),v.jsxs("div",{className:"thino-moment-wrapper",children:[v.jsx(QCe,{icon:i}),v.jsxs("div",{ref:a,className:"thino-moment-container",children:[v.jsx("div",{className:"thino-moment-user-name",children:t==null?void 0:t.UserName}),v.jsx("div",{className:"thino-moment-user-content",children:v.jsx(ai,{memo:o})})]})]})},XCe='',exe='',nN=(e,t)=>{const n=window.atob(e),r=new ArrayBuffer(n.length),a=new Uint8Array(r);for(let o=0;o{const{vault:t}=ft.getState().app,n=await t.adapter.readBinary(e),r=new Uint8Array(n),a=new Blob([r],{type:"image/png"});return new Promise(o=>{const i=new FileReader;i.onloadend=()=>{const l=i.result;o(l)},i.readAsDataURL(a)})},txe=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 a=await jg(t);t.style.backgroundImage=`url("${a}")`}},$E=async e=>{const t=e.findAll("img");for(const n of t)if(n.src.startsWith("http://localhost")){const r=await wf(n.getAttribute("path")||x.normalizePath(n==null?void 0:n.parentElement.getAttribute("src")));n.src=r}else{const r=await gz(n);n.src=r}},nxe=async e=>{const{app:t,settings:n}=ft.getState();let r,a;const o=document.body.hasClass("theme-light"),i=o?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,l=await t.vault.adapter.exists(i)&&/\.(png|svg|jpg|jpeg)/g.test(i),c=i==null?void 0:i.startsWith("http");switch(e){case"clean":l||c?(a=i,r=c?await wf(i):await rN(a)):r=o?bw:y2;break;case"minimal":break;case"modern":default:l||c?(a=i,r=c?await wf(i):await rN(a)):r="data:image/svg+xml;base64,"+btoa(o?XCe:exe);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},rxe=e=>{const{memo:t,destroy:n}=e,{memos:r}=Le.getState().memoState,{view:a,app:o,settings:i}=Le.getState().dailyNotesState,l={...t,createdAtStr:ut.getDateTimeString(t.createdAt)},[c,f]=P.useState(!1),[h,g]=P.useState(l.content),[y,w]=P.useState(!1),S=P.useRef(null),D=P.useRef(null),I=P.useRef(null),[M,N]=P.useState(e.style||(o||window.app).loadLocalStorage("memoShareDialogStyle")||"clean"),[R,k]=P.useState(""),B=P.useRef(null),L=P.useRef(null),[_,V]=ne.useState(i==null?void 0:i.MomentsIcon);P.useEffect(()=>{if(!(i!=null&&i.MomentsIcon)||!o)return;const he=o.vault.adapter.getResourcePath(x.normalizePath(i.MomentsIcon));he&&!(i!=null&&i.MomentsIcon.startsWith("http"))?V(he):V(i==null?void 0:i.MomentsIcon)},[i==null?void 0:i.MomentsIcon,o]);let Y,Z;r.length&&(Y=r.length>0?r[r.length-1]:null,Y?Z=r?Math.ceil((Date.now()-ut.getTimeStampByDate(Y==null?void 0:Y.createdAt))/1e3/3600/24)+1:0:Z=0),i==null||i.ShareFooterEnd.replace("{UserName}",i==null?void 0:i.UserName);const Q=i==null?void 0:i.ShareFooterStart.replace("{ThinoNum}",r.length.toString()).replace("{UsedDay}",Z.toString());P.useEffect(()=>{!S.current||!D.current||(x.setIcon(S.current,"copy"),x.setIcon(D.current,"x"))},[S,D]),P.useEffect(()=>{I.current&&x.setIcon(I.current,"file-down")},[I]),P.useEffect(()=>{x.setIcon(S.current,y?"loader":"copy"),S.current.disabled=y,S.current.toggleClass("copying",y)},[y]),P.useEffect(()=>{if(!L.current||!a&&!e.view||c)return;g(t.content),L.current.hasChildNodes()&&L.current.empty();async function he(){var ie;(ie=L.current)==null||ie.toggleClass(["markdown-rendered"],!0),await x.MarkdownRenderer.render(o,t.content+` `,L.current,t.path,a||e.view)}he(),setTimeout(async()=>{await K()},oA)},[B,L,l,M]);const K=async()=>{B.current&&(await txe(B.current),await $E(B.current),nxe(M).then(he=>{he&&setTimeout(()=>{xb(B.current,{pixelRatio:window.devicePixelRatio*2}).then(ie=>{k(ie),f(!0)}).catch(()=>{})},600)}))},se=()=>{n()},le=P.useCallback(he=>{w(he)},[y]),fe=async()=>{const{vault:he}=Le.getState().dailyNotesState.app,ie=B.current.querySelector(".memo-shortcut-img");if(!ie)return;const ce=ie==null?void 0:ie.getAttribute("src").split("base64,")[1],X=nN(ce,"image/png");let ae;X.arrayBuffer().then(async De=>{const je="png",Re=qu();for(const Fe in Re)if(Re[Fe]instanceof x.TFile){ae=Re[Fe];break}if(ae!==void 0){const Fe=await he.getAvailablePathForAttachments(`Pasted Image ${x.moment().format("YYYYMMDDHHmmss")}`,je,ae);await he.createBinary(Fe,De),new x.Notice(E("Save image successfully"))}})},$=async()=>{le(!0);const he=B.current.querySelector(".memo-shortcut-img");if(!he)return;const ie=he==null?void 0:he.getAttribute("src").split("base64,")[1],ce=nN(ie,"image/png");if(!ce){new x.Notice(E("Copy to clipboard failed"));return}const X=new ClipboardItem({"image/png":ce});window.navigator.clipboard.write([X]).then(()=>{setTimeout(()=>{le(!1)},500)}),new x.Notice(E("Copy to clipboard successfully"))};return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:ar("dialog-header-container"),children:[v.jsxs("p",{className:"title-text",children:[v.jsx("span",{className:"icon-text",children:"🥰"}),E("Share Memo Image")]}),v.jsxs("div",{className:"btn-group",children:[x.Platform.isMobile&&v.jsx("button",{ref:I,className:"btn download-btn",onClick:fe}),v.jsx("button",{ref:S,className:"btn copy-btn",onClick:$}),v.jsx("button",{ref:D,className:"btn close-btn",onClick:se})]})]}),v.jsxs("div",{className:ar("dialog-content-container",M),children:[v.jsx("div",{className:`tip-words-container ${R?"finish":"loading"}`,children:v.jsx("p",{className:"tip-text",children:E(R?"↗Click the button to save":"Image is generating...")})}),v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Default sharing style")}),v.jsx("div",{className:"setting-item-description",children:E("Set the default style for sharing thino, 'Modern' by default.")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsxs("select",{className:"dropdown",defaultValue:M,onChange:async he=>{he.currentTarget.value!==M&&(f(!1),k(""),N(he.currentTarget.value),(o||window.app).saveLocalStorage("memoShareDialogStyle",he.currentTarget.value),await K())},children:[v.jsx("option",{value:"modern",children:E("Modern")}),v.jsx("option",{value:"clean",children:E("Clean")}),v.jsx("option",{value:"minimal",children:E("Minimal")}),v.jsx("option",{value:"gradient",children:E("Gradient")})]})})]}),v.jsxs("div",{className:ar("memo-container",M),ref:B,children:[v.jsx(ts,{when:R!=="",children:v.jsx("img",{className:"memo-shortcut-img",onClick:$,src:R})}),v.jsxs("div",{className:"memo-background",children:[v.jsx("div",{className:"property-image",style:{backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"}}),v.jsx("span",{className:"background-container"}),v.jsxs("div",{className:"thino-user-header",children:[v.jsx("div",{className:"thino-user-icon",ref:he=>{if(i!=null&&i.MomentsIcon){he==null||he.empty();return}i!=null&&i.MomentsIcon||he&&x.setIcon(he,"Memos")},style:{backgroundImage:`url("${_}")`}}),v.jsxs("div",{className:"thino-user-info",children:[v.jsx("div",{className:"thino-user-name",children:i==null?void 0:i.UserName}),(i==null?void 0:i.MomentsQuote)&&v.jsx("div",{className:"thino-user-quote",children:i==null?void 0:i.MomentsQuote})]})]}),v.jsx("div",{ref:L,className:"memo-content-text",style:{minHeight:i.MinHeightForShare||"200px"}}),v.jsx("div",{className:"thino-time-footer",children:l.createdAt}),v.jsxs("div",{className:"watermark-container",children:[v.jsxs("span",{className:"normal-text footer-start",children:[v.jsx("div",{className:"property-social-icons"}),v.jsx("span",{className:"name-text",children:Q})]}),v.jsx("span",{className:"normal-text footer-end",children:v.jsx("span",{className:"name-text",children:"THINO"})})]})]})]})]})]})};function sf(e,t,n){bb({className:"share-memo-image-dialog"},rxe,{memo:e,style:t,view:n})}function im(e=!0){const[t,n]=P.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 axe=e=>{const{dailyNotesState:{app:t,settings:n,view:r}}=P.useContext(Lt),{memo:a,handleUnarchivedMemoAction:o}=e,i=ne.useRef(null),l=ne.useRef(null),[c,f]=ne.useState(""),h={...a,createdAtStr:ut.getDateTimeString(a.createdAt),deletedAtStr:ut.getDateTimeString(a.deletedAt||a.createdAt)},[g,y]=Kl(!1),w={restore:P.useRef(null),delete:P.useRef(null),source:P.useRef(null)};P.useEffect(()=>{l&&(x.setIcon(w.restore.current,"archive-restore"),x.setIcon(w.delete.current,"trash"),x.setIcon(w.source.current,"home"))},[l]),P.useEffect(()=>{if(!i.current||!l.current||i.current.hasChildNodes()&&a.content===c||!r)return;f(a.content),i.current.hasChildNodes()&&i.current.empty();async function N(){var k,B;(k=i.current)==null||k.toggleClass(["markdown-rendered"],!0),await x.MarkdownRenderer.render(t,a.content+` `,i.current,a.path,r);const R=(B=i.current)==null?void 0:B.querySelectorAll(".internal-link");R==null||R.forEach(L=>{const _=L,V=_.getAttribute("data-href");if(!V)return;t.metadataCache.getFirstLinkpathDest(V,a.path)||L.classList.add("is-unresolved"),_.addEventListener("mouseover",Z=>{Z.stopPropagation(),t.workspace.trigger("hover-link",{event:Z,source:"thino",hoverParent:r.containerEl,targetEl:_,linktext:V,sourcePath:_.href})})})}N()},[a.content,l]);const S=async()=>{switch(h.sourceType){case"DAILY":await z2(h.id,h.path);break;case"CANVAS":await W2(h.id,h.path);break;case"MULTI":await U2(h.path);break;case"FILE":await V2(h.id,h.path);break}},D=async()=>{if(g)try{if(n.DeleteThinoDirectly)await be.deleteMemoById(h.id);else{const N=await be.hideMemoById(h.id);N&&be.editMemo(N)}}catch(N){new x.Notice(N.message)}else y()},I=async()=>{try{const N=await be.unarchiveMemo(h);N&&be.editMemo(N),o(h.id),new x.Notice(E("RESTORE SUCCEED"))}catch(N){new x.Notice(N.message)}},M=()=>{g&&y(!1)};return v.jsxs("div",{ref:l,className:`memo-wrapper ${"memos-"+h.id}`,onMouseLeave:M,children:[v.jsxs("div",{className:"memo-top-wrapper",children:[v.jsxs("span",{className:"time-text",children:[E("ARCHIVED AT")," ",h.updatedAt]}),v.jsxs("div",{className:"btns-container",children:[v.jsx("span",{ref:N=>{N&&x.setIcon(N,"more-horizontal")},className:"btn more-action-btn"}),v.jsx("div",{className:"more-action-btns-wrapper",children:v.jsxs("div",{className:"more-action-btns-container",children:[v.jsxs("div",{className:"more-action-menu-item",children:[v.jsx("span",{ref:w.restore,className:"more-action-item-icon"}),v.jsx("span",{className:"btn restore-btn",onClick:I,children:E("RESTORE")})]}),v.jsxs("div",{className:"more-action-menu-item",children:[v.jsx("span",{ref:w.source,className:"more-action-item-icon"}),v.jsx("span",{className:"btn",onClick:S,children:E("SOURCE")})]}),v.jsxs("div",{className:"more-action-menu-item delete-menu-item",children:[v.jsx("span",{ref:w.delete,className:"more-action-item-icon"}),v.jsx("span",{className:`btn delete-btn ${g?"final-confirm":""}`,onClick:D,children:E(g?"CONFIRM!":"DELETE")})]})]})})]})]}),v.jsx("div",{ref:i,className:"memo-content-text"})]})},Ru=e=>{var n;const t=new Map;for(const r of e){const a=r.path;t.has(a)||t.set(a,[]),(n=t.get(a))==null||n.push(r)}return Array.from(t).map(([r,a])=>({path:r,thinos:a}))},oxe=({memos:e,query:t,HideDoneTasks:n})=>{const{tag:r,duration:a,type:o,text:i,filter:l}=t,c=on.getQueryById(l);return!!(r||a&&a.from{let g=!0;if(h.thinoType!==void 0&&n&&h.thinoType==="TASK-DONE"&&(g=!1),h.content.contains("comment:")&&(g=!1),c){const y=JSON.parse(c.querystring);Array.isArray(y)&&(g=Yp(h,y))}if(r){const y=new Set;for(const w of Array.from(h.content.match($r)||[])){const D=w.replace($r,"$1").trim().split("/");let I="";for(const M of D)I+=M,y.add(I),I+="/"}for(const w of Array.from(h.content.match(ua)||[])){const D=w.replace(ua,"$1").trim().split("/");let I="";for(const M of D)I+=M,y.add(I),I+="/"}for(const w of Array.from(h.content.match(Wa)||[])){const D=w.replace(Wa,"$2").trim().split("/");let I="";for(const M of D)I+=M,y.add(I),I+="/"}y.has(r)||(g=!1)}return a&&a.froma.to)&&(g=!1),o&&(o==="NOT_TAGGED"&&(h.content.match($r)!==null||h.content.match(Wa)!==null||h.content.match(ua)!==null)||o==="LINKED"&&h.content.match(Mf)===null||o==="IMAGED"&&h.content.match(kf)===null||o==="CONNECTED"&&h.content.match(rd)===null)&&(g=!1),i&&!h.content.toLowerCase().includes(i.toLowerCase())&&(g=!1),g}):e.filter(h=>!h.content.contains("comment:"))},ixe=()=>{const{locationState:{query:e},globalState:{isMobileView:t},memoState:{memos:n}}=P.useContext(Lt),r=im(),[a,o]=P.useState([]),i=ne.useRef(null),l=ne.useRef(null);P.useEffect(()=>{l.current&&x.setIcon(l.current,"more-horizontal")},[l]),P.useEffect(()=>{const S=oxe({memos:n.filter(D=>D.rowStatus==="ARCHIVED"&&D.deletedAt===""),query:e,HideDoneTasks:!1});o(S),r.setFinish()},[n,i.current,e]);const c=P.useCallback(S=>{o(D=>D.filter(I=>I.id!==S))},[]),f=P.useCallback(S=>{o(D=>D.filter(I=>I.id!==S))},[]),h=P.useCallback(()=>{dt.setShowSiderbarInMobileView(!0)},[]),g=async()=>{if(!((a==null?void 0:a.length)>0))return;if(!await zl()){fn();return}const S=[...a];try{const D=S.filter(R=>R.sourceType==="DAILY"),I=S.filter(R=>R.sourceType!=="DAILY"),M=await be.unarchiveThinoBulk(I);for(const R of M)R&&be.editMemo(R);const N=Ru(D);for(const{path:R,thinos:k}of N)await be.dealWithDailyThinoBulk(R,k,"restoreFromArchive");new x.Notice(E("RESTORE SUCCEED")),at.clearQuery()}catch(D){console.error("error",D),new x.Notice(D.message)}},y=async()=>{if(!((a==null?void 0:a.length)>0))return;if(!await zl()){fn();return}const S=[...a],D=ft.getState().settings.DeleteThinoDirectly;try{const I=S.filter(R=>R.sourceType==="DAILY"),M=S.filter(R=>R.sourceType!=="DAILY");for(const R of M)if(D)await be.deleteMemoById(R.id);else{const k=await be.hideMemoById(R.id);k&&be.editMemo(k)}const N=Ru(I);for(const{path:R,thinos:k}of N)await be.dealWithDailyThinoBulk(R,k,D?"deleteForever":"delete");at.clearQuery()}catch(I){console.error("error",I),new x.Notice(I.message)}},w=S=>{const D=new x.Menu;D.addItem(I=>{I.setTitle(E("Bulk restore")).setIcon("archive").onClick(async()=>{new _s(app,E("RESTORE"),async M=>{M==="confirm"&&await g()}).open()})}).addItem(I=>{I.setTitle(E("Bulk delete")).setIcon("trash").onClick(async()=>{new _s(app,E("DELETE"),async M=>{M==="confirm"&&await y()}).open()})}),D.showAtMouseEvent(S.nativeEvent)};return v.jsxs("div",{className:"memo-trash-wrapper",ref:i,children:[v.jsxs("div",{className:"section-header-container",children:[v.jsxs("div",{className:"title-text",children:[v.jsx(ts,{when:t,children:v.jsx("button",{ref:S=>{S&&x.setIcon(S,"menu")},className:"btn action-btn clickable-icon",onClick:h})}),v.jsxs("span",{className:"go-home-btn",onClick:()=>{at.clearQuery(),at.setPathname("/")},children:["🏠 ",E("Return To Home Page")]}),v.jsx("span",{ref:l,className:"menu-popup-btn",onClick:w})]}),v.jsx(jv,{})]}),v.jsx(my,{thinosCount:a.length,thinos:a}),r.isLoading?v.jsx("div",{className:"tip-text-container",children:v.jsx("p",{className:"tip-text",children:E("Fetching data...")})}):a.length===0?v.jsx("div",{className:"tip-text-container",children:v.jsx("p",{className:"tip-text",children:E("Here is No Memos.")})}):v.jsx("div",{className:"deleted-memos-container",children:a.map(S=>v.jsx(axe,{memo:S,handleUnarchivedMemoAction:f,handleDeletedMemoAction:c},`${S.id}-${S.updatedAt}`))})]})},zl=async()=>{var r;const{verifyState:e}=ft.getState(),t=!x.Platform.isDesktop&&await((r=window.Capacitor)==null?void 0:r.Plugins.Device.getId()),n=x.Platform.isDesktop?await cr():t.identifier||t.uuid;return e&&(e==null?void 0:e.appId)===n},sxe=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"),a=e.find(".moments-view-background");for(const o of n){const i=await jg(o);o.style.backgroundImage=`url(${i})`}if(r){const o=await jg(r);r.style.backgroundImage=`url(${o})`}if(a){const o=await jg(a);a.style.backgroundImage=`url(${o})`}}else if(t==="chat"){const n=e.querySelectorAll(".icon-img");for(const r of n){const a=await jg(r);r.style.backgroundImage=`url(${a})`}}}};class _s extends x.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",{cls:"mod-warning",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 lxe extends x.Modal{constructor(n,r){super(n);Se(this,"root");this.thinos=r}onOpen(){super.onOpen(),this.containerEl.toggleClass(["thino-bulk-action-dialog","tag-actions"],!0),this.root=rs.createRoot(this.contentEl),this.root.render(v.jsx(is,{store:Le,context:Lt,children:v.jsx(pz,{app:this.app,closeDialog:this.close.bind(this),thinos:this.thinos})}))}onClose(){var n;super.onClose(),(n=this.root)==null||n.unmount()}}const my=({thinosCount:e,thinos:t})=>{const{globalState:{memoListView:n},locationState:{query:r,pathname:a},dailyNotesState:{settings:o,app:i}}=P.useContext(Lt),{tag:l,duration:c,type:f,text:h,filter:g,path:y}=r,w=on.getQueryById(g),S=!!(l||c&&c.from{D&&x.setIcon(D.current,"more-horizontal")},[D]);const I=async()=>{if(!((t==null?void 0:t.length)>0))return;const Y=az(t),Z=iz(Y);await ut.copyTextToClipboard(Z),new x.Notice(E("Copied to clipboard Successfully"))},M=async()=>{if(!((t==null?void 0:t.length)>0))return;if(!await zl()){fn();return}const Y=[...t],Z=o.DeleteThinoDirectly;try{const Q=Y.filter(le=>le.sourceType==="DAILY"),K=Y.filter(le=>le.sourceType!=="DAILY");for(const le of K)if(Z)await be.deleteMemoById(le.id);else{const fe=await be.hideMemoById(le.id);fe&&be.editMemo(fe)}const se=Ru(Q);for(const{path:le,thinos:fe}of se)await be.dealWithDailyThinoBulk(le,fe,Z?"deleteForever":"delete");be.updateTagsState(),at.clearQuery()}catch(Q){console.error("error",Q),new x.Notice(Q.message)}},N=async()=>{if(!((t==null?void 0:t.length)>0))return;if(!await zl()){fn();return}const Y=[...t],Z=ft.getState().settings.startSync,Q=ft.getState().app,K=Q==null?void 0:Q.loadLocalStorage("tokenForSync");try{const se=Y.filter($=>$.sourceType==="DAILY"),le=Y.filter($=>$.sourceType!=="DAILY");for(const $ of le)await be.deleteMemoById($.id);const fe=Ru(se);for(const{path:$,thinos:he}of fe){const ie=await be.dealWithDailyThinoBulk($,he,"deleteForever");if(!(!K||!Z))for(const ce of ie)ce&&ce.webId&&await k2(ce.webId)}be.updateTagsState(),at.clearQuery(),new x.Notice(E("DELETE SUCCEED"))}catch(se){console.error("error",se),new x.Notice(se.message)}},R=async()=>{if(!((t==null?void 0:t.length)>0))return;if(!await zl()){fn();return}const Y=[...t];try{const Z=Y.filter(le=>le.sourceType==="DAILY"),Q=Y.filter(le=>le.sourceType!=="DAILY"),K=await be.unarchiveThinoBulk(Q);for(const le of K)le&&be.editMemo(le);const se=Ru(Z);for(const{path:le,thinos:fe}of se)await be.dealWithDailyThinoBulk(le,fe,"restoreFromArchive");new x.Notice(E("RESTORE SUCCEED")),be.updateTagsState(),at.clearQuery()}catch(Z){console.error("error",Z),new x.Notice(Z.message)}},k=async()=>{if(!((t==null?void 0:t.length)>0))return;if(!await zl()){fn();return}const Y=[...t],Z=ft.getState().settings.startSync,Q=ft.getState().app,K=Q==null?void 0:Q.loadLocalStorage("tokenForSync");try{const se=Y.filter($=>$.sourceType==="DAILY"),le=Y.filter($=>$.sourceType!=="DAILY");for(const $ of le){const he=await be.restoreMemoById($.id);he&&he.webId&&K&&Z&&await Jg(he.webId),he&&be.editMemo(he)}const fe=Ru(se);for(const{path:$,thinos:he}of fe){const ie=await be.dealWithDailyThinoBulk($,he,"restoreFromDelete");for(const ce of ie)ce&&ce.webId&&K&&Z&&await Jg(ce.webId),ce&&be.editMemo(ce)}be.updateTagsState(),at.clearQuery(),new x.Notice(E("RESTORE SUCCEED"))}catch(se){new x.Notice(se.message)}},B=async()=>{if(!((t==null?void 0:t.length)>0))return;if(!await zl()){fn();return}const Y=[...t];try{const Z=Y.filter(le=>le.sourceType==="DAILY"),Q=Y.filter(le=>le.sourceType!=="DAILY"),K=await be.archiveThinoBulk(Q);for(const le of K)le&&be.editMemo(le);const se=Ru(Z);for(const{path:le,thinos:fe}of se)await be.dealWithDailyThinoBulk(le,fe,"archive");be.updateTagsState(),at.clearQuery()}catch(Z){console.error("error",Z),new x.Notice(Z.message)}},L=async()=>{if((t==null?void 0:t.length)>0){if(!await zl()){fn();return}new lxe(i,t).open()}},_=async Y=>{document.body.toggleClass("thino-share-page",!0),setTimeout(async()=>{if(new x.Notice(E("Image is generating...")),!Y){new x.Notice(E("No content to generate."));return}await sxe(Y,n),await $E(Y);let Z;document.body.hasClass("theme-dark")?Z="#232323":Z="#eaeaea",xb(Y,{backgroundColor:Z,pixelRatio:window.devicePixelRatio*2}).then(Q=>{if(o!=null&&o.AutoSaveWhenOnMobile&&x.Platform.isMobile){const K=Q.split("base64,")[1];pb(K,"image/png").arrayBuffer().then(async le=>{let fe;const $="png",he=qu();for(const ie in he)if(he[ie]instanceof x.TFile){fe=he[ie];break}fe!==void 0&&await i.vault.createBinary(await vault.getAvailablePathForAttachments(`Pasted Image ${x.moment().format("YYYYMMDDHHmmss")}`,$,fe),le)})}document.body.toggleClass("thino-share-page",!1),Mb({imgUrl:Q}),new x.Notice(E("Image generated successfully.")),Y.hasClass("share-image")?Y.toggleClass("share-image",!1):Y.closest(".share-image").toggleClass("share-image",!1)}).catch(Q=>{document.body.toggleClass("thino-share-page",!1),console.error(Q)})},0)},V=Y=>{const Z=new x.Menu;switch(Z.addItem(Q=>{Q.setTitle(E("Copy filtered thinos")).setIcon("copy").onClick(async()=>{await I()})}),Z.addItem(Q=>{Q.setTitle(E("Share filtered thinos as image")).setIcon("image").onClick(async()=>{const K=document.querySelector(".memolist-container");K.toggleClass("share-image",!0);try{if(n==="calendar"){if(K.find(".rbc-agenda-table")){const se=K.find(".rbc-agenda-table");await _(se)}if(K.find(".rbc-month-view")){const se=K.find(".rbc-month-view");await _(se)}}else if(n==="table"){if(K.find(".thino-table")){const se=K.find(".thino-table");await _(se)}}else await _(K)}catch(se){console.error(se),new x.Notice(E("Failed to generate image.")),K.toggleClass("share-image",!1)}})}),Z.addItem(Q=>{Q.setTitle(E("Merge thinos in to thino share image")).setIcon("image").onClick(async()=>{let K="";t.forEach((le,fe)=>{K+=`> [!thino] ${le.createdAt} ${le.content.split(` `).map($=>$.trim()?`> ${$} `:`> `)} `+(fe===t.length-1?` `:` ------ `)});const se={createdAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),updatedAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),content:K.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:[]};sf(se,"clean")})}),Z.addSeparator(),a){case"/":Z.addItem(Q=>{Q.setTitle(E("Bulk tag operation")).setIcon("hash").onClick(async()=>{await L()})}).addItem(Q=>{Q.setTitle(E("Bulk archive")).setIcon("archive").onClick(async()=>{new _s(i,E("ARCHIVE"),async K=>{K==="confirm"&&await B()}).open()})}).addItem(Q=>{Q.setTitle(E("Bulk delete")).setIcon("trash").onClick(async()=>{new _s(i,E("DELETE"),async K=>{K==="confirm"&&await M()}).open()})});break;case"/archive":Z.addItem(Q=>{Q.setTitle(E("Bulk restore")).setIcon("archive").onClick(async()=>{new _s(i,E("RESTORE"),async K=>{K==="confirm"&&await R()}).open()})}).addItem(Q=>{Q.setTitle(E("Bulk delete")).setIcon("trash").onClick(async()=>{new _s(i,E("DELETE"),async K=>{K==="confirm"&&await M()}).open()})});break;case"/recycle":Z.addItem(Q=>{Q.setTitle(E("Bulk restore")).setIcon("archive-restore").onClick(async()=>{new _s(i,E("RESTORE"),async K=>{K==="confirm"&&await k()}).open()})}).addItem(Q=>{Q.setTitle(E("Bulk delete")).setIcon("trash").onClick(async()=>{new _s(i,E("DELETE"),async K=>{K==="confirm"&&await N()}).open()})});break}Z.showAtMouseEvent(Y.nativeEvent)};return v.jsxs("div",{className:`filter-query-container ${S?"":"hidden"}`,children:[v.jsxs("div",{className:"filter-query",children:[v.jsx("span",{className:"tip-text",children:E("FILTER")}),v.jsxs("div",{"data-filter-type":"query",className:"filter-item-container "+(w?"":"hidden"),onClick:()=>{at.setMemoFilter("")},children:[v.jsx("span",{className:"icon-text",children:"🔖"})," ",w==null?void 0:w.title]}),v.jsxs("div",{"data-filter-type":"tag",className:"filter-item-container "+(l?"":"hidden"),onClick:()=>{at.setTagQuery("")},children:[v.jsx("span",{className:"icon-text",children:"🏷️"})," ",l]}),v.jsxs("div",{"data-filter-type":"type",className:"filter-item-container "+(f?"":"hidden"),onClick:()=>{at.setMemoTypeQuery("")},children:[v.jsx("span",{className:"icon-text",children:"📦"})," ",QH(f)]}),c&&c.from{const Z=x.moment(c.to,"x"),Q=x.moment(Y,"x"),K=Q.isAfter(Z)||Q.isSame(Z);at.setFromAndToQuery(K?Z.startOf("day").valueOf():x.moment(Y,"x").startOf("day").valueOf(),c.to)}}),v.jsx("span",{children:E("to")}),v.jsx(Fw,{type:"text",startOrEnd:"end",defaultValue:x.moment(c.to,"x").add(1,"days").valueOf(),handleValueChange:Y=>{const Z=x.moment(c.from,"x"),Q=x.moment(Y,"x"),K=Q.isBefore(Z)||Q.isSame(Z),se=x.moment(Y,"x").endOf("day").valueOf();at.setFromAndToQuery(c.from,K?Z.endOf("day").valueOf():se)}})]}),v.jsx("div",{ref:Y=>Y&&x.setIcon(Y,"x"),className:"btn close-btn",onClick:()=>{at.setFromAndToQuery(0,0)}})]}),v.jsxs("div",{className:"filter-item-container "+(h?"":"hidden"),onClick:()=>{at.setTextQuery("")},children:[v.jsx("span",{className:"icon-text",children:"🔍"})," ",h]}),v.jsxs("div",{className:"filter-item-container "+(y?"":"hidden"),onClick:()=>{at.setPathQuery("")},children:[v.jsx("span",{className:"icon-text"})," ",h]})]}),v.jsxs("div",{className:"thino-filter-items",children:[e&&v.jsx("div",{className:"thinos-count",children:`${e?`${e} Thinos `:""}`}),v.jsx("div",{ref:D,className:"btn memo-action-menu",onClick:V})]})]})},lf=async e=>{const{app:t,settings:n}=ft.getState();if(!n.startSync||!(t!=null&&t.loadLocalStorage("tokenForSync")))return;const r=await GR(e);if(!r||r.length===0)return;r.sort((i,l)=>x.moment(i.createdAt,"YYYY/MM/DD HH:mm:ss").isAfter(x.moment(l.createdAt,"YYYY/MM/DD HH:mm:ss"))?1:-1);const a=r.filter(i=>!i.deleted),o=r.filter(i=>i.deleted);for(let i=0;i{a===f||!a||(h(a),t&&(t==null||t.saveLocalStorage("thinoListView",a)))},[a]),P.useEffect(()=>{if(!t||!r||!n||!(t==null?void 0:t.loadLocalStorage("tokenForSync"))||!e.startSync)return;i.current=window.setInterval(async()=>{const S=w2(t);await lf(S)},3e4),n.registerInterval(i.current);const w=w2(t);return lf(w),()=>{i.current&&window.clearInterval(i.current)}},[n,t,r,e.startSync]);const g=[v.jsx(my,{thinosCount:l.length,thinos:l},"filter"),v.jsx($Ce,{listView:f,updateThinos:y=>{c(y)}},"list")];return v.jsx(v.Fragment,{children:a==="chat"?v.jsx(v.Fragment,{children:[v.jsx(Sw,{syncThino:lf},"header"),...g.reverse(),v.jsx(hf,{className:"mod-editor-bottom",editorType:"inline"},"editor")]}):v.jsx(v.Fragment,{children:o?[v.jsx(Sw,{syncThino:lf},"header"),...g,v.jsx(hf,{className:"mod-editor-bottom",editorType:"block"},"editor")]:[v.jsx(Sw,{syncThino:lf},"header"),v.jsx(hf,{editorType:"block"},"editor"),...g]})})}function cxe(e){try{e!=null&&e.saveLocalStorage&&(e==null||e.saveLocalStorage("thinoLastUpdated",x.moment("2000-01-01 00:01:00","YYYY-MM-DD HH:mm:ss").format("x")))}catch(t){console.error(t)}}function w2(e){try{const t=(e==null?void 0:e.loadLocalStorage)&&(e==null?void 0:e.loadLocalStorage("thinoLastUpdated"));return t||x.moment("2000-01-01 00:01:00","YYYY-MM-DD HH:mm:ss").format("x")}catch(t){return console.error(t),x.moment().format("x")}}function dxe(e){try{e!=null&&e.saveLocalStorage&&(e==null||e.saveLocalStorage("thinoLastUpdated",x.moment().format("x")))}catch(t){console.error(t)}}const fxe={text:E("SELECT"),value:""},hxe=e=>{const{className:t,dataSource:n,handleValueChanged:r,value:a}=e,[o,i]=Kl(!1),l=P.useRef(null);let c=fxe;for(const g of n)if(g.value===a){c=g;break}P.useEffect(()=>{if(o){const g=y=>{var w;(w=l.current)!=null&&w.contains(y.target)||i(!1)};window.addEventListener("click",g,{capture:!0,once:!0})}},[o]);const f=g=>{r&&r(g.value),i(!1)},h=g=>{g.stopPropagation(),i()};return v.jsxs("div",{className:`selector-wrapper ${t||""}`,ref:l,children:[v.jsxs("div",{className:`current-value-container ${o?"active":""}`,onClick:h,children:[v.jsx("span",{className:"value-text",children:c.text}),v.jsx("span",{ref:g=>{g&&x.setIcon(g,"chevron-right")},className:"btn arrow-text"})]}),v.jsx("div",{className:`items-wrapper ${o?"":"hidden"}`,children:n.map(g=>v.jsx("div",{className:`item-container ${g.value===a?"selected":""}`,onClick:()=>{f(g)},children:g.text},g.value))})]})},ip=P.memo(hxe),ZE=e=>{const{destroy:t,queryId:n,type:r="dialog"}=e,[a,o]=P.useState(""),[i,l]=P.useState(r!=="dialog"?[gx()]:[]),c=im(!1),[f,h]=P.useState(!1),[g,y]=Kl(!1),w=be.getState().memos.filter(L=>!(L.deletedAt!==""&&L.deletedAt)).filter(L=>Yp(L,i)).length;P.useEffect(()=>{S()},[n]);const S=()=>{const L=on.getQueryById(n??"");if(L){o(L.title);const _=JSON.parse(L.querystring);return Array.isArray(_)&&l(_),L}},D=L=>{const _=L.target.value;o(_)},I=async()=>{if(!a)return new x.Notice(E("TITLE CANNOT BE NULL!")),null;if(i.length===0)return new x.Notice(E("FILTER CANNOT BE NULL!")),null;if(i.length===1&&i[i.length-1].value.value==="")return new x.Notice(E("Please finish the last filter setting first")),null;let L;const _=on.getQueryById(n||"");try{n&&!n.startsWith("Filter [Temp] ")&&_.title===a?(L=await on.updateQuery(n,a,JSON.stringify(i)),on.editQuery(L),await on.getMyAllQueries()):(L=await on.createQuery(a,JSON.stringify(i)),on.pushQuery(L),await on.getMyAllQueries())}catch(V){new x.Notice(V.message)}return L},M=async()=>{switch(r){case"modal":case"inline":if(i.length===0){new x.Notice(E("FILTER CANNOT BE NULL!"));return}if(i.length===1&&i[i.length-1].value.value===""){new x.Notice(E("Please finish the last filter setting first"));return}try{const L=on.getQueryById(n??"");if(L&&JSON.stringify(i)===L.querystring){at.setMemoFilter(L.id),t();return}const _=on.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify(i));on.pushQuery(_),at.setMemoFilter(_.id)}catch(L){new x.Notice(L.message)}t();break;case"dialog":try{if(!await I())return}catch(L){console.error(L),new x.Notice(L.message)}t();break}},N=()=>{if(i.length===0){new x.Notice(E("FILTER CANNOT BE NULL!"));return}if(f){at.setMemoFilter(""),h(!1);return}const L=on.getQueryById(n??"");if(L&&JSON.stringify(i)===L.querystring){at.setMemoFilter(L.id);return}const _=on.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify(i));on.pushQuery(_),at.setMemoFilter(_.id),e.setPreview&&e.setPreview(_.id),h(!0)},R=()=>{if(i.length>0&&i[i.length-1].value.value===""){new x.Notice(E("Please finish the last filter setting first"));return}l([...i,gx()])},k=P.useCallback((L,_)=>{l(V=>{const Y=[...V];return Y[L]=_,Y})},[]),B=P.useCallback(L=>{l(_=>_.filter((Y,Z)=>Z!==L))},[]);return v.jsxs(v.Fragment,{children:[r==="dialog"&&v.jsxs("div",{className:"dialog-header-container",children:[v.jsxs("span",{className:"title-text",children:[v.jsx("span",{className:"icon-text",children:"🔖"}),E(n?"EDIT QUERY":"CREATE QUERY")]}),v.jsx("button",{ref:L=>{L&&x.setIcon(L,"x")},className:"btn close-btn",onClick:t})]}),v.jsxs("div",{className:"dialog-content-container",children:[(r==="dialog"||g)&&v.jsxs("div",{className:"form-item-container input-form-container",children:[v.jsx("span",{className:"normal-text",children:E("TITLE")}),v.jsx("input",{className:"title-input",type:"text",value:a,onChange:D})]}),v.jsxs("div",{className:"form-item-container filter-form-container",children:[v.jsx("span",{className:"normal-text",children:E("FILTER")}),v.jsxs("div",{className:"filters-wrapper",children:[i.map((L,_)=>v.jsx(mxe,{index:_,filter:L,handleFilterChange:k,handleFilterRemove:B},_)),v.jsx("div",{className:"create-filter-btn",onClick:R,children:E("ADD FILTER TERMS")})]})]})]}),v.jsx("div",{className:"dialog-footer-container",children:v.jsxs("div",{className:"btns-container",children:[(r==="inline"||r==="modal")&&v.jsx("button",{className:`btn ${g?"mod-cta":"save-btn"}`,onClick:async()=>{if(!g)y();else{const L=await I();y(!1),t(),L&&at.setMemoFilter(L.id)}},children:E(g?"Set and save":"Save")}),v.jsxs("div",{className:"btns-group-container",children:[v.jsxs("span",{className:`tip-text ${i.length===0&&"hidden"}`,children:[E("MATCH")," Thino ",v.jsx("strong",{children:w})," ",E("TIMES")]}),v.jsx(v.Fragment,{children:r==="inline"&&v.jsx("button",{className:"btn mod-cta",onClick:N,children:E("Preview")})}),v.jsx("button",{className:`btn save-btn ${c.isLoading?"requesting":""}`,onClick:M,children:E(r==="inline"||r==="modal"?"Filter":n?"EDIT":"Save")})]})]})})]})},pxe=e=>{const{index:t,filter:n,handleFilterChange:r,handleFilterRemove:a}=e,{type:o}=n,i=P.useRef(null),l=P.useRef(null),c=P.useRef(n),f=P.useRef(o);P.useEffect(()=>{c.current=e.filter},[n]),P.useEffect(()=>{if(i.current)return o!=="TAG"&&l.current&&(l.current.destroy(),l.current=null,i.current.detach()),o==="TAG"&&!l.current&&(f.current=o,l.current=new ev(i.current,w)),()=>{l.current&&(l.current.destroy(),l.current=null)}},[i,o]);const h=P.useCallback(I=>{["AND","OR"].includes(I)&&r(t,{...n,relation:I})},[n]),g=P.useCallback(async I=>{var M;if(n.type!==I){const{verifyState:N}=ft.getState(),R=!x.Platform.isDesktop&&await((M=window.Capacitor)==null?void 0:M.Plugins.Device.getId()),k=x.Platform.isDesktop?await cr():R.identifier||R.uuid,B=N&&(N==null?void 0:N.appId)===k;if((I==="SOURCE"||I==="PATH"||I==="METADATA")&&!B){fn();return}const L=Object.values(Wc[I].operators);r(t,{...n,type:I,value:{operator:L[0].value,value:I==="METADATA"?{name:"",value:""}:""}})}},[n]),y=P.useCallback(I=>{r(t,{...n,value:{...n.value,operator:I}})},[n]),w=P.useCallback((I,M="OTHERS")=>{if(M==="OTHERS")r(t,{...c.current,value:{...c.current.value,value:I}});else{const N={...c.current,value:{...c.current.value,value:{...c.current.value.value,[M==="METADATA_NAME"?"name":"value"]:I}}};r(t,N)}},[n]),S=()=>{a(t)},D={TYPE:v.jsx(ip,{className:"value-selector",dataSource:Wc.TYPE.values,value:n.value.value,handleValueChanged:w}),LIST:v.jsx(ip,{className:"value-selector",dataSource:Wc.LIST.values,value:n.value.value,handleValueChanged:w}),SOURCE:v.jsx(ip,{className:"value-selector",dataSource:Wc.SOURCE.values,value:n.value.value,handleValueChanged:w}),PATH:v.jsx("input",{type:"text",className:"value-inputer",value:n.value.value,onChange:I=>{w(I.target.value)}}),METADATA:v.jsxs(v.Fragment,{children:[v.jsx("input",{type:"text",className:"value-inputer",value:n.value.value.name,onChange:I=>{w(I.target.value,"METADATA_NAME")}}),v.jsx("input",{type:"text",className:"value-inputer",value:n.value.value.value,onChange:I=>{w(I.target.value,"METADATA_VALUE")}})]}),TAG:v.jsx("input",{type:"text",id:Math.random().toString(36).substring(7),className:"value-inputer",ref:i,value:n.value.value,onChange:I=>{w(I.target.value)}}),TEXT:v.jsx("input",{type:"text",className:"value-inputer",value:n.value.value,onChange:I=>{w(I.target.value)}}),DATE:v.jsxs("div",{className:"date-inputer",children:[v.jsx(Fw,{type:"icon",handleValueChange:w}),v.jsx("input",{type:"text",className:"value-inputer",value:n.value.value,onChange:I=>{w(I.target.value)}})]})};return v.jsxs("div",{className:"memo-filter-input-wrapper",children:[t>0&&v.jsx(ip,{className:"relation-selector",dataSource:KH,value:n.relation,handleValueChanged:h}),v.jsx(ip,{className:"type-selector",dataSource:Object.values(Wc),value:n.type,handleValueChanged:g}),v.jsxs(v.Fragment,{children:[Object.keys(Wc).includes(o)&&v.jsx(ip,{className:"operator-selector",dataSource:Object.values(Wc[o].operators),value:n.value.operator,handleValueChanged:y}),D[o]]}),v.jsx("div",{ref:I=>{I&&x.setIcon(I,"x")},className:"btn remove-btn",onClick:S})]})},mxe=P.memo(pxe);function b2(e){bb({className:"create-query-dialog"},ZE,{queryId:e})}const qE=e=>{var w,S;const{dailyNotesState:{app:t,verifyState:n},locationState:{query:r}}=P.useContext(Lt),a=ne.useRef(null),[o,i]=ne.useState(!1),l=ne.useRef(null),[c,f]=ne.useState(""),h=Cb(a.current,l.current,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,10]}}]});P.useEffect(()=>{o&&h.update&&(h==null||h.update())},[o]),P.useEffect(()=>{a&&x.setIcon(a.current,"filter")},[a]);const g=async()=>{var M;const D=!x.Platform.isDesktop&&await((M=window.Capacitor)==null?void 0:M.Plugins.Device.getId()),I=x.Platform.isDesktop?await cr():D.identifier||D.uuid;return!n||(n==null?void 0:n.appId)!==I?(fn(),!1):!0};return Rv(l,()=>{i(!1),c&&at.getState().query.filter===c&&at.setMemoFilter("")}),v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"thino-inline-filter-wrapper pro",ref:a,onClick:async()=>{await g()&&(x.Platform.isDesktop?(i(!o),await(h==null?void 0:h.update())):new gxe(ft.getState().app,r.filter,I=>{f(I)}).open())}}),v.jsx("div",{ref:l,className:`thino-inline-filter-container ${o?"":"hidden"}`,style:h.styles.popper,children:o&&v.jsx(ZE,{type:"inline",queryId:(w=r.filter)!=null&&w.startsWith("Filter [Temp] ")&&!((S=r.filter)!=null&&S.includes("Filter [Temp]"))?"":r.filter,destroy:()=>{i(!1)},setPreview:D=>{f(D)}})})]})};class gxe extends x.Modal{constructor(n,r,a){super(n);Se(this,"root");Se(this,"setPreview");this.filter=r,this.setPreview=a}onOpen(){var r,a;const{contentEl:n}=this;this.root=Pv(n),this.root.render(v.jsx(is,{store:Le,context:Lt,children:v.jsx("div",{className:"thino-inline-filter-container",children:v.jsx(ZE,{type:"modal",queryId:(r=this.filter)!=null&&r.startsWith("Filter [Temp] ")&&!((a=this.filter)!=null&&a.includes("Filter [Temp]"))?"":this.filter,destroy:()=>{this.close()},setPreview:o=>{this.setPreview(o)}})})}))}onClose(){var n;(n=this.root)==null||n.unmount()}}const OO=()=>{const{dailyNotesState:{app:e},globalState:{isMobileView:t,showSiderbarInMobileView:n}}=P.useContext(Lt),[r]=P.useState(ne.createRef());P.useEffect(()=>{if(!r.current)return;const o=r.current;x.setIcon(o,"refresh-cw")},[r.current]);const a=P.useCallback(async()=>{if(!(t&&n)){if(lf){const o=w2(e);await lf(o)}await be.fetchAllMemos()}},[]);return v.jsx("span",{className:"refresh-icon",ref:r,onClick:()=>{a(),r&&r.current.firstElementChild.toggleClass("rotate-hidden",!0),setTimeout(()=>{r&&r.current.firstElementChild.toggleClass("rotate-hidden",!1)},1e3)}})},Sw=()=>{const{locationState:{query:{filter:e}},globalState:{isMobileView:t},queryState:{queries:n}}=P.useContext(Lt),[r,a]=P.useState("THINO");P.useEffect(()=>{const i=on.getQueryById(e);a(i?i.title:"THINO")},[e,n]);const o=P.useCallback(i=>{i.stopPropagation(),dt.setShowSiderbarInMobileView(!0)},[]);return v.jsxs("div",{className:"section-header-container memos-header-container",children:[v.jsxs("div",{className:"title-text",children:[v.jsx(ts,{when:t,children:v.jsx("button",{ref:i=>{i&&x.setIcon(i,"menu")},className:"btn action-btn clickable-icon",onClick:o})}),v.jsx("span",{className:"normal-text",children:r}),v.jsx(OO,{})]}),v.jsxs("div",{className:"memos-header-search-section",children:[v.jsx(uY,{}),v.jsx(lY,{}),v.jsx(qE,{}),v.jsx(jv,{})]})]})},vxe=()=>{const{dailyNotesState:{settings:e,plugin:t,app:n,verifyState:r},globalState:{manifest:a,showSiderbarInMobileView:o,isMobileView:i}}=P.useContext(Lt),[l,c]=P.useState("Memos");P.useState(!1);const[f,h]=P.useState("");P.useEffect(()=>{if(!(e!=null&&e.MomentsIcon)||!n)return;const k=n.vault.adapter.getResourcePath(x.normalizePath(e.MomentsIcon));k&&!(e!=null&&e.MomentsIcon.startsWith("http"))?h(k):h(e==null?void 0:e.MomentsIcon)},[e==null?void 0:e.MomentsIcon,n]),P.useEffect(()=>{e&&c(e.UserName)},[e]);const g=P.useCallback(()=>{at.pushHistory("/"),at.clearQuery()},[]),y=()=>{n.setting.open(),n.setting.openTabById(a.id||"obsidian-memos")},w=()=>{if(e!=null&&e.needVerify){dt.setLocked(!0);return}else new x.Notice(E("You have not set a password or enable this feature yet")),n.setting.open(),n.setting.openTabById(a.id||"obsidian-memos")},S=()=>{new iC(n,a.version).open()},D=()=>{dt.setShowSiderbarInMobileView(!1),t.settingTab.updateSettings("FirstLoaded",!0)},I=()=>{new $H(n,t,a.version).open()},M=P.useCallback(async k=>{const{type:B}=k;if(B.startsWith("text"))try{return`${await $2.parseHtml(k)}`}catch(L){new x.Notice(L)}},[]),N=P.useCallback(()=>{const k=document.createElement("input");document.body.appendChild(k),k.type="file",k.multiple=!1,k.accept="text/html",k.onchange=async()=>{if(!k.files||k.files.length===0)return;const B=k.files[0];await M(B),document.body.removeChild(k)},k.click()},[]),R=k=>{const B=new x.Menu;B.addItem(L=>{L.setIcon("user").setTitle(E("Settings")).onClick(y)}),e!=null&&e.needVerify&&B.addItem(L=>{L.setIcon("lock").setTitle(E("Lock")).onClick(w)}),B.addItem(L=>{L.setIcon("import").setTitle(E("Import")).onClick(N)}),B.addSeparator(),B.addItem(L=>{L.setIcon("file-text").setTitle(E("ChangeLog")).onClick(S)}),B.addItem(L=>{L.setIcon("settings").setTitle(E("Setting guide")).onClick(D)}),B.addItem(L=>{L.setIcon("alert-circle").setTitle(E("Submit issue")).onClick(I)}),B.showAtMouseEvent(k.nativeEvent)};return v.jsxs("div",{className:"user-banner-container",children:[v.jsxs("div",{className:"userinfo-header-container",children:[v.jsxs("div",{className:"userinfo-container",onClick:()=>{n.setting.open(),n.setting.openTabById(a.id||"obsidian-memos")},children:[v.jsx("div",{ref:k=>{if(f){k==null||k.empty();return}f||k&&x.setIcon(k,"Memos")},className:"thino-user-icon",style:{backgroundImage:`url("${f}")`}}),v.jsxs("div",{className:"thino-user-info",children:[v.jsxs("span",{className:"username-container",children:[v.jsx("span",{"aria-label":l==="MEMO 😉"?"THINO 😉":l||"THINO",className:"username-text",onClick:g,children:l==="MEMO 😉"?"THINO 😉":l||"THINO"}),v.jsx("span",{className:`user-pro-badge ${r?"activated":""}`,onClick:()=>{n.setting.open(),n.setting.openTabById(a.id||"obsidian-memos")},children:"PRO"})]}),(e==null?void 0:e.MomentsQuote)&&v.jsx("span",{className:"thino-user-quote",children:e==null?void 0:e.MomentsQuote})]})]}),v.jsxs("span",{className:"btn-group",children:[(e==null?void 0:e.DefaultThemeForThino)==="modern"&&!i&&v.jsx(OO,{}),v.jsx("span",{ref:k=>{k&&k.hasChildNodes()||k&&x.setIcon(k,"more-horizontal")},className:"btn action-btn menu-popup-btn",onClick:R}),o&&v.jsx("span",{ref:k=>{k&&k.hasChildNodes()||k&&x.setIcon(k,"x")},className:"btn action-btn",onClick:()=>{dt.setShowSiderbarInMobileView(!1)}})]})]}),v.jsx(G2,{statusType:"banner"})]})},aN=()=>{const{queryState:{queries:e},dailyNotesState:{app:t},locationState:{query:{filter:n}}}=P.useContext(Lt),r=im(),[a,o]=P.useState([]);return P.useEffect(()=>{const i=e.filter(l=>{var c,f;return!((c=l.id)!=null&&c.toString().startsWith("Filter [Temp]"))&&!((f=l.id)!=null&&f.toString().includes("Filter [Temp]"))}).sort((l,c)=>{if(c.pinnedAt&&!l.pinnedAt)return 1;if(l.pinnedAt&&!c.pinnedAt)return-1;const f=ut.getTimeStampByDate(l.pinnedAt||l.createdAt);return ut.getTimeStampByDate(c.pinnedAt||c.createdAt)-f});o(i)},[e]),P.useEffect(()=>{on.getMyAllQueries().catch(()=>{}).finally(()=>{r.setFinish()})},[t]),v.jsxs("div",{className:"queries-wrapper",children:[v.jsxs("span",{className:"title-text",children:[v.jsx("span",{className:"normal-text",children:E("QUERY")}),v.jsx("span",{ref:i=>{i&&x.setIcon(i,"plus")},className:"btn create-query-btn",onClick:()=>b2()})]}),v.jsx(ts,{when:r.isSucceed&&a.length===0,children:v.jsx("div",{className:"create-query-btn-container",children:v.jsx("span",{className:"btn",onClick:()=>b2(),children:E("CREATE FILTER")})})}),v.jsx("div",{className:"queries-container",children:a.map(i=>v.jsx(yxe,{query:i,isActive:i.id===n},`${i.id}-${x.moment(i.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}`))})]})},yxe=e=>{const{query:t,isActive:n}=e,[r,a]=Kl(!1),[o,i]=Kl(!1),l=()=>{at.setMemoFilter(n?"":t.id)},c=D=>{D.stopPropagation(),a()},f=()=>{a(!1)},h=async D=>{if(D.stopPropagation(),o)try{await on.deleteQuery(t.id)}catch(I){new x.Notice(I.message)}else i()},g=D=>{D.stopPropagation(),b2(t.id)},y=async D=>{D.stopPropagation();try{t.pinnedAt?await on.unpinQuery(t.id):await on.pinQuery(t.id),on.editQuery({...t,pinnedAt:t.pinnedAt?"":ut.getDateTimeString(Date.now())})}catch(I){console.error(I)}},w=()=>{i(!1)},S=P.useMemo(()=>v.jsxs("div",{className:"action-btns-container",children:[v.jsxs("span",{className:"btn",onClick:y,children:[v.jsx("span",{ref:D=>{D&&x.setIcon(D,t.pinnedAt?"pin-off":"pin")},className:"icon-text"}),v.jsx("span",{className:"normal-text",children:t.pinnedAt?E("UNPIN"):E("PIN")})]}),v.jsxs("span",{className:"btn",onClick:g,children:[v.jsx("span",{ref:D=>{D&&!D.hasChildNodes()&&x.setIcon(D,"edit")},className:"icon-text"}),v.jsx("span",{className:"normal-text",children:E("EDIT")})]}),v.jsxs("span",{className:`btn delete-btn ${o?"final-confirm":""}`,onClick:h,onMouseLeave:w,children:[v.jsx("span",{ref:D=>{D&&!D.hasChildNodes()&&x.setIcon(D,"trash-2")},className:"icon-text"}),v.jsx("span",{className:"normal-text",children:E(o?"CONFIRM!":"DELETE")})]})]}),[t.pinnedAt,o]);return v.jsx(v.Fragment,{children:v.jsxs("div",{className:`query-item-container ${n?"active":""}`,onClick:l,children:[v.jsxs("div",{className:"query-text-container",children:[v.jsx("span",{ref:D=>{D&&!D.hasChildNodes()&&x.setIcon(D,"filter")},className:"icon-text"}),v.jsxs("span",{className:"query-text",children:[t.title,t.pinnedAt&&" 📌"]})]}),v.jsxs("div",{className:"btns-container",children:[v.jsx("span",{ref:D=>{D&&!D.hasChildNodes()&&x.setIcon(D,"more-horizontal")},className:"btn action-btn toggle-btn",onClick:c}),v.jsx("div",{className:`action-btns-wrapper ${r?"":"hidden"}`,onMouseLeave:f,children:S})]})]})})},oN=()=>{var y,w;const{locationState:{query:{tag:e,filter:t}},dailyNotesState:{app:n},memoState:{tags:r,tagsNum:a,memos:o}}=P.useContext(Lt),i=t&&((y=t==null?void 0:t.toString())==null?void 0:y.startsWith("Filter [Temp] "))&&on.getQueryById(t),[l,c]=P.useState([]),[f,h]=P.useState(((w=n||app)==null?void 0:w.loadLocalStorage("thino-tag-sort-order"))||"alphabetical");P.useEffect(()=>{var D;const S=(D=n||app)==null?void 0:D.loadLocalStorage("thino-temp-tags");c(S||[])},[]),P.useEffect(()=>{be.updateTagsState()},[o]),P.useEffect(()=>{const S=Array.from(r).sort(),D={subTags:[]};for(const I of S){const M=I.split("/");let N=D,R="";for(let k=0;k_.text===R);if(L||(L={key:B,text:R,count:a[R]||0,subTags:[],parent:N},N.subTags.push(L)),k===M.length-1){let _=L.parent;for(;_;)_.count||(_.count=0),_.count+=a[R]||0,_=_.parent}N=L}}c(D.subTags)},[r]),P.useEffect(()=>{var S;be.initialized&&((S=n||app)==null||S.saveLocalStorage("thino-temp-tags",l))},[l]);const g=S=>{S.stopPropagation();const D=new x.Menu;for(const I of["alphabetical","alphabeticalReverse","byCount","byCountReverse"])D.addItem(M=>{M.setTitle(E(I)).onClick(()=>{h(I),n==null||n.saveLocalStorage("thino-tag-sort-order",I)}).setChecked(f===I)}),I==="alphabeticalReverse"&&D.addSeparator();D.showAtMouseEvent(S.nativeEvent)};return v.jsxs("div",{className:"tags-wrapper",children:[v.jsxs("div",{className:"tags-header title-text",children:[v.jsx("span",{className:"normal-text",children:E("Frequently Used Tags")}),v.jsx("span",{ref:S=>{S&&x.setIcon(S,"arrow-down-narrow-wide")},className:"tags-sort-btn",onClick:g})]}),v.jsxs("div",{className:"tags-container",children:[l.sort(wxe(f)).map((S,D)=>v.jsx(PO,{tag:S,tagQuery:e,filterQuery:i},S.text+"-"+D)),v.jsx(ts,{when:l.length<5&&be.initialized,children:v.jsxs("span",{className:"tag-tip-container",children:[E("Input")," ",v.jsxs("span",{className:"code-text",children:[E("#Tag")," "]}),E("to create tag"),"..."]})})]})]})},PO=e=>{const{tag:t,tagQuery:n,filterQuery:r}=e,a=n===t.text||r&&JSON.parse(r.querystring).find(h=>h.type==="TAG"&&h.value.value===t.text),o=t.subTags.length>0,[i,l]=Kl(!1),c=async h=>{var g;if(h.ctrlKey||h.metaKey){const{verifyState:y}=ft.getState(),w=!x.Platform.isDesktop&&await((g=window.Capacitor)==null?void 0:g.Plugins.Device.getId()),S=x.Platform.isDesktop?await cr():w.identifier||w.uuid;if(!(y&&(y==null?void 0:y.appId)===S)){fn();return}const I=at.getState().query.filter;if(I&&(I!=null&&I.startsWith("Filter [Temp] "))){const N=on.getQueryById(I).querystring,R=JSON.parse(N);let k;if(R.some(B=>B.type==="TAG"&&B.value.value===t.text)){if(k=R.filter(L=>L.value.value!==t.text),k.length===0){at.setMemoFilter("");return}const B=on.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([{...k[0],relation:"AND"},...k.slice(1)]));on.pushQuery(B),at.setMemoFilter(B.id)}else{k=[...R,{type:"TAG",value:{value:t.text,operator:"CONTAIN"},relation:"OR"}];const B=on.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify(k));on.pushQuery(B),at.setMemoFilter(B.id)}}else if(n){at.setTagQuery("");const M=on.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"}]));on.pushQuery(M),at.setMemoFilter(M.id)}else if(!n){const M=on.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([{type:"TAG",value:{value:t.text,operator:"CONTAIN"},relation:"AND"}]));on.pushQuery(M),at.setMemoFilter(M.id)}ut.copyTextToClipboard(`#${t.text} `),["/","/recycle","/archive","/daily"].includes(at.getState().pathname)||at.setPathname("/");return}if(a){if(at.setTagQuery(""),r){const w=JSON.parse(r.querystring).filter(D=>D.value.value!==t.text);if(w.length===0){at.setMemoFilter("");return}const S=on.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([{...w[0],relation:"AND"},...w.slice(1)]));on.pushQuery(S),at.setMemoFilter(S.id)}}else await ut.copyTextToClipboard(`#${t.text} `),["/","/recycle","/archive","/daily"].includes(at.getState().pathname)||at.setPathname("/"),at.setTagQuery(t.text)},f=h=>{h.stopPropagation(),l()};return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:`tag-item-container ${a?"active":""}`,onClick:c,children:[v.jsxs("div",{className:"tag-text-container",children:[v.jsx("span",{ref:h=>{h&&x.setIcon(h,"hash")},className:"btn tag-btn"}),v.jsx("span",{className:"tag-text",children:t.key})]}),v.jsxs("div",{className:"btns-container",children:[v.jsx("span",{className:"tag-count",children:t.count}),o?v.jsx("span",{ref:h=>{h&&x.setIcon(h,"chevron-right")},className:`btn action-btn toggle-btn ${i?"shown":""}`,onClick:f}):null]})]}),o?v.jsx("div",{className:`subtags-container ${i?"":"hidden"}`,children:t.subTags.map((h,g)=>v.jsx(PO,{tag:h,tagQuery:n},h.text+"-"+g))}):null]})},iN=new Intl.Collator(void 0,{usage:"sort",sensitivity:"base",numeric:!0}).compare,QD={alphabetical:(e,t)=>iN(e.text,t.text),alphabeticalReverse:(e,t)=>-iN(e.text,t.text),byCount:(e,t)=>t.count-e.count,byCountReverse:(e,t)=>e.count-t.count},wxe=(e="byCount")=>QD.hasOwnProperty(e)?QD[e]:QD.alphabetical,sN=()=>{const{dailyNotesState:{app:e,settings:t,verifyState:n}}=P.useContext(Lt),r=[{name:E("Random Review"),path:"/review",iconID:"star"},{name:E("ARCHIVE"),path:"/archive",iconID:"archive"},{name:E("Recycle bin"),path:"/recycle",iconID:"recycle"}],a=P.useRef([]);return P.useEffect(()=>{a.current.forEach((o,i)=>{o&&x.setIcon(o,r[i].iconID)})},[t,a]),v.jsx(v.Fragment,{children:v.jsx("div",{className:"path-entry-wrapper",children:r.map((o,i)=>v.jsx(v.Fragment,{children:v.jsxs("div",{className:`path-entry-container ${at.getState().pathname===o.path?"active":""} ${t.DeleteThinoDirectly&&o.path==="/recycle"?"hidden":""} ${o.path==="/review"&&"pro"}`,onClick:async()=>{var f;const l=!x.Platform.isDesktop&&await((f=window.Capacitor)==null?void 0:f.Plugins.Device.getId()),c=x.Platform.isDesktop?await cr():l.identifier||l.uuid;if(!n&&(n==null?void 0:n.appId)!==c&&o.path==="/review"){fn();return}if(at.setPathname(o.path),o.path==="/review"&&at.getState().pathname==="/review"){e.workspace.trigger("refresh-review-memos");return}at.clearQuery()},children:[v.jsx("span",{ref:l=>a.current[i]=l,className:"path-entry-icon"}),v.jsx("span",{className:"path-entry-text",children:o.name})]},i)}))})})},lN=e=>{const{dailyNotesState:{settings:t},locationState:n,globalState:{isMobileView:r,showSiderbarInMobileView:a}}=P.useContext(Lt),o=P.useRef(null),i=P.useMemo(()=>l=>{var f,h,g;const c=dt.getState().showSiderbarInMobileView;if(!c){window.removeEventListener("click",i,{capture:!0});return}(f=o.current)!=null&&f.contains(l.target)||(g=(h=o.current)==null?void 0:h.parentNode)!=null&&g.contains(l.target)&&(c&&l.stopPropagation(),dt.setShowSiderbarInMobileView(!1),window.removeEventListener("click",i,{capture:!0}))},[]);return P.useEffect(()=>{dt.setShowSiderbarInMobileView(!1)},[n]),P.useEffect(()=>{a?document.body.classList.add(NC):document.body.classList.remove(NC)},[a]),P.useEffect(()=>{r&&a&&window.addEventListener("click",i,{capture:!0})},[r,a]),v.jsxs("aside",{className:ar("memos-sidebar-wrapper",e.className),ref:o,children:[e.children,v.jsx(vxe,{}),(t==null?void 0:t.DefaultThemeForThino)==="modern"&&!r?(e==null?void 0:e.sidebarPosition)==="right"?v.jsx(tv,{}):null:v.jsx(tv,{}),(t==null?void 0:t.DefaultThemeForThino)==="modern"&&!r?(e==null?void 0:e.sidebarPosition)==="left"?v.jsxs(v.Fragment,{children:[v.jsx(sN,{}),v.jsx(aN,{}),v.jsx(G2,{statusType:"sidebar"})]}):null:v.jsxs(v.Fragment,{children:[v.jsx(sN,{}),v.jsx(aN,{})]}),(t==null?void 0:t.DefaultThemeForThino)==="modern"&&!r?(e==null?void 0:e.sidebarPosition)==="right"?v.jsx(v.Fragment,{children:v.jsx(oN,{})}):null:v.jsx(v.Fragment,{children:v.jsx(oN,{})})]})},bxe=()=>{const{dailyNotesState:{settings:e}}=P.useContext(Lt),[t,n]=ne.useState(""),r=a=>{n(a.target.value)};return v.jsx("div",{className:"locked-screen-wrapper",children:v.jsxs("div",{className:"locked-screen-content",children:[v.jsx("div",{className:"locked-screen-header",children:v.jsx("div",{className:"locked-screen-header-title",children:E("Locked")})}),v.jsx("div",{className:"locked-screen-body",children:v.jsxs("div",{className:"locked-screen-body-content",children:[v.jsxs("div",{className:"locked-screen-body-content-text",children:[v.jsx("div",{className:"locked-screen-body-content-text-title",children:E("Thino is locked")}),v.jsx("div",{className:"locked-screen-body-content-text-desc",children:E("Please unlock Thino by input password")})]}),v.jsxs("div",{className:"locked-screen-body-content-inputer",children:[v.jsx("input",{onKeyDown:a=>{a.key==="Enter"&&((e==null?void 0:e.password)===t?dt.setLocked(!1):new x.Notice(E("Password is incorrect")))},onChange:r,value:t,type:"password",className:"locked-screen-body-content-input"}),v.jsx("button",{className:"locked-screen-body-content-btn",onClick:()=>{(e==null?void 0:e.password)===t?dt.setLocked(!1):new x.Notice(E("Password is incorrect"))},children:E("Unlock")})]})]})})]})})};class af extends Z6{fuzzySearchItemsOptimized(t,n){const r=x.prepareFuzzySearch(t);return n.map(a=>{const o=r(a.path);return o?{item:a,match:o,score:o.score}:null}).sort((a,o)=>(o==null?void 0:o.score)-(a==null?void 0:a.score)).filter(Boolean)}getSuggestions(t){const r=app.vault.getFiles().filter(o=>["png","jpg","jpeg","gif"].includes(o.extension)),a=t.toLowerCase();return this.fuzzySearchItemsOptimized(a,r).map(o=>o.item)}renderSuggestion(t,n){var o;const r=t.basename,a=((o=t.parent)==null?void 0:o.path)||"";n.toggleClass("thino-image-suggest-item",!0),n.createSpan({cls:"suggestion-name",text:r}),n.createSpan({cls:"suggestion-path",text:a})}selectSuggestion(t){this.inputEl.value=t.path,this.inputEl.trigger("input"),this.close()}}const Sxe=e=>{const{dailyNotesState:{settings:t,app:n,plugin:r},globalState:{manifest:a}}=P.useContext(Lt),[o,i]=ne.useState(0),[l,c]=ne.useState(""),f=ne.useRef(null),h=ne.useRef(null),[g,y]=ne.useState({enabled:!1,path:"",format:""});P.useEffect(()=>{if(o===2&&(t!=null&&t.EnabledLocationList.find(I=>I.value==="DAILY")))if(!qg())y({enabled:!1,path:"",format:""});else{const I=Gc().folder,M=Gc().format;y({enabled:!0,path:I,format:M})}},[o]),P.useEffect(()=>{if(!(t!=null&&t.MomentsIcon)||!n){c("");return}const I=n.vault.adapter.getResourcePath(x.normalizePath(t.MomentsIcon));I&&!(t!=null&&t.MomentsIcon.startsWith("http"))?c(I):c(t==null?void 0:t.MomentsIcon)},[t==null?void 0:t.MomentsIcon,n]),P.useEffect(()=>{h&&(h.current=null)},[o]),P.useEffect(()=>{f.current&&(h.current||(h.current=new af(f.current)))},[f.current]);const w=(I,M)=>{let N=r;N||(N=n.plugins.getPlugin("obsidian-memos")),N.settingTab.updateSettings(I,M)},S=P.useMemo(()=>{switch(o){case 0:return v.jsxs(v.Fragment,{children:[v.jsx("h1",{children:E("Get started with Thino")}),v.jsx("p",{children:E("Set up your user info for Thino.")})]});case 1:return v.jsxs(v.Fragment,{children:[v.jsx("h1",{children:E("Set theme for Thino")}),v.jsx("p",{children:E("Choose a theme for Thino.")})]});case 2:return v.jsxs(v.Fragment,{children:[v.jsx("h1",{children:E("Go with daily note plugin")}),v.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 v.jsxs(v.Fragment,{children:[v.jsx("h1",{children:E("Set preferences for using Thino")}),v.jsx("p",{children:E("Adjust settings that influence your user experience with Thino.")})]});case 4:return v.jsxs(v.Fragment,{children:[v.jsx("h1",{children:E("Congrats! All settings done")}),v.jsx("p",{children:E("Go and enjoy Thino")})]})}},[o]),D=()=>{switch(o){case 0:return v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"thino-user-preview-wrapper",children:v.jsxs("div",{className:"userinfo-container",onClick:()=>{n.setting.open(),n.setting.openTabById(a.id||"obsidian-memos")},children:[v.jsx("div",{ref:I=>{if(t!=null&&t.MomentsIcon){I==null||I.empty();return}t!=null&&t.MomentsIcon||I&&x.setIcon(I,"Memos")},className:"thino-user-icon",style:{backgroundImage:`url("${l}")`}}),v.jsxs("div",{className:"thino-user-info",children:[v.jsx("span",{className:"username-container",children:v.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)&&v.jsx("span",{className:"thino-user-quote",children:t==null?void 0:t.MomentsQuote})]})]})}),v.jsxs("div",{className:"thino-user-info-wrapper",children:[v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("User name")}),v.jsx("div",{className:"setting-item-description",children:E("Set your user name here. 'Memos 😏' By default")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsx("input",{type:"text",placeholder:"Thino 😏",defaultValue:t==null?void 0:t.UserName,onInput:I=>w("UserName",I.currentTarget.value)})})]}),v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("User quote")}),v.jsx("div",{className:"setting-item-description",children:E("Set user quote for thino")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsx("input",{type:"text",placeholder:"Share thino with the world",defaultValue:t==null?void 0:t.MomentsQuote,onInput:I=>w("MomentsQuote",I.currentTarget.value)})})]}),v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("User icon")}),v.jsx("div",{className:"setting-item-description",children:E("Set user icon for thino. You can input http/https link or file path in vault.")})]}),v.jsx("div",{className:"setting-item-control",children:v.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 v.jsx(v.Fragment,{children:v.jsxs("div",{className:ar("theme-selector-group","selected"),children:[v.jsxs("div",{className:ar("theme-selector",(t==null?void 0:t.DefaultThemeForThino)==="modern"?"selected":""),onClick:()=>w("DefaultThemeForThino","modern"),children:[v.jsxs("div",{className:"theme-selector-header-component",children:[v.jsx("div",{className:"theme-selector-header",children:E("Modern")}),v.jsx("div",{className:"theme-selector-description",children:E("A modern theme for Thino with a three-column layout and some unique features.")})]}),v.jsxs("div",{className:"theme-selector-content",children:[v.jsx("div",{className:"left-column column-component"}),v.jsx("div",{className:"center-column column-component"}),v.jsx("div",{className:"right-column column-component"})]}),v.jsx("div",{className:"theme-selector-footer",children:v.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")})})]}),v.jsxs("div",{className:ar("theme-selector",(t==null?void 0:t.DefaultThemeForThino)==="classic"?"selected":""),onClick:()=>w("DefaultThemeForThino","classic"),children:[v.jsxs("div",{className:"theme-selector-header-component",children:[v.jsx("div",{className:"theme-selector-header",children:E("Classic")}),v.jsx("div",{className:"theme-selector-description",children:E("A classic theme for Thino with a two-column layout")})]}),v.jsxs("div",{className:"theme-selector-content",children:[v.jsx("div",{className:"left-column column-component"}),v.jsx("div",{className:"center-column column-component"})]}),v.jsx("div",{className:"theme-selector-footer",children:v.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 v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"daily-note-plugin-status",children:[v.jsxs("div",{className:"daily-note-plugin-status-header",children:[v.jsx("div",{className:"plugin-status-header",children:E("Daily note plugin")}),v.jsx("div",{className:"plugin-status-description",children:E("Enable daily note plugin")})]}),v.jsx("div",{className:"daily-note-plugin-status-content",children:g.enabled&&v.jsx(v.Fragment,{children:v.jsxs("div",{className:"daily-note-format",children:[v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Daily note name format")}),v.jsx("div",{className:"setting-item-description",children:E("Set daily note name format")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsx("input",{type:"text",placeholder:"YYYY-MM-DD",defaultValue:g.format,onInput:I=>{y({...g,format:I.currentTarget.value.trim()});try{const M=n.internalPlugins.getPluginById("daily-notes");M.instance.options={...M.instance.options,format:I.currentTarget.value.trim()},M.saveData({...M.instance.options,format:I.currentTarget.value.trim()})}catch(M){console.error(M)}}})})]}),v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Daily notes folder")}),v.jsx("div",{className:"setting-item-description",children:E("Set daily notes folder")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsx("input",{type:"text",placeholder:"YYYY-MM-DD",defaultValue:g.path,onInput:I=>{y({...g,path:I.currentTarget.value.trim()});try{const M=n.internalPlugins.getPluginById("daily-notes");M.instance.options={...M.instance.options,folder:I.currentTarget.value.trim()},M.saveData({...M.instance.options,folder:I.currentTarget.value.trim()})}catch(M){console.error(M)}}})})]})]})})}),v.jsxs("div",{className:"daily-note-plugin-status-footer",children:[!g.enabled&&v.jsx("div",{className:"notice-click",children:E("Click to enable =>")}),v.jsx("button",{className:"mod-cta",disabled:g.enabled,onClick:()=>{if(!g.enabled){n.internalPlugins.getPluginById("daily-notes").enable();const I=Gc().folder,M=Gc().format;y({enabled:!0,format:M,path:I})}},children:g.enabled?E("Enabled"):E("Enable")})]})]}),v.jsxs("div",{className:"thino-daily-settings-wrapper",children:[v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Default time prefix")}),v.jsx("div",{className:"setting-item-description",children:E("Set default time prefix for thino in daily notes.")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsxs("select",{className:"dropdown",defaultValue:t==null?void 0:t.DefaultTimePrefix,onChange:I=>w("DefaultTimePrefix",I.currentTarget.value),children:[v.jsx("option",{value:"HH:mm",children:"HH:mm"}),v.jsx("option",{value:"HH:mm:ss",children:"HH:mm:ss"})]})})]}),v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Set thino insert place")}),v.jsx("div",{className:"setting-item-description",children:E("Set where to insert thino content")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsxs("select",{className:"dropdown",defaultValue:t==null?void 0:t.InsertType,onChange:I=>w("InsertType",I.currentTarget.value),children:[v.jsx("option",{value:"end",children:E("End of the diary")}),v.jsx("option",{value:"custom",children:E("Custom location")})]})})]}),(t==null?void 0:t.InsertType)==="custom"&&v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Insert after heading")}),v.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.")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsx("input",{type:"text",placeholder:"# Heading",defaultValue:t==null?void 0:t.InsertAfter,onInput:I=>w("InsertAfter",I.currentTarget.value)})})]}),v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Set process target")}),v.jsx("div",{className:"setting-item-description",children:E("You can set whole diary or only part of it")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsxs("select",{className:"dropdown",defaultValue:t==null?void 0:t.ProcessContentTarget,onChange:I=>w("ProcessContentTarget",I.currentTarget.value),children:[v.jsx("option",{value:"custom",children:E("Custom")}),v.jsx("option",{value:"whole",children:E("Whole diary")})]})})]}),(t==null?void 0:t.ProcessContentTarget)==="custom"&&v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Process Memos below")}),v.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.")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsx("input",{type:"text",placeholder:"# Heading",defaultValue:t==null?void 0:t.ProcessEntriesBelow,onInput:I=>w("ProcessEntriesBelow",I.currentTarget.value)})})]})]})]});case 3:return v.jsx(v.Fragment,{children:v.jsxs("div",{className:"thino-custom-settings-wrapper",children:[v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Default prefix when save thino")}),v.jsx("div",{className:"setting-item-description",children:E("Set the default prefix when create memo, 'List' by default.")})]}),v.jsx("div",{className:"setting-item-control",children:v.jsxs("select",{className:"dropdown",defaultValue:t==null?void 0:t.DefaultPrefix,onChange:I=>w("DefaultPrefix",I.currentTarget.value),children:[v.jsx("option",{value:"List",children:E("List")}),v.jsx("option",{value:"Task",children:E("Task")})]})})]}),v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Use Tags In Vault")}),v.jsx("div",{className:"setting-item-description",children:E("Use tags in vault rather than only in Memos. False by default.")})]}),v.jsx("div",{className:"setting-item-control",ref:I=>{I&&(I.hasChildNodes()||new x.ToggleComponent(I).setValue((t==null?void 0:t.UseVaultTags)===void 0?!1:t==null?void 0:t.UseVaultTags).onChange(M=>{w("UseVaultTags",M)}))}})]}),v.jsxs("div",{className:"setting-item",children:[v.jsxs("div",{className:"setting-item-info",children:[v.jsx("div",{className:"setting-item-name",children:E("Delete Thino Directly")}),v.jsx("div",{className:"setting-item-description",children:E("When delete thino directly, it will not be moved to trash. False by default.")})]}),v.jsx("div",{className:"setting-item-control",ref:I=>{I&&(I.hasChildNodes()||new x.ToggleComponent(I).setValue((t==null?void 0:t.DeleteThinoDirectly)===void 0?!1:t==null?void 0:t.DeleteThinoDirectly).onChange(M=>{w("DeleteThinoDirectly",M)}))}})]})]})});case 4:return v.jsx(v.Fragment,{children:v.jsxs("div",{className:"thino-congrats",children:[v.jsxs("div",{className:"final-congrats-text",children:[v.jsx("p",{className:"ready-use",children:E("Thino is ready to use. ")}),v.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.")})]}),v.jsxs("div",{className:"next-btns-group",children:[v.jsx("button",{onClick:()=>{const I=localStorage.getItem("language");I&&(I==="zh"||I==="zh-TW")?window.open("https://pkmer.cn/products/thino","_blank"):window.open("https://thino.pkmer.net/en/#price","_blank")},children:E("About Thino Pro")}),v.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 v.jsx(v.Fragment,{children:v.jsx("div",{className:"onboarding-view-container",children:v.jsx("div",{className:"onboarding-view-wrapper",children:v.jsxs("div",{"data-onboarding-step":o,className:"onboarding-view-content",children:[v.jsxs("div",{className:"onboarding-step-count",children:[o+1,"/5"]}),v.jsxs("div",{className:"onboarding-view-details",children:[v.jsxs("div",{className:"details-content",children:[v.jsx("div",{className:"onboarding-header-group",children:S}),v.jsx(v.Fragment,{children:v.jsx("div",{className:"onboarding-form",children:D()})})]}),v.jsxs("div",{className:"details-footer",children:[v.jsx("div",{className:"skip-btn",children:o!==4&&v.jsx("button",{onClick:()=>{w("FirstLoaded",!1)},children:E("Skip and start Thino")})}),v.jsxs("div",{className:"navigate-btns-group",children:[o!==0&&v.jsx("button",{onClick:()=>i(o-1),children:E("Back to previous step")}),o!==4&&v.jsx("button",{className:"mod-cta",onClick:()=>i(o+1),children:E("Next step")}),o===4&&v.jsx("button",{className:"details-settings-btn",onClick:()=>{n.setting.open(),n.setting.openTabById(a.id||"obsidian-memos")},children:E("Details settings")})]})]})]})]})})})})};function ob(e){return ob=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},ob(e)}function Wn(e,t,n,r){return new(n||(n=Promise))(function(a,o){function i(f){try{c(r.next(f))}catch(h){o(h)}}function l(f){try{c(r.throw(f))}catch(h){o(h)}}function c(f){var h;f.done?a(f.value):(h=f.value,h instanceof n?h:new n(function(g){g(h)})).then(i,l)}c((r=r.apply(e,t||[])).next())})}function $n(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(c){return function(f){return function(h){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,h[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&h[0]?r.return:h[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,h[1])).done)return a;switch(r=0,a&&(h=[2&h[0],a.value]),h[0]){case 0:case 1:a=h;break;case 4:return i.label++,{value:h[1],done:!1};case 5:i.label++,r=h[1],h=[0];continue;case 7:h=i.ops.pop(),i.trys.pop();continue;default:if(a=i.trys,!((a=a.length>0&&a[a.length-1])||h[0]!==6&&h[0]!==2)){i=0;continue}if(h[0]===3&&(!a||h[1]>a[0]&&h[1]=0&&c.left>=0&&c.bottom+80<=window.innerHeight&&c.right<=window.innerWidth}(r))){var i=JE().height;o.bottom-(o.bottom-o.top)<0||r.clientHeight>i?window.scrollBy(0,o.top-(i/2-o.height/2)-n):window.scrollBy(0,o.top-(i/2-o.height/2)+n)}}function Wg(e){e.setAttribute("role","button"),e.tabIndex=0}function D1(e){var t=e.parentElement;return!(!t||t.nodeName==="HTML")&&(GE(e,"position")==="fixed"||D1(t))}function Np(e,t){var n=document.body,r=document.documentElement,a=window.pageYOffset||r.scrollTop||n.scrollTop,o=window.pageXOffset||r.scrollLeft||n.scrollLeft;t=t||n;var i=e.getBoundingClientRect(),l=t.getBoundingClientRect(),c=GE(t,"position"),f={width:i.width,height:i.height};return t.tagName.toLowerCase()!=="body"&&c==="relative"||c==="sticky"?Object.assign(f,{top:i.top-l.top,left:i.left-l.left}):D1(e)?Object.assign(f,{top:i.top,left:i.left}):Object.assign(f,{top:i.top+a,left:i.left+o})}function KE(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 nd(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 _u(e,t,n){if(n&&t){var r=Np(t.element,e._targetElement),a=e._options.helperElementPadding;t.element instanceof Element&&D1(t.element)?Zl(n,"introjs-fixedTooltip"):KE(n,"introjs-fixedTooltip"),t.position==="floating"&&(a=0),nd(n,{width:"".concat(r.width+a,"px"),height:"".concat(r.height+a,"px"),top:"".concat(r.top-a/2,"px"),left:"".concat(r.left-a/2,"px")})}}function $0(e,t,n,r,a){return e.left+t+n.width>r.width?(a.style.left="".concat(r.width-n.width-e.left,"px"),!1):(a.style.left="".concat(t,"px"),!0)}function Z0(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 Pl(e,t){e.includes(t)&&e.splice(e.indexOf(t),1)}function Txe(e,t,n,r){var a=e.slice(),o=JE(),i=Np(n).height+10,l=Np(n).width+20,c=t.getBoundingClientRect(),f="floating";if(c.bottom+i>o.height&&Pl(a,"bottom"),c.top-i<0&&Pl(a,"top"),c.right+l>o.width&&Pl(a,"right"),c.left-l<0&&Pl(a,"left"),r&&(r=r.split("-")[0]),a.length&&(f=a[0],a.includes(r)&&(f=r)),f==="top"||f==="bottom"){var h=void 0,g=[];f==="top"?(h="top-middle-aligned",g=["top-left-aligned","top-middle-aligned","top-right-aligned"]):(h="bottom-middle-aligned",g=["bottom-left-aligned","bottom-middle-aligned","bottom-right-aligned"]),f=function(y,w,S,D){var I=w/2,M=Math.min(S,window.screen.width);return M-yl.height?(r.className="introjs-arrow left-bottom",n.style.top="-".concat(o.height-i.height-20,"px")):r.className="introjs-arrow left";break;case"left":a||e._options.showStepNumbers!==!0||(n.style.top="15px"),i.top+o.height>l.height?(n.style.top="-".concat(o.height-i.height-20,"px"),r.className="introjs-arrow right-bottom"):r.className="introjs-arrow right",n.style.right="".concat(i.width+20,"px");break;case"floating":r.style.display="none",n.style.left="50%",n.style.top="50%",n.style.marginLeft="-".concat(o.width/2,"px"),n.style.marginTop="-".concat(o.height/2,"px");break;case"bottom-right-aligned":r.className="introjs-arrow top-right",Z0(i,g=0,o,n),n.style.top="".concat(i.height+20,"px");break;case"bottom-middle-aligned":r.className="introjs-arrow top-middle",a&&(h+=5),Z0(i,h,o,n)&&(n.style.right="",$0(i,h,o,l,n)),n.style.top="".concat(i.height+20,"px");break;default:r.className="introjs-arrow top",$0(i,0,o,l,n),n.style.top="".concat(i.height+20,"px")}}}function LO(){for(var e=0,t=Array.from(document.querySelectorAll(".introjs-showElement"));e a.active"),$=se.querySelector('.introjs-bullets li > a[data-step-number="'.concat(le.step,'"]'));fe&&$&&(fe.className="",$.className="active")}}(e._options.showBullets,r,t),BO(r,e._currentStep,e._introItems.length),y.style.opacity="1",(o!=null&&/introjs-donebutton/gi.test(o.className)||o!=null)&&o.focus(),dN(e._options.scrollToElement,t.scrollTo,e._options.scrollPadding,t.element,f)},350)):(w=xn("div",{className:a}),S=xn("div",{className:"introjs-tooltipReferenceLayer"}),D=xn("div",{className:"introjs-arrow"}),I=xn("div",{className:"introjs-tooltip"}),M=xn("div",{className:"introjs-tooltiptext"}),N=xn("div",{className:"introjs-tooltip-header"}),R=xn("h1",{className:"introjs-tooltip-title"}),k=xn("div"),nd(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")}),cN(e._options.scrollToElement,t.element),_u(e,t,w),_u(e,t,S),fN(e._targetElement,w,!0),fN(e._targetElement,S),M.innerHTML=t.intro,R.innerHTML=t.title,k.className="introjs-tooltipbuttons",e._options.showButtons===!1&&(k.style.display="none"),N.appendChild(R),I.appendChild(N),I.appendChild(M),e._options.dontShowAgain&&(B=xn("div",{className:"introjs-dontShowAgain"}),(L=xn("input",{type:"checkbox",id:"introjs-dontShowAgain",name:"introjs-dontShowAgain"})).onchange=function(K){e.setDontShowAgain(K.target.checked)},(_=xn("label",{htmlFor:"introjs-dontShowAgain"})).innerText=e._options.dontShowAgainLabel,B.appendChild(L),B.appendChild(_),I.appendChild(B)),I.appendChild(_O(e,t)),I.appendChild(function(K){var se=xn("div");se.className="introjs-progress",K._options.showProgress===!1&&(se.style.display="none");var le=xn("div",{className:"introjs-progressbar"});K._options.progressBarAdditionalClass&&(le.className+=" "+K._options.progressBarAdditionalClass);var fe=RO(K._currentStep,K._introItems.length);return le.setAttribute("role","progress"),le.setAttribute("aria-valuemin","0"),le.setAttribute("aria-valuemax","100"),le.setAttribute("aria-valuenow",fe.toString()),le.style.cssText="width:".concat(fe,"%;"),se.appendChild(le),se}(e)),V=xn("div"),e._options.showStepNumbers===!0&&(V.className="introjs-helperNumberLayer",V.innerHTML="".concat(t.step," ").concat(e._options.stepNumbersOfLabel," ").concat(e._introItems.length),I.appendChild(V)),I.appendChild(D),S.appendChild(I),(o=xn("a")).onclick=function(){return Wn(Z,void 0,void 0,function(){return $n(this,function(K){switch(K.label){case 0:return e._introItems.length-1===e._currentStep?[3,2]:[4,Cf(e)];case 1:return K.sent(),[3,6];case 2:return/introjs-donebutton/gi.test(o.className)?lr(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"done")]:[3,4]:[3,6];case 3:K.sent(),K.label=4;case 4:return[4,xf(e,e._targetElement)];case 5:K.sent(),K.label=6;case 6:return[2]}})})},Wg(o),o.innerHTML=e._options.nextLabel,(i=xn("a")).onclick=function(){return Wn(Z,void 0,void 0,function(){return $n(this,function(K){switch(K.label){case 0:return e._currentStep>0?[4,sb(e)]:[3,2];case 1:K.sent(),K.label=2;case 2:return[2]}})})},Wg(i),i.innerHTML=e._options.prevLabel,Wg(l=xn("a",{className:"introjs-skipbutton"})),l.innerHTML=e._options.skipLabel,l.onclick=function(){return Wn(Z,void 0,void 0,function(){return $n(this,function(K){switch(K.label){case 0:return e._introItems.length-1===e._currentStep&&lr(e._introCompleteCallback)?[4,e._introCompleteCallback.call(e,e._currentStep,"skip")]:[3,2];case 1:K.sent(),K.label=2;case 2:return lr(e._introSkipCallback)?[4,e._introSkipCallback.call(e,e._currentStep)]:[3,4];case 3:K.sent(),K.label=4;case 4:return[4,xf(e,e._targetElement)];case 5:return K.sent(),[2]}})})},N.appendChild(l),e._introItems.length>1&&k.appendChild(i),k.appendChild(o),I.appendChild(k),ib(e,t,I,D),dN(e._options.scrollToElement,t.scrollTo,e._options.scrollPadding,t.element,I)),(Y=e._targetElement.querySelector(".introjs-disableInteraction"))&&Y.parentNode&&Y.parentNode.removeChild(Y),t.disableInteraction&&function(K,se){var le=document.querySelector(".introjs-disableInteraction");le===null&&(le=xn("div",{className:"introjs-disableInteraction"}),K._targetElement.appendChild(le)),_u(K,se,le)}(e,t),e._currentStep===0&&e._introItems.length>1?(o!=null&&(o.className="".concat(e._options.buttonClass," introjs-nextbutton"),o.innerHTML=e._options.nextLabel),e._options.hidePrev===!0?(i!=null&&(i.className="".concat(e._options.buttonClass," introjs-prevbutton introjs-hidden")),o!=null&&Zl(o,"introjs-fullbutton")):i!=null&&(i.className="".concat(e._options.buttonClass," introjs-prevbutton introjs-disabled"))):e._introItems.length-1===e._currentStep||e._introItems.length===1?(i!=null&&(i.className="".concat(e._options.buttonClass," introjs-prevbutton")),e._options.hideNext===!0?(o!=null&&(o.className="".concat(e._options.buttonClass," introjs-nextbutton introjs-hidden")),i!=null&&Zl(i,"introjs-fullbutton")):o!=null&&(e._options.nextToDone===!0?(o.innerHTML=e._options.doneLabel,Zl(o,"".concat(e._options.buttonClass," introjs-nextbutton introjs-donebutton"))):o.className="".concat(e._options.buttonClass," introjs-nextbutton introjs-disabled"))):(i!=null&&(i.className="".concat(e._options.buttonClass," introjs-prevbutton")),o!=null&&(o.className="".concat(e._options.buttonClass," introjs-nextbutton"),o.innerHTML=e._options.nextLabel)),i!=null&&i.setAttribute("role","button"),o!=null&&o.setAttribute("role","button"),l!=null&&l.setAttribute("role","button"),o!=null&&o.focus(),function(K){Zl(K,"introjs-showElement");var se=GE(K,"position");se!=="absolute"&&se!=="relative"&&se!=="sticky"&&se!=="fixed"&&Zl(K,"introjs-relativePosition")}(t.element),lr(e._introAfterChangeCallback)?[4,e._introAfterChangeCallback.call(e,t.element)]:[3,4];case 3:Q.sent(),Q.label=4;case 4:return[2]}})})}function Ixe(e,t){return Wn(this,void 0,void 0,function(){return $n(this,function(n){switch(n.label){case 0:return e._currentStep=t-2,e._introItems===void 0?[3,2]:[4,Cf(e)];case 1:n.sent(),n.label=2;case 2:return[2]}})})}function Exe(e,t){return Wn(this,void 0,void 0,function(){return $n(this,function(n){switch(n.label){case 0:return e._currentStepNumber=t,e._introItems===void 0?[3,2]:[4,Cf(e)];case 1:n.sent(),n.label=2;case 2:return[2]}})})}function Cf(e){return Wn(this,void 0,void 0,function(){var t,n,r;return $n(this,function(a){switch(a.label){case 0:if(e._direction="forward",e._currentStepNumber!==void 0)for(t=0;t=0&&(e._hintsAutoRefreshFunction=(f=function(){return I1(e)},h=e._options.hintAutoRefreshInterval,function(){for(var y=[],w=0;w0)for(n=0,r=e._options.hints;n0&&(r[y-1]={step:y,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:c})}}for(var w=0,S=0,D=n;S