/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/

(function initCjs() {
  const globalThisRecord = globalThis;
  globalThisRecord["__name"] ??= name;
  const originalRequire = require;
  if (originalRequire && !originalRequire.__isPatched) {
    require = Object.assign(
      (id) => requirePatched(id),
      originalRequire,
      {
        __isPatched: true
      }
    );
  }
  const newFuncs = {
    __extractDefault() {
      return extractDefault;
    },
    process() {
      const browserProcess = {
        browser: true,
        cwd() {
          return "/";
        },
        env: {},
        platform: "android"
      };
      return browserProcess;
    }
  };
  for (const key of Object.keys(newFuncs)) {
    globalThisRecord[key] ??= newFuncs[key]?.();
  }
  function name(obj) {
    return obj;
  }
  function extractDefault(module) {
    return module && module.__esModule && "default" in module ? module.default : module;
  }
  const OBSIDIAN_BUILT_IN_MODULE_NAMES = [
    "obsidian",
    "@codemirror/autocomplete",
    "@codemirror/collab",
    "@codemirror/commands",
    "@codemirror/language",
    "@codemirror/lint",
    "@codemirror/search",
    "@codemirror/state",
    "@codemirror/text",
    "@codemirror/view",
    "@lezer/common",
    "@lezer/lr",
    "@lezer/highlight"
  ];
  const DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES = [
    "@codemirror/closebrackets",
    "@codemirror/comment",
    "@codemirror/fold",
    "@codemirror/gutter",
    "@codemirror/highlight",
    "@codemirror/history",
    "@codemirror/matchbrackets",
    "@codemirror/panel",
    "@codemirror/rangeset",
    "@codemirror/rectangular-selection",
    "@codemirror/stream-parser",
    "@codemirror/tooltip"
  ];
  function requirePatched(id) {
    if (OBSIDIAN_BUILT_IN_MODULE_NAMES.includes(id) || DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES.includes(id)) {
      return originalRequire?.(id);
    }
    if (globalThis?.app?.isMobile) {
      if (id === "process" || id === "node:process") {
        console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Fake process object is returned instead.`);
        return globalThis.process;
      }
    } else {
      const module = originalRequire?.(id);
      if (module) {
        return extractDefault(module);
      }
    }
    console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Empty object is returned instead.`);
    return {};
  }
})();

"use strict";var Vn=Object.create;var he=Object.defineProperty;var Kn=Object.getOwnPropertyDescriptor;var Gn=Object.getOwnPropertyNames;var qn=Object.getPrototypeOf,Yn=Object.prototype.hasOwnProperty;var s=(n,e)=>he(n,"name",{value:e,configurable:!0});var H=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Jn=(n,e)=>{for(var t in e)he(n,t,{get:e[t],enumerable:!0})},Dt=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Gn(e))!Yn.call(n,r)&&r!==t&&he(n,r,{get:()=>e[r],enumerable:!(i=Kn(e,r))||i.enumerable});return n};var Ft=(n,e,t)=>(t=n!=null?Vn(qn(n)):{},Dt(e||!n||!n.__esModule?he(t,"default",{value:n,enumerable:!0}):t,n)),Xn=n=>Dt(he({},"__esModule",{value:!0}),n);var jt=H((_r,_t)=>{var ee=1e3,te=ee*60,ne=te*60,G=ne*24,Qn=G*7,ei=G*365.25;_t.exports=function(n,e){e=e||{};var t=typeof n;if(t==="string"&&n.length>0)return ti(n);if(t==="number"&&isFinite(n))return e.long?ii(n):ni(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function ti(n){if(n=String(n),!(n.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(e){var t=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return t*ei;case"weeks":case"week":case"w":return t*Qn;case"days":case"day":case"d":return t*G;case"hours":case"hour":case"hrs":case"hr":case"h":return t*ne;case"minutes":case"minute":case"mins":case"min":case"m":return t*te;case"seconds":case"second":case"secs":case"sec":case"s":return t*ee;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}s(ti,"parse");function ni(n){var e=Math.abs(n);return e>=G?Math.round(n/G)+"d":e>=ne?Math.round(n/ne)+"h":e>=te?Math.round(n/te)+"m":e>=ee?Math.round(n/ee)+"s":n+"ms"}s(ni,"fmtShort");function ii(n){var e=Math.abs(n);return e>=G?Se(n,e,G,"day"):e>=ne?Se(n,e,ne,"hour"):e>=te?Se(n,e,te,"minute"):e>=ee?Se(n,e,ee,"second"):n+" ms"}s(ii,"fmtLong");function Se(n,e,t,i){var r=e>=t*1.5;return Math.round(n/t)+" "+i+(r?"s":"")}s(Se,"plural")});var Qe=H((Br,Bt)=>{function ri(n){t.debug=t,t.default=t,t.coerce=u,t.disable=a,t.enable=r,t.enabled=l,t.humanize=jt(),t.destroy=c,Object.keys(n).forEach(d=>{t[d]=n[d]}),t.names=[],t.skips=[],t.formatters={};function e(d){let p=0;for(let f=0;f<d.length;f++)p=(p<<5)-p+d.charCodeAt(f),p|=0;return t.colors[Math.abs(p)%t.colors.length]}s(e,"selectColor"),t.selectColor=e;function t(d){let p,f=null,h,m;function v(...g){if(!v.enabled)return;let y=v,A=Number(new Date),w=A-(p||A);y.diff=w,y.prev=p,y.curr=A,p=A,g[0]=t.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let C=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(x,M)=>{if(x==="%%")return"%";C++;let P=t.formatters[M];if(typeof P=="function"){let O=g[C];x=P.call(y,O),g.splice(C,1),C--}return x}),t.formatArgs.call(y,g),(y.log||t.log).apply(y,g)}return s(v,"debug"),v.namespace=d,v.useColors=t.useColors(),v.color=t.selectColor(d),v.extend=i,v.destroy=t.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:s(()=>f!==null?f:(h!==t.namespaces&&(h=t.namespaces,m=t.enabled(d)),m),"get"),set:s(g=>{f=g},"set")}),typeof t.init=="function"&&t.init(v),v}s(t,"createDebug");function i(d,p){let f=t(this.namespace+(typeof p>"u"?":":p)+d);return f.log=this.log,f}s(i,"extend");function r(d){t.save(d),t.namespaces=d,t.names=[],t.skips=[];let p=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of p)f[0]==="-"?t.skips.push(f.slice(1)):t.names.push(f)}s(r,"enable");function o(d,p){let f=0,h=0,m=-1,v=0;for(;f<d.length;)if(h<p.length&&(p[h]===d[f]||p[h]==="*"))p[h]==="*"?(m=h,v=f,h++):(f++,h++);else if(m!==-1)h=m+1,v++,f=v;else return!1;for(;h<p.length&&p[h]==="*";)h++;return h===p.length}s(o,"matchesTemplate");function a(){let d=[...t.names,...t.skips.map(p=>"-"+p)].join(",");return t.enable(""),d}s(a,"disable");function l(d){for(let p of t.skips)if(o(d,p))return!1;for(let p of t.names)if(o(d,p))return!0;return!1}s(l,"enabled");function u(d){return d instanceof Error?d.stack||d.message:d}s(u,"coerce");function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return s(c,"destroy"),t.enable(t.load()),t}s(ri,"setup");Bt.exports=ri});var Wt=H((I,Te)=>{I.formatArgs=si;I.save=ai;I.load=li;I.useColors=oi;I.storage=ci();I.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();I.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function oi(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let n;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(n=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(n[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}s(oi,"useColors");function si(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+Te.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;n.splice(1,0,e,"color: inherit");let t=0,i=0;n[0].replace(/%[a-zA-Z%]/g,r=>{r!=="%%"&&(t++,r==="%c"&&(i=t))}),n.splice(i,0,e)}s(si,"formatArgs");I.log=console.debug||console.log||(()=>{});function ai(n){try{n?I.storage.setItem("debug",n):I.storage.removeItem("debug")}catch{}}s(ai,"save");function li(){let n;try{n=I.storage.getItem("debug")||I.storage.getItem("DEBUG")}catch{}return!n&&typeof process<"u"&&"env"in process&&(n=process.env.DEBUG),n}s(li,"load");function ci(){try{return localStorage}catch{}}s(ci,"localstorage");Te.exports=Qe()(I);var{formatters:ui}=Te.exports;ui.j=function(n){try{return JSON.stringify(n)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var zt=H((zr,Ht)=>{"use strict";Ht.exports=(n,e)=>{e=e||process.argv;let t=n.startsWith("-")?"":n.length===1?"-":"--",i=e.indexOf(t+n),r=e.indexOf("--");return i!==-1&&(r===-1?!0:i<r)}});var Vt=H((Ur,Ut)=>{"use strict";var di=require("os"),B=zt(),R=process.env,ie;B("no-color")||B("no-colors")||B("color=false")?ie=!1:(B("color")||B("colors")||B("color=true")||B("color=always"))&&(ie=!0);"FORCE_COLOR"in R&&(ie=R.FORCE_COLOR.length===0||parseInt(R.FORCE_COLOR,10)!==0);function pi(n){return n===0?!1:{level:n,hasBasic:!0,has256:n>=2,has16m:n>=3}}s(pi,"translateLevel");function fi(n){if(ie===!1)return 0;if(B("color=16m")||B("color=full")||B("color=truecolor"))return 3;if(B("color=256"))return 2;if(n&&!n.isTTY&&ie!==!0)return 0;let e=ie?1:0;if(process.platform==="win32"){let t=di.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in R)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(t=>t in R)||R.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in R)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(R.TEAMCITY_VERSION)?1:0;if(R.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in R){let t=parseInt((R.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(R.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(R.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(R.TERM)||"COLORTERM"in R?1:(R.TERM==="dumb",e)}s(fi,"supportsColor");function et(n){let e=fi(n);return pi(e)}s(et,"getSupportLevel");Ut.exports={supportsColor:et,stdout:et(process.stdout),stderr:et(process.stderr)}});var Gt=H((S,Le)=>{var hi=require("tty"),Oe=require("util");S.init=wi;S.log=bi;S.formatArgs=mi;S.save=Ai;S.load=vi;S.useColors=gi;S.destroy=Oe.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");S.colors=[6,2,3,4,5,1];try{let n=Vt();n&&(n.stderr||n).level>=2&&(S.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}S.inspectOpts=Object.keys(process.env).filter(n=>/^debug_/i.test(n)).reduce((n,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(r,o)=>o.toUpperCase()),i=process.env[e];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),n[t]=i,n},{});function gi(){return"colors"in S.inspectOpts?!!S.inspectOpts.colors:hi.isatty(process.stderr.fd)}s(gi,"useColors");function mi(n){let{namespace:e,useColors:t}=this;if(t){let i=this.color,r="\x1B[3"+(i<8?i:"8;5;"+i),o=`  ${r};1m${e} \x1B[0m`;n[0]=o+n[0].split(`
`).join(`
`+o),n.push(r+"m+"+Le.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=yi()+e+" "+n[0]}s(mi,"formatArgs");function yi(){return S.inspectOpts.hideDate?"":new Date().toISOString()+" "}s(yi,"getDate");function bi(...n){return process.stderr.write(Oe.formatWithOptions(S.inspectOpts,...n)+`
`)}s(bi,"log");function Ai(n){n?process.env.DEBUG=n:delete process.env.DEBUG}s(Ai,"save");function vi(){return process.env.DEBUG}s(vi,"load");function wi(n){n.inspectOpts={};let e=Object.keys(S.inspectOpts);for(let t=0;t<e.length;t++)n.inspectOpts[e[t]]=S.inspectOpts[e[t]]}s(wi,"init");Le.exports=Qe()(S);var{formatters:Kt}=Le.exports;Kt.o=function(n){return this.inspectOpts.colors=this.useColors,Oe.inspect(n,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};Kt.O=function(n){return this.inspectOpts.colors=this.useColors,Oe.inspect(n,this.inspectOpts)}});var qt=H((Gr,tt)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?tt.exports=Wt():tt.exports=Gt()});var Rn=H((Ue,Pn)=>{(function(n,e){typeof Ue=="object"&&typeof Pn<"u"?e(Ue):typeof define=="function"&&define.amd?define(["exports"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n.compareVersions={}))})(Ue,(function(n){"use strict";let e=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,t=s(g=>{if(typeof g!="string")throw new TypeError("Invalid argument expected string");let y=g.match(e);if(!y)throw new Error(`Invalid argument not valid semver ('${g}' received)`);return y.shift(),y},"validateAndParse"),i=s(g=>g==="*"||g==="x"||g==="X","isWildcard"),r=s(g=>{let y=parseInt(g,10);return isNaN(y)?g:y},"tryParse"),o=s((g,y)=>typeof g!=typeof y?[String(g),String(y)]:[g,y],"forceType"),a=s((g,y)=>{if(i(g)||i(y))return 0;let[A,w]=o(r(g),r(y));return A>w?1:A<w?-1:0},"compareStrings"),l=s((g,y)=>{for(let A=0;A<Math.max(g.length,y.length);A++){let w=a(g[A]||"0",y[A]||"0");if(w!==0)return w}return 0},"compareSegments"),u=s((g,y)=>{let A=t(g),w=t(y),C=A.pop(),T=w.pop(),x=l(A,w);return x!==0?x:C&&T?l(C.split("."),T.split(".")):C||T?C?-1:1:0},"compareVersions"),c=s((g,y,A)=>{f(A);let w=u(g,y);return d[A].includes(w)},"compare"),d={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},p=Object.keys(d),f=s(g=>{if(typeof g!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof g}`);if(p.indexOf(g)===-1)throw new Error(`Invalid operator, expected one of ${p.join("|")}`)},"assertValidOperator"),h=s((g,y)=>{if(y=y.replace(/([><=]+)\s+/g,"$1"),y.includes("||"))return y.split("||").some(k=>h(g,k));if(y.includes(" - ")){let[k,j]=y.split(" - ",2);return h(g,`>=${k} <=${j}`)}else if(y.includes(" "))return y.trim().replace(/\s{2,}/g," ").split(" ").every(k=>h(g,k));let A=y.match(/^([<>=~^]+)/),w=A?A[1]:"=";if(w!=="^"&&w!=="~")return c(g,y,w);let[C,T,x,,M]=t(g),[P,O,F,,xe]=t(y),de=[C,T,x],E=[P,O??"x",F??"x"];if(xe&&(!M||l(de,E)!==0||l(M.split("."),xe.split("."))===-1))return!1;let N=E.findIndex(k=>k!=="0")+1,U=w==="~"?2:N>1?N:1;return!(l(de.slice(0,U),E.slice(0,U))!==0||l(de.slice(U),E.slice(U))===-1)},"satisfies"),m=s(g=>typeof g=="string"&&/^[v\d]/.test(g)&&e.test(g),"validate"),v=s(g=>typeof g=="string"&&/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/.test(g),"validateStrict");n.compare=c,n.compareVersions=u,n.satisfies=h,n.validate=m,n.validateStrict=v}))});var xr={};Jn(xr,{default:()=>Er});module.exports=Xn(xr);var Ke=require("obsidian");s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();function Ze(n,e){let t=n.length,i=0;for(let r=0;r<t;r++){if(!Object.hasOwn(n,r))continue;let o=n[r];e(o,r,n)&&(n[i++]=o)}n.length=i}s(Ze,"filterInPlace");s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();var K=class{static{s(this,"AsyncEvents")}eventRefsMap=new Map;off(e,t){let i=this.eventRefsMap.get(e);i&&(Ze(i,r=>r.callback!==t),i.length===0&&this.eventRefsMap.delete(e))}offref(e){let t=this.eventRefsMap.get(e.name);t&&(Ze(t,i=>i!==e),t.length===0&&this.eventRefsMap.delete(e.name))}on(e,t,i){let r=this.eventRefsMap.get(e);r||(r=[],this.eventRefsMap.set(e,r));let o={asyncEvents:this,callback:t,name:e,thisArg:i};return r.push(o),o}once(e,t,i){let r=this.on(e,t,i),o=this.on(e,()=>{this.offref(r),this.offref(o)});return r}trigger(e,...t){let i=this.eventRefsMap.get(e)??[];for(let r of i.slice())this.tryTrigger(r,t)}async triggerAsync(e,...t){let i=this.eventRefsMap.get(e)??[];for(let r of i.slice())await this.tryTriggerAsync(r,t)}tryTrigger(e,t){try{e.callback.apply(e.thisArg,t)}catch(i){window.setTimeout(()=>{throw i},0)}}async tryTriggerAsync(e,t){try{await e.callback.call(e.thisArg,...t)}catch(i){window.setTimeout(()=>{throw i},0)}}};s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();function ge(){}s(ge,"noop");async function me(){}s(me,"noopAsync");s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();var Zn=Number.POSITIVE_INFINITY;function Nt(...n){let e=n.filter(o=>!!o);if(typeof AbortSignal.any=="function")return AbortSignal.any(e);if(e.length===0)return Q();if(e.length===1&&e[0])return e[0];let t=new AbortController;for(let o of e)if(o.aborted)return o;let i=[];for(let o of e)i.push(Mt(o,r));return t.signal;function r(o){for(let a of i)a();t.abort(o.reason)}}s(Nt,"abortSignalAny");function Q(){return new AbortController().signal}s(Q,"abortSignalNever");function It(n){if(n===Zn)return Q();if(typeof AbortSignal.timeout=="function")return AbortSignal.timeout(n);let e=new AbortController;return window.setTimeout(()=>{e.abort(new Error(`Timed out in ${String(n)} milliseconds`))},n),e.signal}s(It,"abortSignalTimeout");function Mt(n,e){if(n.aborted)return e(n),ge;return n.addEventListener("abort",t,{once:!0}),()=>{n.removeEventListener("abort",t)};function t(i){e(i.target)}s(t,"wrappedCallback")}s(Mt,"onAbort");function $t(n,e){return new Promise((t,i)=>{Mt(n,()=>{e?i(n.reason):t(n.reason)})})}s($t,"waitForAbort");var dt=Ft(qt(),1);s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();function nt(n,e){if(n!=null)return;throw e??=n===null?"Value is null":"Value is undefined",typeof e=="string"?new Error(e):e}s(nt,"assertNonNullable");function _(n,e){return nt(n,e),n}s(_,"ensureNonNullable");s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();var it="asyncError",Pe=new K;Pe.on(it,Ci);var Jt="An unhandled error occurred executing async operation",Xt="    at",re=class n extends Error{static{s(this,"CustomStackTraceError")}constructor(e,t,i){super(e,{cause:i}),this.name="CustomStackTraceError",Error.captureStackTrace?.(this,n);let r=i,o=new Set;for(;r instanceof n;){if(o.has(r))throw new Error("Circular cause detected");o.add(r),r=r.cause}let a=_(this.stack).split(`
`),l=t.split(`
`);/^\w*Error(?:: |$)/.test(_(l[0]))&&l.splice(0,1),a.splice(1,a.length-1,...l),this.stack=a.join(`
`)}},oe=class n extends Error{static{s(this,"SilentError")}constructor(e){super(e),this.name="SilentError",Error.captureStackTrace?.(this,n)}};function Zt(n){Pe.trigger(it,n)}s(Zt,"emitAsyncErrorEvent");function rt(n){if(!(n instanceof Error))return String(n);let e=n.stack??`${n.name}: ${n.message}`;if(n.cause!==void 0){let t=rt(n.cause).split(`
`);e+=`
${Yt("Caused by:")}`;for(let i of t)i.trim()&&(e+=i.startsWith(Xt)?`
${i}`:`
${Yt(i)}`)}return e}s(rt,"errorToString");function se(n=0){return _(new Error().stack).split(`
`).slice(n+2).join(`
`)}s(se,"getStackTrace");function Qt(n,e){e??=globalThis.console,e.error(rt(n))}s(Qt,"printError");function en(n){let e=Pe.on(it,n);return()=>{Pe.offref(e)}}s(en,"registerAsyncErrorEventHandler");function Yt(n){return`${Xt} --- ${n} --- (0)`}s(Yt,"generateStackTraceLine");function Ci(n){Qt(n)}s(Ci,"handleAsyncError");s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();var ot="53.1.1",Re="obsidian-dev-utils",tn=`.obsidian-dev-utils.code-highlighter-component textarea, .obsidian-dev-utils.code-highlighter-component pre, .obsidian-dev-utils.code-highlighter-component code {
  font-family: var(--font-monospace);
  line-height: var(--line-height-normal);
  margin: 0;
}
.obsidian-dev-utils.code-highlighter-component textarea, .obsidian-dev-utils.code-highlighter-component code {
  font-size: var(--code-size);
}
.obsidian-dev-utils.code-highlighter-component textarea {
  background: transparent;
  color: transparent;
  z-index: 2;
  width: 20em;
  height: 10em;
}
.obsidian-dev-utils.code-highlighter-component pre {
  position: absolute;
  pointer-events: none;
  border: var(--input-border-width) solid transparent;
  overflow: auto;
  inset: 0;
  padding: var(--size-4-1) var(--size-4-2);
  z-index: 1;
}
.obsidian-dev-utils.code-highlighter-component pre::after {
  content: "";
  display: block;
  height: var(--bottom-gap, 0);
}
.obsidian-dev-utils.code-highlighter-component pre.is-placeholder {
  opacity: 0.6;
}
.obsidian-dev-utils.code-highlighter-component code {
  display: block;
  padding: 0;
}

.obsidian-dev-utils input[type=url] {
  height: var(--input-height);
}
.obsidian-dev-utils input[type=month],
.obsidian-dev-utils input[type=tel],
.obsidian-dev-utils input[type=time],
.obsidian-dev-utils input[type=url],
.obsidian-dev-utils input[type=week] {
  -webkit-app-region: no-drag;
  background: var(--background-modifier-form-field);
  border: var(--input-border-width) solid var(--background-modifier-border);
  color: var(--text-normal);
  font-family: inherit;
  padding: var(--size-4-1) var(--size-4-2);
  font-size: var(--font-ui-small);
  border-radius: var(--input-radius);
  outline: none;
}
@media (hover: hover) {
  .obsidian-dev-utils input[type=month]:hover,
  .obsidian-dev-utils input[type=tel]:hover,
  .obsidian-dev-utils input[type=time]:hover,
  .obsidian-dev-utils input[type=url]:hover,
  .obsidian-dev-utils input[type=week]:hover {
    border-color: var(--background-modifier-border-hover);
    transition: box-shadow 0.15s ease-in-out, border 0.15s ease-in-out;
  }
}
.obsidian-dev-utils input[type=month]:active, .obsidian-dev-utils input[type=month]:focus,
.obsidian-dev-utils input[type=tel]:active,
.obsidian-dev-utils input[type=tel]:focus,
.obsidian-dev-utils input[type=time]:active,
.obsidian-dev-utils input[type=time]:focus,
.obsidian-dev-utils input[type=url]:active,
.obsidian-dev-utils input[type=url]:focus,
.obsidian-dev-utils input[type=week]:active,
.obsidian-dev-utils input[type=week]:focus {
  border-color: var(--background-modifier-border-focus);
  transition: box-shadow 0.15s ease-in-out, border 0.15s ease-in-out;
}
.obsidian-dev-utils input[type=month]:active, .obsidian-dev-utils input[type=month]:focus, .obsidian-dev-utils input[type=month]:focus-visible,
.obsidian-dev-utils input[type=tel]:active,
.obsidian-dev-utils input[type=tel]:focus,
.obsidian-dev-utils input[type=tel]:focus-visible,
.obsidian-dev-utils input[type=time]:active,
.obsidian-dev-utils input[type=time]:focus,
.obsidian-dev-utils input[type=time]:focus-visible,
.obsidian-dev-utils input[type=url]:active,
.obsidian-dev-utils input[type=url]:focus,
.obsidian-dev-utils input[type=url]:focus-visible,
.obsidian-dev-utils input[type=week]:active,
.obsidian-dev-utils input[type=week]:focus,
.obsidian-dev-utils input[type=week]:focus-visible {
  box-shadow: 0 0 0 2px var(--background-modifier-border-focus);
}
.obsidian-dev-utils input[type=month]::placeholder,
.obsidian-dev-utils input[type=tel]::placeholder,
.obsidian-dev-utils input[type=time]::placeholder,
.obsidian-dev-utils input[type=url]::placeholder,
.obsidian-dev-utils input[type=week]::placeholder {
  color: var(--text-faint);
}
.mod-rtl input[type=month],
.mod-rtl input[type=time],
.mod-rtl input[type=week],
.is-rtl input[type=month],
.is-rtl input[type=time],
.is-rtl input[type=week],
.rtl input[type=month],
.rtl input[type=time],
.rtl input[type=week] {
  direction: rtl;
}
.mod-rtl input[type=month]::-webkit-calendar-picker-indicator,
.mod-rtl input[type=time]::-webkit-calendar-picker-indicator,
.mod-rtl input[type=week]::-webkit-calendar-picker-indicator,
.is-rtl input[type=month]::-webkit-calendar-picker-indicator,
.is-rtl input[type=time]::-webkit-calendar-picker-indicator,
.is-rtl input[type=week]::-webkit-calendar-picker-indicator,
.rtl input[type=month]::-webkit-calendar-picker-indicator,
.rtl input[type=time]::-webkit-calendar-picker-indicator,
.rtl input[type=week]::-webkit-calendar-picker-indicator {
  right: var(--size-4-1);
  left: auto;
}

.obsidian-dev-utils input[type=month],
.obsidian-dev-utils input[type=time],
.obsidian-dev-utils input[type=week] {
  font-variant-numeric: tabular-nums;
  position: relative;
}
.obsidian-dev-utils input[type=month]::-webkit-datetime-edit-text,
.obsidian-dev-utils input[type=time]::-webkit-datetime-edit-text,
.obsidian-dev-utils input[type=week]::-webkit-datetime-edit-text {
  color: var(--text-faint);
  padding-inline-end: 0;
}
.obsidian-dev-utils input[type=month]::-webkit-calendar-picker-indicator,
.obsidian-dev-utils input[type=time]::-webkit-calendar-picker-indicator,
.obsidian-dev-utils input[type=week]::-webkit-calendar-picker-indicator {
  position: absolute;
  left: var(--size-4-1);
  right: auto;
  opacity: 0.5;
}
.obsidian-dev-utils input[type=month]::-webkit-datetime-edit-month-field:active, .obsidian-dev-utils input[type=month]::-webkit-datetime-edit-month-field:focus, .obsidian-dev-utils input[type=month]::-webkit-datetime-edit-day-field:active, .obsidian-dev-utils input[type=month]::-webkit-datetime-edit-day-field:focus, .obsidian-dev-utils input[type=month]::-webkit-datetime-edit-year-field:active, .obsidian-dev-utils input[type=month]::-webkit-datetime-edit-year-field:focus,
.obsidian-dev-utils input[type=time]::-webkit-datetime-edit-month-field:active,
.obsidian-dev-utils input[type=time]::-webkit-datetime-edit-month-field:focus,
.obsidian-dev-utils input[type=time]::-webkit-datetime-edit-day-field:active,
.obsidian-dev-utils input[type=time]::-webkit-datetime-edit-day-field:focus,
.obsidian-dev-utils input[type=time]::-webkit-datetime-edit-year-field:active,
.obsidian-dev-utils input[type=time]::-webkit-datetime-edit-year-field:focus,
.obsidian-dev-utils input[type=week]::-webkit-datetime-edit-month-field:active,
.obsidian-dev-utils input[type=week]::-webkit-datetime-edit-month-field:focus,
.obsidian-dev-utils input[type=week]::-webkit-datetime-edit-day-field:active,
.obsidian-dev-utils input[type=week]::-webkit-datetime-edit-day-field:focus,
.obsidian-dev-utils input[type=week]::-webkit-datetime-edit-year-field:active,
.obsidian-dev-utils input[type=week]::-webkit-datetime-edit-year-field:focus {
  background-color: var(--text-selection);
  color: var(--text-normal);
  cursor: text;
}
.mod-rtl .obsidian-dev-utils input[type=month], .is-rtl .obsidian-dev-utils input[type=month], .rtl .obsidian-dev-utils input[type=month],
.mod-rtl .obsidian-dev-utils input[type=time],
.is-rtl .obsidian-dev-utils input[type=time],
.rtl .obsidian-dev-utils input[type=time],
.mod-rtl .obsidian-dev-utils input[type=week],
.is-rtl .obsidian-dev-utils input[type=week],
.rtl .obsidian-dev-utils input[type=week] {
  direction: rtl;
}
.mod-rtl .obsidian-dev-utils input[type=month]::-webkit-calendar-picker-indicator, .is-rtl .obsidian-dev-utils input[type=month]::-webkit-calendar-picker-indicator, .rtl .obsidian-dev-utils input[type=month]::-webkit-calendar-picker-indicator,
.mod-rtl .obsidian-dev-utils input[type=time]::-webkit-calendar-picker-indicator,
.is-rtl .obsidian-dev-utils input[type=time]::-webkit-calendar-picker-indicator,
.rtl .obsidian-dev-utils input[type=time]::-webkit-calendar-picker-indicator,
.mod-rtl .obsidian-dev-utils input[type=week]::-webkit-calendar-picker-indicator,
.is-rtl .obsidian-dev-utils input[type=week]::-webkit-calendar-picker-indicator,
.rtl .obsidian-dev-utils input[type=week]::-webkit-calendar-picker-indicator {
  left: auto;
  right: var(--size-4-1);
}

body:not(.is-ios):not(.is-android) .obsidian-dev-utils input[type=month],
body:not(.is-ios):not(.is-android) .obsidian-dev-utils input[type=time],
body:not(.is-ios):not(.is-android) .obsidian-dev-utils input[type=week] {
  padding-inline-start: var(--size-4-6);
}

.obsidian-dev-utils input[type=time]::-webkit-calendar-picker-indicator {
  margin-inline-start: 0;
}

.obsidian-dev-utilsprogress.loop {
  min-width: 200px;
}

.obsidian-dev-utils.modal-container .ok-button {
  margin-right: 10px;
  margin-top: 20px;
}

.obsidian-dev-utils .multiple-dropdown-component select,
.obsidian-dev-utils .multiple-dropdown-component select:focus,
.obsidian-dev-utils .multiple-dropdown-component .dropdown {
  height: auto;
  padding-top: 3px;
}
.obsidian-dev-utils .multiple-dropdown-component select option:checked,
.obsidian-dev-utils .multiple-dropdown-component select:focus option:checked,
.obsidian-dev-utils .multiple-dropdown-component .dropdown option:checked {
  background-color: #1967d2;
  color: #fff;
}

.obsidian-dev-utils.plugin-settings-tab a:focus {
  outline: 2px solid var(--link-color);
}

.obsidian-dev-utils.prompt-modal .text-box {
  width: 100%;
}

.obsidian-dev-utils.tri-state-checkbox-component input[type=checkbox]:indeterminate {
  appearance: checkbox;
}

.obsidian-dev-utils :invalid {
  box-shadow: 0 0 0 2px var(--text-error);
}
.obsidian-dev-utils input.metadata-input-text:active:invalid, .obsidian-dev-utils input.metadata-input-text:focus-visible:invalid, .obsidian-dev-utils input.metadata-input-text:focus:invalid,
.obsidian-dev-utils input[type=date]:active:invalid,
.obsidian-dev-utils input[type=date]:focus-visible:invalid,
.obsidian-dev-utils input[type=date]:focus:invalid,
.obsidian-dev-utils input[type=datetime-local]:active:invalid,
.obsidian-dev-utils input[type=datetime-local]:focus-visible:invalid,
.obsidian-dev-utils input[type=datetime-local]:focus:invalid,
.obsidian-dev-utils input[type=email]:active:invalid,
.obsidian-dev-utils input[type=email]:focus-visible:invalid,
.obsidian-dev-utils input[type=email]:focus:invalid,
.obsidian-dev-utils input[type=number]:active:invalid,
.obsidian-dev-utils input[type=number]:focus-visible:invalid,
.obsidian-dev-utils input[type=number]:focus:invalid,
.obsidian-dev-utils input[type=password]:active:invalid,
.obsidian-dev-utils input[type=password]:focus-visible:invalid,
.obsidian-dev-utils input[type=password]:focus:invalid,
.obsidian-dev-utils input[type=search]:active:invalid,
.obsidian-dev-utils input[type=search]:focus-visible:invalid,
.obsidian-dev-utils input[type=search]:focus:invalid,
.obsidian-dev-utils input[type=text]:active:invalid,
.obsidian-dev-utils input[type=text]:focus-visible:invalid,
.obsidian-dev-utils input[type=text]:focus:invalid,
.obsidian-dev-utils textarea:active:invalid,
.obsidian-dev-utils textarea:focus-visible:invalid,
.obsidian-dev-utils textarea:focus:invalid {
  box-shadow: 0 0 0 2px var(--text-error);
}
.obsidian-dev-utils.setting-component-wrapper {
  position: relative;
  display: inline-flex;
}
.obsidian-dev-utils.overlay-validator {
  caret-color: transparent;
  cursor: default;
  position: absolute;
  background-color: transparent;
  border: none;
  outline: none;
  pointer-events: none;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}
.obsidian-dev-utils.tooltip.tooltip-validator {
  position: absolute;
  top: calc(100% + 8px);
  width: max-content;
}

/*# sourceMappingURL=data:application/json;charset=utf-8,%7B%22version%22:3,%22sourceRoot%22:%22%22,%22sources%22:%5B%22../src/styles/code-highlighter-component.scss%22,%22../src/styles/input.scss%22,%22../src/styles/input-time.scss%22,%22../src/styles/loop.scss%22,%22../src/styles/modal-container.scss%22,%22../src/styles/multiple-dropdown-component.scss%22,%22../src/styles/plugin-settings-tab.scss%22,%22../src/styles/prompt-modal.scss%22,%22../src/styles/tri-state-checkbox-component.scss%22,%22../src/styles/validation.scss%22%5D,%22names%22:%5B%5D,%22mappings%22:%22AAEI;EACE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;;ACzCJ;EACE;;AAGF;AAAA;AAAA;AAAA;AAAA;EAKE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGE;EACE;AAAA;AAAA;AAAA;AAAA;IACE;IACA,YACE;;;AAMR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAEE;EACA,YACE;;AAIJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAGE;;AAGF;AAAA;AAAA;AAAA;AAAA;EACE;;AASE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAGE;;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EACE;EACA;;;AC7DV;AAAA;AAAA;EAGE;EACA;;AAEA;AAAA;AAAA;EACE;EACA;;AAGF;AAAA;AAAA;EACE;EACA;EACA;EACA;;AAMA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAEE;EACA;EACA;;AAIK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAGP;;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EACE;EACA;;;AAKF;AAAA;AAAA;EACE;;;AAMJ;EACE;;;ACjDJ;EACE;;;ACAA;EACE;EACA;;;ACFF;AAAA;AAAA;EAGE;EACA;;AAEA;AAAA;AAAA;EACE;EACA;;;ACRJ;EACE;;;ACDF;EACE;;;ACDF;EACE;;;ACEJ;EAJA;;AAoBI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EApBJ;;AA0BA;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA%22,%22file%22:%22styles.css%22,%22sourcesContent%22:%5B%22.obsidian-dev-utils%20%7B%5Cn%20%20&.code-highlighter-component%20%7B%5Cn%20%20%20%20textarea,%20pre,%20code%20%7B%5Cn%20%20%20%20%20%20font-family:%20var(--font-monospace);%5Cn%20%20%20%20%20%20line-height:%20var(--line-height-normal);%5Cn%20%20%20%20%20%20margin:%200;%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20textarea,%20code%20%7B%5Cn%20%20%20%20%20%20font-size:%20var(--code-size);%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20textarea%20%7B%5Cn%20%20%20%20%20%20background:%20transparent;%5Cn%20%20%20%20%20%20color:%20transparent;%5Cn%20%20%20%20%20%20z-index:%202;%5Cn%20%20%20%20%20%20width:%2020em;%5Cn%20%20%20%20%20%20height:%2010em;%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20pre%20%7B%5Cn%20%20%20%20%20%20position:%20absolute;%5Cn%20%20%20%20%20%20pointer-events:%20none;%5Cn%20%20%20%20%20%20border:%20var(--input-border-width)%20solid%20transparent;%5Cn%20%20%20%20%20%20overflow:%20auto;%5Cn%20%20%20%20%20%20inset:%200;%5Cn%20%20%20%20%20%20padding:%20var(--size-4-1)%20var(--size-4-2);%5Cn%20%20%20%20%20%20z-index:%201;%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20pre::after%20%7B%5Cn%20%20%20%20%20%20content:%20%5C%22%5C%22;%5Cn%20%20%20%20%20%20display:%20block;%5Cn%20%20%20%20%20%20height:%20var(--bottom-gap,%200);%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20pre.is-placeholder%20%7B%5Cn%20%20%20%20%20%20opacity:%200.6;%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20code%20%7B%5Cn%20%20%20%20%20%20display:%20block;%5Cn%20%20%20%20%20%20padding:%200;%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%7D%5Cn%22,%22.obsidian-dev-utils%20%7B%5Cn%20%20input%5Btype='url'%5D%20%7B%5Cn%20%20%20%20height:%20var(--input-height)%5Cn%20%20%7D%5Cn%5Cn%20%20input%5Btype='month'%5D,%5Cn%20%20input%5Btype='tel'%5D,%5Cn%20%20input%5Btype='time'%5D,%5Cn%20%20input%5Btype='url'%5D,%5Cn%20%20input%5Btype='week'%5D%20%7B%5Cn%20%20%20%20-webkit-app-region:%20no-drag;%5Cn%20%20%20%20background:%20var(--background-modifier-form-field);%5Cn%20%20%20%20border:%20var(--input-border-width)%20solid%20var(--background-modifier-border);%5Cn%20%20%20%20color:%20var(--text-normal);%5Cn%20%20%20%20font-family:%20inherit;%5Cn%20%20%20%20padding:%20var(--size-4-1)%20var(--size-4-2);%5Cn%20%20%20%20font-size:%20var(--font-ui-small);%5Cn%20%20%20%20border-radius:%20var(--input-radius);%5Cn%20%20%20%20outline:%20none;%5Cn%5Cn%20%20%20%20@at-root%20%7B%5Cn%20%20%20%20%20%20@media%20(hover:%20hover)%20%7B%5Cn%20%20%20%20%20%20%20%20&:hover%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20border-color:%20var(--background-modifier-border-hover);%5Cn%20%20%20%20%20%20%20%20%20%20transition:%5Cn%20%20%20%20%20%20%20%20%20%20%20%20box-shadow%200.15s%20ease-in-out,%5Cn%20%20%20%20%20%20%20%20%20%20%20%20border%200.15s%20ease-in-out;%5Cn%20%20%20%20%20%20%20%20%7D%5Cn%20%20%20%20%20%20%7D%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20&:active,%5Cn%20%20%20%20&:focus%20%7B%5Cn%20%20%20%20%20%20border-color:%20var(--background-modifier-border-focus);%5Cn%20%20%20%20%20%20transition:%5Cn%20%20%20%20%20%20%20%20box-shadow%200.15s%20ease-in-out,%5Cn%20%20%20%20%20%20%20%20border%200.15s%20ease-in-out;%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20&:active,%5Cn%20%20%20%20&:focus,%5Cn%20%20%20%20&:focus-visible%20%7B%5Cn%20%20%20%20%20%20box-shadow:%200%200%200%202px%20var(--background-modifier-border-focus);%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20&::placeholder%20%7B%5Cn%20%20%20%20%20%20color:%20var(--text-faint);%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%5Cn%20%20@at-root%20%7B%5Cn%20%20%20%20.mod-rtl,%5Cn%20%20%20%20.is-rtl,%5Cn%20%20%20%20.rtl%20%7B%5Cn%20%20%20%20%20%20&%20%7B%5Cn%20%20%20%20%20%20%20%20input%5Btype='month'%5D,%5Cn%20%20%20%20%20%20%20%20input%5Btype='time'%5D,%5Cn%20%20%20%20%20%20%20%20input%5Btype='week'%5D%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20direction:%20rtl;%5Cn%5Cn%20%20%20%20%20%20%20%20%20%20&::-webkit-calendar-picker-indicator%20%7B%5Cn%20%20%20%20%20%20%20%20%20%20%20%20right:%20var(--size-4-1);%5Cn%20%20%20%20%20%20%20%20%20%20%20%20left:%20auto;%5Cn%20%20%20%20%20%20%20%20%20%20%7D%5Cn%20%20%20%20%20%20%20%20%7D%5Cn%20%20%20%20%20%20%7D%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%7D%5Cn%22,%22.obsidian-dev-utils%20%7B%5Cn%20%20input%5Btype='month'%5D,%5Cn%20%20input%5Btype='time'%5D,%5Cn%20%20input%5Btype='week'%5D%20%7B%5Cn%20%20%20%20font-variant-numeric:%20tabular-nums;%5Cn%20%20%20%20position:%20relative;%5Cn%5Cn%20%20%20%20&::-webkit-datetime-edit-text%20%7B%5Cn%20%20%20%20%20%20color:%20var(--text-faint);%5Cn%20%20%20%20%20%20padding-inline-end:%200;%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20&::-webkit-calendar-picker-indicator%20%7B%5Cn%20%20%20%20%20%20position:%20absolute;%5Cn%20%20%20%20%20%20left:%20var(--size-4-1);%5Cn%20%20%20%20%20%20right:%20auto;%5Cn%20%20%20%20%20%20opacity:%200.5;%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20&::-webkit-datetime-edit-month-field,%5Cn%20%20%20%20&::-webkit-datetime-edit-day-field,%5Cn%20%20%20%20&::-webkit-datetime-edit-year-field%20%7B%5Cn%20%20%20%20%20%20&:active,%5Cn%20%20%20%20%20%20&:focus%20%7B%5Cn%20%20%20%20%20%20%20%20background-color:%20var(--text-selection);%5Cn%20%20%20%20%20%20%20%20color:%20var(--text-normal);%5Cn%20%20%20%20%20%20%20%20cursor:%20text;%5Cn%20%20%20%20%20%20%7D%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20@at-root%20.mod-rtl%20&,%5Cn%20%20%20%20%20%20.is-rtl%20&,%5Cn%20%20%20%20%20%20.rtl%20&%20%7B%5Cn%20%20%20%20%20%20direction:%20rtl;%5Cn%5Cn%20%20%20%20%20%20&::-webkit-calendar-picker-indicator%20%7B%5Cn%20%20%20%20%20%20%20%20left:%20auto;%5Cn%20%20%20%20%20%20%20%20right:%20var(--size-4-1);%5Cn%20%20%20%20%20%20%7D%5Cn%20%20%20%20%7D%5Cn%5Cn%20%20%20%20@at-root%20%7B%5Cn%20%20%20%20%20%20body:not(.is-ios):not(.is-android)%20&%20%7B%5Cn%20%20%20%20%20%20%20%20padding-inline-start:%20var(--size-4-6);%5Cn%20%20%20%20%20%20%7D%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%5Cn%20%20input%5Btype='time'%5D%20%7B%5Cn%20%20%20%20&::-webkit-calendar-picker-indicator%20%7B%5Cn%20%20%20%20%20%20margin-inline-start:%200;%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%7D%5Cn%22,%22.obsidian-dev-utils%20%7B%5Cn%20%20&progress.loop%20%7B%5Cn%20%20%20%20min-width:%20200px;%5Cn%20%20%7D%5Cn%7D%5Cn%22,%22.obsidian-dev-utils%20%7B%5Cn%20%20&.modal-container%20%7B%5Cn%20%20%20%20.ok-button%20%7B%5Cn%20%20%20%20%20%20margin-right:%2010px;%5Cn%20%20%20%20%20%20margin-top:%2020px;%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%7D%5Cn%22,%22.obsidian-dev-utils%20%7B%5Cn%20%20.multiple-dropdown-component%20%7B%5Cn%20%20%20%20select,%5Cn%20%20%20%20select:focus,%5Cn%20%20%20%20.dropdown%20%7B%5Cn%20%20%20%20%20%20height:%20auto;%5Cn%20%20%20%20%20%20padding-top:%203px;%5Cn%5Cn%20%20%20%20%20%20option:checked%20%7B%5Cn%20%20%20%20%20%20%20%20background-color:%20%231967d2;%5Cn%20%20%20%20%20%20%20%20color:%20%23fff;%5Cn%20%20%20%20%20%20%7D%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%7D%5Cn%22,%22.obsidian-dev-utils%20%7B%5Cn%20%20&.plugin-settings-tab%20%7B%5Cn%20%20%20%20a:focus%20%7B%5Cn%20%20%20%20%20%20outline:%202px%20solid%20var(--link-color);%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%7D%5Cn%22,%22.obsidian-dev-utils%20%7B%5Cn%20%20&.prompt-modal%20%7B%5Cn%20%20%20%20.text-box%20%7B%5Cn%20%20%20%20%20%20width:%20100%25;%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%7D%5Cn%22,%22.obsidian-dev-utils%20%7B%5Cr%5Cn%20%20&.tri-state-checkbox-component%20%7B%5Cr%5Cn%20%20%20%20input%5Btype='checkbox'%5D:indeterminate%20%7B%5Cr%5Cn%20%20%20%20%20%20appearance:%20checkbox;%5Cr%5Cn%20%20%20%20%7D%5Cr%5Cn%20%20%7D%5Cr%5Cn%7D%5Cr%5Cn%22,%22@mixin%20invalid%20%7B%5Cn%20%20box-shadow:%200%200%200%202px%20var(--text-error);%5Cn%7D%5Cn%5Cn.obsidian-dev-utils%20%7B%5Cn%20%20:invalid%20%7B%5Cn%20%20%20%20@include%20invalid;%5Cn%20%20%7D%5Cn%5Cn%20%20input.metadata-input-text,%5Cn%20%20input%5Btype='date'%5D,%5Cn%20%20input%5Btype='datetime-local'%5D,%5Cn%20%20input%5Btype='email'%5D,%5Cn%20%20input%5Btype='number'%5D,%5Cn%20%20input%5Btype='password'%5D,%5Cn%20%20input%5Btype='search'%5D,%5Cn%20%20input%5Btype='text'%5D,%5Cn%20%20textarea%20%7B%5Cn%20%20%20%20&:active,%5Cn%20%20%20%20&:focus-visible,%5Cn%20%20%20%20&:focus%20%7B%5Cn%20%20%20%20%20%20&:invalid%20%7B%5Cn%20%20%20%20%20%20%20%20@include%20invalid;%5Cn%20%20%20%20%20%20%7D%5Cn%20%20%20%20%7D%5Cn%20%20%7D%5Cn%5Cn%20%20&.setting-component-wrapper%20%7B%5Cn%20%20%20%20position:%20relative;%5Cn%20%20%20%20display:%20inline-flex;%5Cn%20%20%7D%5Cn%5Cn%20%20&.overlay-validator%20%7B%5Cn%20%20%20%20caret-color:%20transparent;%5Cn%20%20%20%20cursor:%20default;%5Cn%20%20%20%20position:%20absolute;%5Cn%20%20%20%20background-color:%20transparent;%5Cn%20%20%20%20border:%20none;%5Cn%20%20%20%20outline:%20none;%5Cn%20%20%20%20pointer-events:%20none;%5Cn%20%20%20%20z-index:%209999;%5Cn%20%20%20%20left:%200;%5Cn%20%20%20%20top:%200;%5Cn%20%20%20%20width:%20100%25;%5Cn%20%20%20%20height:%20100%25;%5Cn%20%20%7D%5Cn%5Cn%20%20&.tooltip.tooltip-validator%20%7B%5Cn%20%20%20%20position:%20absolute;%5Cn%20%20%20%20top:%20calc(100%25%20+%208px);%5Cn%20%20%20%20width:%20max-content;%5Cn%20%20%7D%5Cn%7D%5Cn%22%5D%7D */
`;s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();var st=class{static{s(this,"ValueWrapper")}constructor(e){this.value=e}};function at(){let n=globalThis.app;if(n)return n;try{return globalThis.require("obsidian/app")}catch{throw new Error("Obsidian App global instance not found")}}s(at,"getApp");function ye(n,e,t){let r=n??Ei()??globalThis;return r.obsidianDevUtilsState??={},r.obsidianDevUtilsState[e]??=new st(t)}s(ye,"getObsidianDevUtilsState");function Ei(){try{return at()}catch{return null}}s(Ei,"getAppOrNull");s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();function lt(){if(typeof window>"u")return!1;try{return at(),!0}catch{return!1}}s(lt,"isInObsidian");s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();var ct="__no-plugin-id-initialized__",nn=ct;function ut(){return nn}s(ut,"getPluginId");function rn(n){n&&(nn=n)}s(rn,"setPluginId");s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();var on=",",De="-";function sn(){return{disable:xi,enable:ki,get:Ne,set:be}}s(sn,"getDebugController");function Fe(n,e=0){let t=`${n}:${String(e)}`,i=ye(null,"debuggers",new Map).value,r=i.get(t);return r||(r=Ae()(n),r.log=(o,...a)=>{Si(n,e,o,...a)},i.set(t,r)),r}s(Fe,"getDebugger");function an(n){let e=ut(),t=e===ct?"":`${e}:`;return Fe(`${t}${Re}:${n}`)}s(an,"getLibDebugger");function ln(n){let e=Ae().enabled(n),t=e?"enabled":"disabled",i=e?"disable":"enable",r=Ne();be(n),Fe(n)(`Debug messages for plugin ${n} are ${t}. See https://github.com/mnaoumov/obsidian-dev-utils/blob/main/docs/debugging.md how to ${i} them.`),be(r)}s(ln,"showInitialDebugMessage");function xi(n){let e=new Set(Ne());for(let t of ve(n)){if(t.startsWith(De))continue;let i=De+t;e.has(t)&&e.delete(t),e.add(i)}be(Array.from(e))}s(xi,"disableNamespaces");function ki(n){let e=new Set(Ne());for(let t of ve(n)){if(!t.startsWith(De)){let i=De+t;e.has(i)&&e.delete(i)}e.add(t)}be(Array.from(e))}s(ki,"enableNamespaces");function Ne(){return ve(Ae().load()??"")}s(Ne,"getNamespaces");function Ae(){return lt()?ye(null,"debug",dt.default).value:dt.default}s(Ae,"getSharedDebugLibInstance");function Si(n,e,t,...i){if(!Ae().enabled(n))return;if(!lt()){console.debug(t,...i);return}let r=4,o=_(new Error().stack).split(`
`);o.splice(0,r+e),console.debug(t,...i,`

---
Logger stack trace:
`,Ti(o.join(`
`)))}s(Si,"logWithCaller");function Ti(n){return new re("Debug mode: intentional placeholder error. See https://github.com/mnaoumov/obsidian-dev-utils/blob/main/docs/debugging.md.",n,void 0)}s(Ti,"makeStackTraceError");function be(n){Ae().enable(ve(n).join(on))}s(be,"setNamespaces");function ve(n){return typeof n=="string"?n.split(on).filter(Boolean):n.flatMap(ve)}s(ve,"toArray");s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();var Oi={"\n":"\\n","\r":"\\r","	":"\\t","\b":"\\b","\f":"\\f","'":"\\'",'"':'\\"',"\\":"\\\\"};var Li={};for(let[n,e]of Object.entries(Oi))Li[e]=n;s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();var Pi=[{constructor:ArrayBuffer,equalityComparer:Ri},{constructor:Date,equalityComparer:Di},{constructor:RegExp,equalityComparer:Ni},{constructor:Map,equalityComparer:Fi},{constructor:Set,equalityComparer:Ii}];function Ie(n,e){if(n===e)return!0;if(typeof n!="object"||typeof e!="object"||n===null||e===null)return!1;let t=n.constructor,i=e.constructor;if(t!==i)return!1;if(t!==Object){let u=Mi(n,e);if(u!==void 0)return u}let r=cn(n),o=cn(e);if(r.length!==o.length)return!1;let a=n,l=e;for(let u of r)if(!o.includes(u)||!Ie(a[u],l[u]))return!1;return!0}s(Ie,"deepEqual");function cn(n){let e=[],t=n;for(;t;){let i=Object.getOwnPropertyDescriptors(t);for(let[r,o]of Object.entries(i)){if(r==="__proto__"||typeof o.value=="function")continue;let a=typeof o.get=="function",l=typeof o.set=="function";if(a||l){a&&l&&e.push(r);continue}o.enumerable&&o.writable&&e.push(r)}t=Object.getPrototypeOf(t)}return e.sort()}s(cn,"getAllKeys");function Ri(n,e){if(n.byteLength!==e.byteLength)return!1;let t=new Uint8Array(n),i=new Uint8Array(e);return Ie(t,i)}s(Ri,"deepEqualArrayBuffer");function Di(n,e){return n.getTime()===e.getTime()}s(Di,"deepEqualDate");function Fi(n,e){if(n.size!==e.size)return!1;for(let[t,i]of n.entries())if(!e.has(t)||!Ie(i,e.get(t)))return!1;return!0}s(Fi,"deepEqualMap");function Ni(n,e){return n.source===e.source&&n.flags===e.flags}s(Ni,"deepEqualRegExp");function Ii(n,e){if(n.size!==e.size)return!1;for(let t of n){if(e.has(t))continue;let i=!1;for(let r of e)if(Ie(t,r)){i=!0;break}if(!i)return!1}return!0}s(Ii,"deepEqualSet");function Mi(n,e){for(let{constructor:t,equalityComparer:i}of Pi)if(n instanceof t&&e instanceof t)return i(n,e)}s(Mi,"deepEqualTyped");s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();async function $i(n,e){e??=se(1);try{await n()}catch(t){let i=new re(Jt,e,t);if(_i(i))return;Zt(i)}}s($i,"addErrorHandler");function q(n,e){return e??=se(1),(...t)=>{nt(e);let i=se(1);e=`${e}
    at --- convertAsyncToSync --- (0)
${i}`,Y(()=>n(...t),e)}}s(q,"convertAsyncToSync");function _i(n){let e=n;for(;!(e instanceof oe);){if(!(e instanceof Error))return!1;e=e.cause}return an("Async:handleSilentError")(n),!0}s(_i,"handleSilentError");function Y(n,e){e??=se(1),$i(n,e)}s(Y,"invokeAsyncSafely");function un(n,e=0,t,i){i??=Q(),i.throwIfAborted(),t??=se(1),Y(async()=>{await ji(e,i,!0),await n(i)},t)}s(un,"invokeAsyncSafelyAfterDelay");async function ji(n,e,t){await $t(Nt(e,It(n))),t&&e?.throwIfAborted()}s(ji,"sleep");s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();function Bi(n){let e=new Set;return n.workspace.iterateAllLeaves(t=>{e.add(t.getContainer())}),Array.from(e)}s(Bi,"getAllContainers");function dn(n){return Bi(n).map(e=>e.win)}s(dn,"getAllDomWindows");s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();var ae=class{static{s(this,"AllWindowsEventHandler")}constructor(e,t){this.app=e,this.component=t}registerAllDocumentsDomEvent(e,t,i){this.registerAllWindowsHandler(r=>{this.component.registerDomEvent(r.document,e,t,i)})}registerAllWindowsDomEvent(e,t,i){this.registerAllWindowsHandler(r=>{this.component.registerDomEvent(r,e,t,i)})}registerAllWindowsHandler(e){let t=window;e(t),this.app.workspace.onLayoutReady(()=>{for(let i of dn(this.app))i!==t&&e(i);this.component.registerEvent(this.app.workspace.on("window-open",i=>{e(i.win)}))})}};var Wi=require("obsidian");s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();function ft(n,e){n.register(()=>{e.asyncEvents.offref(e)})}s(ft,"registerAsyncEvent");var b=s(n=>typeof n=="string","isString"),we=s(()=>{let n,e,t=new Promise((i,r)=>{n=i,e=r});return t.resolve=n,t.reject=e,t},"defer"),pn=s(n=>n==null?"":""+n,"makeString"),Hi=s((n,e,t)=>{n.forEach(i=>{e[i]&&(t[i]=e[i])})},"copy"),zi=/###/g,fn=s(n=>n&&n.indexOf("###")>-1?n.replace(zi,"."):n,"cleanKey"),hn=s(n=>!n||b(n),"canNotTraverseDeeper"),Ce=s((n,e,t)=>{let i=b(e)?e.split("."):e,r=0;for(;r<i.length-1;){if(hn(n))return{};let o=fn(i[r]);!n[o]&&t&&(n[o]=new t),Object.prototype.hasOwnProperty.call(n,o)?n=n[o]:n={},++r}return hn(n)?{}:{obj:n,k:fn(i[r])}},"getLastOfPath"),gn=s((n,e,t)=>{let{obj:i,k:r}=Ce(n,e,Object);if(i!==void 0||e.length===1){i[r]=t;return}let o=e[e.length-1],a=e.slice(0,e.length-1),l=Ce(n,a,Object);for(;l.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),l=Ce(n,a,Object),l?.obj&&typeof l.obj[`${l.k}.${o}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=t},"setPath"),Ui=s((n,e,t,i)=>{let{obj:r,k:o}=Ce(n,e,Object);r[o]=r[o]||[],r[o].push(t)},"pushPath"),$e=s((n,e)=>{let{obj:t,k:i}=Ce(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,i))return t[i]},"getPath"),Vi=s((n,e,t)=>{let i=$e(n,t);return i!==void 0?i:$e(e,t)},"getPathWithDefaults"),Cn=s((n,e,t)=>{for(let i in e)i!=="__proto__"&&i!=="constructor"&&(i in n?b(n[i])||n[i]instanceof String||b(e[i])||e[i]instanceof String?t&&(n[i]=e[i]):Cn(n[i],e[i],t):n[i]=e[i]);return n},"deepExtend"),J=s(n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),"regexEscape"),Ki={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},Gi=s(n=>b(n)?n.replace(/[&<>"'\/]/g,e=>Ki[e]):n,"escape"),yt=class{static{s(this,"RegExpCache")}constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}},qi=[" ",",","?","!",";"],Yi=new yt(20),Ji=s((n,e,t)=>{e=e||"",t=t||"";let i=qi.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(i.length===0)return!0;let r=Yi.getRegExp(`(${i.map(a=>a==="?"?"\\?":a).join("|")})`),o=!r.test(n);if(!o){let a=n.indexOf(t);a>0&&!r.test(n.substring(0,a))&&(o=!0)}return o},"looksLikeObjectPath"),bt=s((n,e,t=".")=>{if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;let i=e.split(t),r=n;for(let o=0;o<i.length;){if(!r||typeof r!="object")return;let a,l="";for(let u=o;u<i.length;++u)if(u!==o&&(l+=t),l+=i[u],a=r[l],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&u<i.length-1)continue;o+=u-o+1;break}r=a}return r},"deepFind"),Ee=s(n=>n?.replace(/_/g,"-"),"getCleanedCode"),Xi={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console?.[n]?.apply?.(console,e)}},At=class n{static{s(this,"Logger")}constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Xi,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,i,r){return r&&!this.debug?null:(b(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new n(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new n(this.logger,e)}},W=new At,ce=class{static{s(this,"EventEmitter")}constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);let r=this.observers[i].get(t)||0;this.observers[i].set(t,r+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([r,o])=>{for(let a=0;a<o;a++)r(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,o])=>{for(let a=0;a<o;a++)r.apply(r,[e,...t])})}},_e=class extends ce{static{s(this,"ResourceStore")}constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i,r={}){let o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,a=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure,l;e.indexOf(".")>-1?l=e.split("."):(l=[e,t],i&&(Array.isArray(i)?l.push(...i):b(i)&&o?l.push(...i.split(o)):l.push(i)));let u=$e(this.data,l);return!u&&!t&&!i&&e.indexOf(".")>-1&&(e=l[0],t=l[1],i=l.slice(2).join(".")),u||!a||!b(i)?u:bt(this.data?.[e]?.[t],i,o)}addResource(e,t,i,r,o={silent:!1}){let a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=[e,t];i&&(l=l.concat(a?i.split(a):i)),e.indexOf(".")>-1&&(l=e.split("."),r=t,t=l[1]),this.addNamespaces(t),gn(this.data,l,r),o.silent||this.emit("added",e,t,i,r)}addResources(e,t,i,r={silent:!1}){for(let o in i)(b(i[o])||Array.isArray(i[o]))&&this.addResource(e,t,o,i[o],{silent:!0});r.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,r,o,a={silent:!1,skipCopy:!1}){let l=[e,t];e.indexOf(".")>-1&&(l=e.split("."),r=i,i=t,t=l[1]),this.addNamespaces(t);let u=$e(this.data,l)||{};a.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?Cn(u,i,o):u={...u,...i},gn(this.data,l,u),a.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(r=>t[r]&&Object.keys(t[r]).length>0)}toJSON(){return this.data}},En={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,i,r){return n.forEach(o=>{e=this.processors[o]?.process(e,t,i,r)??e}),e}},xn=Symbol("i18next/PATH_KEY");function Zi(){let n=[],e=Object.create(null),t;return e.get=(i,r)=>(t?.revoke?.(),r===xn?n:(n.push(r),t=Proxy.revocable(i,e),t.proxy)),Proxy.revocable(Object.create(null),e).proxy}s(Zi,"createProxy");function le(n,e){let{[xn]:t}=n(Zi()),i=e?.keySeparator??".",r=e?.nsSeparator??":";if(t.length>1&&r){let o=e?.ns,a=Array.isArray(o)?o:null;if(a&&a.length>1&&a.slice(1).includes(t[0]))return`${t[0]}${r}${t.slice(1).join(i)}`}return t.join(i)}s(le,"keysFromSelector");var mn={},ht=s(n=>!b(n)&&typeof n!="boolean"&&typeof n!="number","shouldHandleAsObject"),je=class n extends ce{static{s(this,"Translator")}constructor(e,t={}){super(),Hi(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=W.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let i={...t};if(e==null)return!1;let r=this.resolve(e,i);if(r?.res===void 0)return!1;let o=ht(r.res);return!(i.returnObjects===!1&&o)}extractFromKey(e,t){let i=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");let r=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],a=i&&e.indexOf(i)>-1,l=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ji(e,i,r);if(a&&!l){let u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:b(o)?[o]:o};let c=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),e=c.join(r)}return{key:e,namespaces:b(o)?[o]:o}}translate(e,t,i){let r=typeof t=="object"?{...t}:t;if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";typeof e=="function"&&(e=le(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]),e=e.map(E=>typeof E=="function"?le(E,{...this.options,...r}):String(E));let o=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:l,namespaces:u}=this.extractFromKey(e[e.length-1],r),c=u[u.length-1],d=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");let p=r.lng||this.language,f=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p?.toLowerCase()==="cimode")return f?o?{res:`${c}${d}${l}`,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:`${c}${d}${l}`:o?{res:l,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:l;let h=this.resolve(e,r),m=h?.res,v=h?.usedKey||l,g=h?.exactUsedKey||l,y=["[object Number]","[object Function]","[object RegExp]"],A=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,C=r.count!==void 0&&!b(r.count),T=n.hasDefaultValue(r),x=C?this.pluralResolver.getSuffix(p,r.count,r):"",M=r.ordinal&&C?this.pluralResolver.getSuffix(p,r.count,{ordinal:!1}):"",P=C&&!r.ordinal&&r.count===0,O=P&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${x}`]||r[`defaultValue${M}`]||r.defaultValue,F=m;w&&!m&&T&&(F=O);let xe=ht(F),de=Object.prototype.toString.apply(F);if(w&&F&&xe&&y.indexOf(de)<0&&!(b(A)&&Array.isArray(F))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,F,{...r,ns:u}):`key '${l} (${this.language})' returned an object instead of string.`;return o?(h.res=E,h.usedParams=this.getUsedParamsDetails(r),h):E}if(a){let E=Array.isArray(F),N=E?[]:{},U=E?g:v;for(let k in F)if(Object.prototype.hasOwnProperty.call(F,k)){let j=`${U}${a}${k}`;T&&!m?N[k]=this.translate(j,{...r,defaultValue:ht(O)?O[k]:void 0,joinArrays:!1,ns:u}):N[k]=this.translate(j,{...r,joinArrays:!1,ns:u}),N[k]===j&&(N[k]=F[k])}m=N}}else if(w&&b(A)&&Array.isArray(m))m=m.join(A),m&&(m=this.extendTranslation(m,e,r,i));else{let E=!1,N=!1;!this.isValidLookup(m)&&T&&(E=!0,m=O),this.isValidLookup(m)||(N=!0,m=l);let k=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:m,j=T&&O!==m&&this.options.updateMissing;if(N||E||j){if(this.logger.log(j?"updateKey":"missingKey",p,c,l,j?O:m),a){let $=this.resolve(l,{...r,keySeparator:!1});$&&$.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let pe=[],ke=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ke&&ke[0])for(let $=0;$<ke.length;$++)pe.push(ke[$]);else this.options.saveMissingTo==="all"?pe=this.languageUtils.toResolveHierarchy(r.lng||this.language):pe.push(r.lng||this.language);let Pt=s(($,V,fe)=>{let Rt=T&&fe!==m?fe:k;this.options.missingKeyHandler?this.options.missingKeyHandler($,c,V,Rt,j,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing($,c,V,Rt,j,r),this.emit("missingKey",$,c,V,m)},"send");this.options.saveMissing&&(this.options.saveMissingPlurals&&C?pe.forEach($=>{let V=this.pluralResolver.getSuffixes($,r);P&&r[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(fe=>{Pt([$],l+fe,r[`defaultValue${fe}`]||O)})}):Pt(pe,l,O))}m=this.extendTranslation(m,e,r,h,i),N&&m===l&&this.options.appendNamespaceToMissingKey&&(m=`${c}${d}${l}`),(N||E)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${d}${l}`:l,E?m:void 0,r))}return o?(h.res=m,h.usedParams=this.getUsedParamsDetails(r),h):m}extendTranslation(e,t,i,r,o){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});let u=b(e)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),c;if(u){let p=e.match(this.interpolator.nestingRegexp);c=p&&p.length}let d=i.replace&&!b(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,i.lng||this.language||r.usedLng,i),u){let p=e.match(this.interpolator.nestingRegexp),f=p&&p.length;c<f&&(i.nest=!1)}!i.lng&&r&&r.res&&(i.lng=this.language||r.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,(...p)=>o?.[0]===p[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${t[0]}`),null):this.translate(...p,t),i)),i.interpolation&&this.interpolator.reset()}let a=i.postProcess||this.options.postProcess,l=b(a)?[a]:a;return e!=null&&l?.length&&i.applyPostProcessor!==!1&&(e=En.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,t={}){let i,r,o,a,l;return b(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(u=>typeof u=="function"?le(u,{...this.options,...t}):u)),e.forEach(u=>{if(this.isValidLookup(i))return;let c=this.extractFromKey(u,t),d=c.key;r=d;let p=c.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));let f=t.count!==void 0&&!b(t.count),h=f&&!t.ordinal&&t.count===0,m=t.context!==void 0&&(b(t.context)||typeof t.context=="number")&&t.context!=="",v=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);p.forEach(g=>{this.isValidLookup(i)||(l=g,!mn[`${v[0]}-${g}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(l)&&(mn[`${v[0]}-${g}`]=!0,this.logger.warn(`key "${r}" for languages "${v.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(y=>{if(this.isValidLookup(i))return;a=y;let A=[d];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(A,d,y,g,t);else{let C;f&&(C=this.pluralResolver.getSuffix(y,t.count,t));let T=`${this.options.pluralSeparator}zero`,x=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(t.ordinal&&C.indexOf(x)===0&&A.push(d+C.replace(x,this.options.pluralSeparator)),A.push(d+C),h&&A.push(d+T)),m){let M=`${d}${this.options.contextSeparator||"_"}${t.context}`;A.push(M),f&&(t.ordinal&&C.indexOf(x)===0&&A.push(M+C.replace(x,this.options.pluralSeparator)),A.push(M+C),h&&A.push(M+T))}}let w;for(;w=A.pop();)this.isValidLookup(i)||(o=w,i=this.getResource(y,g,w,t))}))})}),{res:i,usedKey:r,exactUsedKey:o,usedLng:a,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,i,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,i,r):this.resourceStore.getResource(e,t,i,r)}getUsedParamsDetails(e={}){let t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!b(e.replace),r=i?e.replace:e;if(i&&typeof e.count<"u"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(let o of t)delete r[o]}return r}static hasDefaultValue(e){let t="defaultValue";for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&e[i]!==void 0)return!0;return!1}},Be=class{static{s(this,"LanguageUtil")}constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=W.create("languageUtils")}getScriptPartFromCode(e){if(e=Ee(e),!e||e.indexOf("-")<0)return null;let t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=Ee(e),!e||e.indexOf("-")<0)return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(b(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(i=>{if(t)return;let r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(t=r)}),!t&&this.options.supportedLngs&&e.forEach(i=>{if(t)return;let r=this.getScriptPartFromCode(i);if(this.isSupportedCode(r))return t=r;let o=this.getLanguagePartFromCode(i);if(this.isSupportedCode(o))return t=o;t=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),b(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){let i=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],o=s(a=>{a&&(this.isSupportedCode(a)?r.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))},"addCode");return b(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):b(e)&&o(this.formatLanguageCode(e)),i.forEach(a=>{r.indexOf(a)<0&&o(this.formatLanguageCode(a))}),r}},yn={zero:0,one:1,two:2,few:3,many:4,other:5},bn={select:s(n=>n===1?"one":"other","select"),resolvedOptions:s(()=>({pluralCategories:["one","other"]}),"resolvedOptions")},vt=class{static{s(this,"PluralResolver")}constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=W.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let i=Ee(e==="dev"?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:i,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let a;try{a=new Intl.PluralRules(i,{type:r})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),bn;if(!e.match(/-|_/))return bn;let u=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(u,t)}return this.pluralRulesCache[o]=a,a}needsPlural(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,i={}){return this.getSuffixes(e,i).map(r=>`${t}${r}`)}getSuffixes(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?i.resolvedOptions().pluralCategories.sort((r,o)=>yn[r]-yn[o]).map(r=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(e,t,i={}){let r=this.getRule(e,i);return r?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,i))}},An=s((n,e,t,i=".",r=!0)=>{let o=Vi(n,e,t);return!o&&r&&b(t)&&(o=bt(n,t,i),o===void 0&&(o=bt(e,t,i))),o},"deepFindWithDefaults"),gt=s(n=>n.replace(/\$/g,"$$$$"),"regexSafe"),We=class{static{s(this,"Interpolator")}constructor(e={}){this.logger=W.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(t=>t),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:i,useRawValueToEscape:r,prefix:o,prefixEscaped:a,suffix:l,suffixEscaped:u,formatSeparator:c,unescapeSuffix:d,unescapePrefix:p,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:m,nestingSuffixEscaped:v,nestingOptionsSeparator:g,maxReplaces:y,alwaysFormat:A}=e.interpolation;this.escape=t!==void 0?t:Gi,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=o?J(o):a||"{{",this.suffix=l?J(l):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=d?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=f?J(f):h||J("$t("),this.nestingSuffix=m?J(m):v||J(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=y||1e3,this.alwaysFormat=A!==void 0?A:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=s((t,i)=>t?.source===i?(t.lastIndex=0,t):new RegExp(i,"g"),"getOrResetRegExp");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,i,r){let o,a,l,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=s(h=>{if(h.indexOf(this.formatSeparator)<0){let y=An(t,u,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,i,{...r,...t,interpolationkey:h}):y}let m=h.split(this.formatSeparator),v=m.shift().trim(),g=m.join(this.formatSeparator).trim();return this.format(An(t,u,v,this.options.keySeparator,this.options.ignoreJSONStructure),g,i,{...r,...t,interpolationkey:v})},"handleFormat");this.resetRegExp();let d=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:s(h=>gt(h),"safeValue")},{regex:this.regexp,safeValue:s(h=>this.escapeValue?gt(this.escape(h)):gt(h),"safeValue")}].forEach(h=>{for(l=0;o=h.regex.exec(e);){let m=o[1].trim();if(a=c(m),a===void 0)if(typeof d=="function"){let g=d(e,o,r);a=b(g)?g:""}else if(r&&Object.prototype.hasOwnProperty.call(r,m))a="";else if(p){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),a="";else!b(a)&&!this.useRawValueToEscape&&(a=pn(a));let v=h.safeValue(a);if(e=e.replace(o[0],v),p?(h.regex.lastIndex+=a.length,h.regex.lastIndex-=o[0].length):h.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t,i={}){let r,o,a,l=s((u,c)=>{let d=this.nestingOptionsSeparator;if(u.indexOf(d)<0)return u;let p=u.split(new RegExp(`${J(d)}[ ]*{`)),f=`{${p[1]}`;u=p[0],f=this.interpolate(f,a);let h=f.match(/'/g),m=f.match(/"/g);((h?.length??0)%2===0&&!m||(m?.length??0)%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),c&&(a={...c,...a})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,v),`${u}${d}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,u},"handleHasOptions");for(;r=this.nestingRegexp.exec(e);){let u=[];a={...i},a=a.replace&&!b(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(u=r[1].slice(c).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),o=t(l.call(this,r[1].trim(),a),a),o&&r[0]===e&&!b(o))return o;b(o)||(o=pn(o)),o||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),o=""),u.length&&(o=u.reduce((d,p)=>this.format(d,p,i.lng,{...i,interpolationkey:r[1].trim()}),o.trim())),e=e.replace(r[0],o),this.regexp.lastIndex=0}return e}},Qi=s(n=>{let e=n.toLowerCase().trim(),t={};if(n.indexOf("(")>-1){let i=n.split("(");e=i[0].toLowerCase().trim();let r=i[1].substring(0,i[1].length-1);e==="currency"&&r.indexOf(":")<0?t.currency||(t.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?t.range||(t.range=r.trim()):r.split(";").forEach(a=>{if(a){let[l,...u]=a.split(":"),c=u.join(":").trim().replace(/^'+|'+$/g,""),d=l.trim();t[d]||(t[d]=c),c==="false"&&(t[d]=!1),c==="true"&&(t[d]=!0),isNaN(c)||(t[d]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},"parseFormatStr"),vn=s(n=>{let e={};return(t,i,r)=>{let o=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(o={...o,[r.interpolationkey]:void 0});let a=i+JSON.stringify(o),l=e[a];return l||(l=n(Ee(i),r),e[a]=l),l(t)}},"createCachedFormatter"),er=s(n=>(e,t,i)=>n(Ee(t),i)(e),"createNonCachedFormatter"),wt=class{static{s(this,"Formatter")}constructor(e={}){this.logger=W.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let i=t.cacheInBuiltFormats?vn:er;this.formats={number:i((r,o)=>{let a=new Intl.NumberFormat(r,{...o});return l=>a.format(l)}),currency:i((r,o)=>{let a=new Intl.NumberFormat(r,{...o,style:"currency"});return l=>a.format(l)}),datetime:i((r,o)=>{let a=new Intl.DateTimeFormat(r,{...o});return l=>a.format(l)}),relativetime:i((r,o)=>{let a=new Intl.RelativeTimeFormat(r,{...o});return l=>a.format(l,o.range||"day")}),list:i((r,o)=>{let a=new Intl.ListFormat(r,{...o});return l=>a.format(l)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=vn(t)}format(e,t,i,r={}){let o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(l=>l.indexOf(")")>-1)){let l=o.findIndex(u=>u.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,l)].join(this.formatSeparator)}return o.reduce((l,u)=>{let{formatName:c,formatOptions:d}=Qi(u);if(this.formats[c]){let p=l;try{let f=r?.formatParams?.[r.interpolationkey]||{},h=f.locale||f.lng||r.locale||r.lng||i;p=this.formats[c](l,h,{...d,...r,...f})}catch(f){this.logger.warn(f)}return p}else this.logger.warn(`there was no format function for ${c}`);return l},e)}},tr=s((n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)},"removePending"),Ct=class extends ce{static{s(this,"Connector")}constructor(e,t,i,r={}){super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=W.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,r.backend,r)}queueLoad(e,t,i,r){let o={},a={},l={},u={};return e.forEach(c=>{let d=!0;t.forEach(p=>{let f=`${c}|${p}`;!i.reload&&this.store.hasResourceBundle(c,p)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,d=!1,a[f]===void 0&&(a[f]=!0),o[f]===void 0&&(o[f]=!0),u[p]===void 0&&(u[p]=!0)))}),d||(l[c]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(u)}}loaded(e,t,i){let r=e.split("|"),o=r[0],a=r[1];t&&this.emit("failedLoading",o,a,t),!t&&i&&this.store.addResourceBundle(o,a,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);let l={};this.queue.forEach(u=>{Ui(u.loaded,[o],a),tr(u,e),t&&u.errors.push(t),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{l[c]||(l[c]={});let d=u.loaded[c];d.length&&d.forEach(p=>{l[c][p]===void 0&&(l[c][p]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(u=>!u.done)}read(e,t,i,r=0,o=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:i,tried:r,wait:o,callback:a});return}this.readingCalls++;let l=s((c,d)=>{if(this.readingCalls--,this.waitingReads.length>0){let p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(c&&d&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,i,r+1,o*2,a)},o);return}a(c,d)},"resolver"),u=this.backend[i].bind(this.backend);if(u.length===2){try{let c=u(e,t);c&&typeof c.then=="function"?c.then(d=>l(null,d)).catch(l):l(null,c)}catch(c){l(c)}return}return u(e,t,l)}prepareLoading(e,t,i={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();b(e)&&(e=this.languageUtils.toResolveHierarchy(e)),b(t)&&(t=[t]);let o=this.queueLoad(e,t,i,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e,t=""){let i=e.split("|"),r=i[0],o=i[1];this.read(r,o,"read",void 0,void 0,(a,l)=>{a&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,a),!a&&l&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,l),this.loaded(e,a,l)})}saveMissing(e,t,i,r,o,a={},l=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${i}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend?.create){let u={...a,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let d;c.length===5?d=c(e,t,i,r,u):d=c(e,t,i,r),d&&typeof d.then=="function"?d.then(p=>l(null,p)).catch(l):l(null,d)}catch(d){l(d)}else c(e,t,i,r,l,u)}!e||!e[0]||this.store.addResource(e[0],t,i,r)}}},mt=s(()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:s(n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),b(n[1])&&(e.defaultValue=n[1]),b(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){let t=n[3]||n[2];Object.keys(t).forEach(i=>{e[i]=t[i]})}return e},"overloadTranslationOptionHandler"),interpolation:{escapeValue:!0,format:s(n=>n,"format"),prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),"get"),wn=s(n=>(b(n.ns)&&(n.ns=[n.ns]),b(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),b(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs?.indexOf?.("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n),"transformOptions"),Me=s(()=>{},"noop"),nr=s(n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})},"bindMemberFunctions"),kn="__i18next_supportNoticeShown",ir=s(()=>!!(typeof globalThis<"u"&&globalThis[kn]||typeof process<"u"&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE),"getSupportNoticeShown"),rr=s(()=>{typeof globalThis<"u"&&(globalThis[kn]=!0)},"setSupportNoticeShown"),or=s(n=>!!(n?.modules?.backend?.name?.indexOf("Locize")>0||n?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||n?.options?.backend?.backends&&n.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||n?.options?.backend?.projectId||n?.options?.backend?.backendOptions&&n.options.backend.backendOptions.some(e=>e?.projectId)),"usesLocize"),Et=class n extends ce{static{s(this,"I18n")}constructor(e={},t){if(super(),this.options=wn(e),this.services={},this.logger=W,this.modules={external:[]},nr(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(b(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));let i=mt();this.options={...i,...this.options,...wn(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!or(this)&&!ir()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("\u{1F310} i18next is made possible by our own product, Locize \u2014 consider powering your project with managed localization (AI, CDN, integrations): https://locize.com \u{1F499}"),rr());let r=s(c=>c?typeof c=="function"?new c:c:null,"createClassOnDemand");if(!this.options.isClone){this.modules.logger?W.init(r(this.modules.logger),this.options):W.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=wt;let d=new Be(this.options);this.store=new _e(this.options.resources,this.options);let p=this.services;p.logger=W,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new vt(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(p.formatter=r(c),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new We(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new Ct(r(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(h,...m)=>{this.emit(h,...m)}),this.modules.languageDetector&&(p.languageDetector=r(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=r(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new je(this.services,this.options),this.translator.on("*",(h,...m)=>{this.emit(h,...m)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Me),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...d)=>this.store[c](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...d)=>(this.store[c](...d),this)});let l=we(),u=s(()=>{let c=s((d,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(p),t(d,p)},"finish");if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)},"load");return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),l}loadResources(e,t=Me){let i=t,r=b(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();let o=[],a=s(l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})},"append");r?a(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>a(u)),this.options.preload?.forEach?.(l=>a(l)),this.services.backendConnector.load(o,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(l)})}else i(null)}reloadResources(e,t,i){let r=we();return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),i||(i=Me),this.services.backendConnector.reload(e,t,o=>{r.resolve(),i(o)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&En.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){let i=this.languages[t];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let i=we();this.emit("languageChanging",e);let r=s(l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},"setLngProps"),o=s((l,u)=>{u?this.isLanguageChangingTo===e&&(r(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve((...c)=>this.t(...c)),t&&t(l,(...c)=>this.t(...c))},"done"),a=s(l=>{!e&&!l&&this.services.languageDetector&&(l=[]);let u=b(l)?l:l&&l[0],c=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(b(l)?[l]:l);c&&(this.language||r(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,d=>{o(d,c)})},"setLng");return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),i}getFixedT(e,t,i){let r=s((o,a,...l)=>{let u;typeof a!="object"?u=this.options.overloadTranslationOptionHandler([o,a].concat(l)):u={...a},u.lng=u.lng||r.lng,u.lngs=u.lngs||r.lngs,u.ns=u.ns||r.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||i||r.keyPrefix);let c={...this.options,...u};typeof u.keyPrefix=="function"&&(u.keyPrefix=le(u.keyPrefix,c));let d=this.options.keySeparator||".",p;return u.keyPrefix&&Array.isArray(o)?p=o.map(f=>(typeof f=="function"&&(f=le(f,c)),`${u.keyPrefix}${d}${f}`)):(typeof o=="function"&&(o=le(o,c)),p=u.keyPrefix?`${u.keyPrefix}${d}${o}`:o),this.t(p,u)},"fixedT");return b(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=i,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let i=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;let a=s((l,u)=>{let c=this.services.backendConnector.state[`${l}|${u}`];return c===-1||c===0||c===2},"loadNotPending");if(t.precheck){let l=t.precheck(this,a);if(l!==void 0)return l}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(i,e)&&(!r||a(o,e)))}loadNamespaces(e,t){let i=we();return this.options.ns?(b(e)&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),t&&t(r)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){let i=we();b(e)&&(e=[e]);let r=this.options.preload||[],o=e.filter(a=>r.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return o.length?(this.options.preload=r.concat(o),this.loadResources(a=>{i.resolve(),t&&t(a)}),i):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let r=new Intl.Locale(e);if(r&&r.getTextInfo){let o=r.getTextInfo();if(o&&o.direction)return o.direction}}catch{}let t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services?.languageUtils||new Be(mt());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){let i=new n(e,t);return i.createInstance=n.createInstance,i}cloneInstance(e={},t=Me){let i=e.forkResourceStore;i&&delete e.forkResourceStore;let r={...this.options,...e,isClone:!0},o=new n(r);if((e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(l=>{o[l]=this[l]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},i){let l=Object.keys(this.store.data).reduce((u,c)=>(u[c]={...this.store.data[c]},u[c]=Object.keys(u[c]).reduce((d,p)=>(d[p]={...u[c][p]},d),u[c]),u),{});o.store=new _e(l,r),o.services.resourceStore=o.store}if(e.interpolation){let u={...mt().interpolation,...this.options.interpolation,...e.interpolation},c={...r,interpolation:u};o.services.interpolator=new We(c)}return o.translator=new je(o.services,r),o.translator.on("*",(l,...u)=>{o.emit(l,...u)}),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}},D=Et.createInstance(),as=D.createInstance,ls=D.dir,Sn=D.init,cs=D.loadResources,us=D.reloadResources,ds=D.use,ps=D.changeLanguage,fs=D.getFixedT,xt=D.t,hs=D.exists,gs=D.setDefaultNamespace,ms=D.hasLoadedNamespace,ys=D.loadNamespaces,bs=D.loadLanguages;var On=require("obsidian");s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();var He={obsidianDevUtils:{asyncWithNotice:{milliseconds:"milliseconds...",operation:"Operation",runningFor:"Running for",terminateOperation:"You can terminate the operation by clicking the button below, but be aware it might leave the vault in an inconsistent state.",timedOut:"The operation timed out after {{duration}} milliseconds."},buttons:{cancel:"Cancel",ok:"OK"},callout:{loadContent:"Load content for callout"},dataview:{itemsPerPage:"Items per page:",jumpToPage:"Jump to page:",pageHeader:"Page {{pageNumber}} of {{totalPages}}, Total items: {{totalItems}}"},metadataCache:{getBacklinksForFilePath:"Get backlinks for {{filePath}}"},notices:{attachmentIsStillUsed:"Attachment {{attachmentPath}} is still used by other notes. It will not be deleted.",unhandledError:"An unhandled error occurred. Please check the console for more information."},queue:{flushQueue:"Flush queue"},renameDeleteHandler:{handleDelete:"Handle delete: {{filePath}}",handleOrphanedRenames:"Handle orphaned renames",handleRename:"Handle rename: {{oldPath}} -> {{newPath}}",updatedLinks:"Updated {{linksCount}} links in {{filesCount}} files."},vault:{processFile:"Process file {{filePath}}"}}};s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();var kt="en",sr={en:He},ze=sr;s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();var Tn="translation",St=!1;async function Tt(n,e=!0){St||(St=!0,await Sn({fallbackLng:kt,initAsync:e,interpolation:{escapeValue:!1},lng:(0,On.getLanguage)(),resources:Object.fromEntries(Object.entries(n).map(([t,i])=>[t,{[Tn]:i}])),returnEmptyString:!1,returnNull:!1}),D.addResourceBundle(kt,Tn,He,!0,!1))}s(Tt,"initI18N");function ar(n,e){return St||(console.warn("I18N was not initialized, initializing default obsidian-dev-utils translations"),Y(()=>Tt(ze,!1))),e?xt(n,e):xt(n)}s(ar,"tImpl");var Ln=ar;var Fn=Ft(Rn(),1);s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();var Dn=`${Re}-styles`;function Nn(n){let e=n;e.DEBUG=sn()}s(Nn,"initDebugController");function In(n,e){rn(e),ln(e);let t=ye(n,"lastLibraryVersion","0.0.0");(0,Fn.compareVersions)(ot,t.value)<=0||(t.value=ot,document.head.querySelector(`#${Dn}`)?.remove(),document.head.createEl("style",{attr:{id:Dn},text:tn}))}s(In,"initPluginContext");s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();var Ve=class extends Ke.Plugin{static{s(this,"PluginBase")}events=new K;get abortSignal(){if(!this._abortSignal)throw new Error("Abort signal not defined");return this._abortSignal}get settings(){return this.settingsManager.settingsWrapper.safeSettings}get settingsManager(){if(!this._settingsManager)throw new Error("Settings manager not defined");return this._settingsManager}get settingsTab(){if(!this._settingsTab)throw new Error("Settings tab not defined");return this._settingsTab}_abortSignal;_settingsManager=null;_settingsTab=null;lifecycleEventNames=new Set;notice;consoleDebug(e,...t){Fe(this.manifest.id,1)(e,...t)}async onExternalSettingsChange(){await super.onExternalSettingsChange?.(),await this._settingsManager?.loadFromFile(!1)}async onload(){await super.onload(),await this.onloadImpl(),un(this.afterLoad.bind(this))}onunload(){super.onunload(),Y(async()=>{try{await this.onunloadImpl()}finally{await this.triggerLifecycleEvent("unload")}})}registerForLifecycleEvent(e,t){Y(async()=>{await this.waitForLifecycleEvent(e),await t()})}async waitForLifecycleEvent(e){this.lifecycleEventNames.has(e)||await new Promise(t=>{this.events.once(e,()=>{t()})})}createSettingsManager(){return null}createSettingsTab(){return null}createTranslationsMap(){return ze}handleAsyncError(e){this.showNotice(Ln(t=>t.obsidianDevUtils.notices.unhandledError))}async onLayoutReady(){await me()}async onloadImpl(){In(this.app,this.manifest.id),new ae(this.app,this).registerAllWindowsHandler(t=>{Nn(t)}),await Tt(this.createTranslationsMap()),this.register(en(this.handleAsyncError.bind(this))),this._settingsManager=this.createSettingsManager(),this._settingsManager&&(ft(this,this._settingsManager.on("loadSettings",this.onLoadSettings.bind(this))),ft(this,this._settingsManager.on("saveSettings",this.onSaveSettings.bind(this)))),await this._settingsManager?.loadFromFile(!0),this._settingsTab=this.createSettingsTab(),this._settingsTab&&this.addSettingTab(this._settingsTab);let e=new AbortController;this._abortSignal=e.signal,this.register(()=>{e.abort(new oe(`Plugin ${this.manifest.id} had been unloaded`))})}async onLoadSettings(e,t){await me()}async onSaveSettings(e,t,i){await me()}async onunloadImpl(){await me()}showNotice(e){this.notice&&this.notice.hide(),this.notice=new Ke.Notice(`${this.manifest.name}
${e}`)}async afterLoad(){this.abortSignal.aborted||(await this.triggerLifecycleEvent("load"),this.app.workspace.onLayoutReady(q(this.onLayoutReadyBase.bind(this))))}async onLayoutReadyBase(){try{await this.onLayoutReady()}finally{await this.triggerLifecycleEvent("layoutReady")}}async triggerLifecycleEvent(e){this.lifecycleEventNames.add(e),await this.events.triggerAsync(e)}};var L=require("obsidian");function Mn(n,e){let t=Object.keys(e).map(i=>lr(n,i,e[i]));return t.length===1?t[0]:function(){t.forEach(i=>i())}}s(Mn,"around");function lr(n,e,t){let i=n[e],r=n.hasOwnProperty(e),o=r?i:function(){return Object.getPrototypeOf(n)[e].apply(this,arguments)},a=t(o);return i&&Object.setPrototypeOf(a,i),Object.setPrototypeOf(l,a),n[e]=l,u;function l(...c){return a===o&&n[e]===l&&u(),a.apply(this,c)}s(l,"wrapper");function u(){n[e]===l&&(r?n[e]=o:delete n[e]),a!==o&&(a=o,Object.setPrototypeOf(l,i||Function))}s(u,"remove")}s(lr,"around1");s((function(){if(globalThis.process)return;let e={browser:!0,cwd(){return"/"},env:{},platform:"android"};globalThis.process=e}),"initEsm")();function cr(n,e){return Mn(n,e)}s(cr,"around");function Ge(n,e,t){let i=cr(e,t),r=!1;function o(){if(!r)try{i()}finally{r=!0}}return s(o,"uninstallerWrapper"),n.register(o),i}s(Ge,"registerPatch");var _n=require("obsidian");var $n=40,ur=30,dr=16,Ot=".metadata-property:not(.nested-properties-container .metadata-property):has(> .metadata-property-value > .nested-properties-container):not(.is-collapsed)",qe=class extends _n.Component{constructor(t){super();this.app=t}static{s(this,"FloatingScrollbar")}activeEl=null;thumb=null;track=null;onload(){this.track=createDiv("nested-properties-floating-scrollbar"),this.thumb=this.track.createDiv("nested-properties-floating-scrollbar-thumb"),document.body.appendChild(this.track),this.registerDomEvent(this.track,"wheel",i=>{if(!this.activeEl||this.activeEl.scrollWidth<=this.activeEl.clientWidth)return;let r=i.deltaX||i.deltaY;this.activeEl.scrollLeft+=r,i.preventDefault(),i.stopPropagation()},{passive:!1}),this.registerDomEvent(this.track,"mousedown",i=>{this.handleTrackMousedown(i)});let t=new ae(this.app,this);t.registerAllDocumentsDomEvent("keydown",i=>{!this.activeEl||i.key!=="ArrowLeft"&&i.key!=="ArrowRight"||document.activeElement instanceof HTMLInputElement||document.activeElement instanceof HTMLTextAreaElement||document.activeElement instanceof HTMLElement&&document.activeElement.isContentEditable||(this.activeEl.scrollLeft+=i.key==="ArrowLeft"?-$n:$n,i.preventDefault())}),t.registerAllDocumentsDomEvent("scroll",()=>{this.update()},!0),t.registerAllDocumentsDomEvent("wheel",i=>{this.handleNativeScrollbarWheel(i)},{capture:!0,passive:!1}),t.registerAllDocumentsDomEvent("mousemove",i=>{this.handleNativeScrollbarCursor(i)}),t.registerAllWindowsHandler(()=>{this.update()})}onunload(){this.activeEl&&(this.activeEl.removeEventListener("scroll",this.syncThumb),this.activeEl=null),this.track?.remove(),this.track=null,this.thumb=null}update(){if(!this.track)return;let t=document.querySelector(".status-bar"),i=t instanceof HTMLElement?t.offsetHeight:0,r=window.innerHeight-i,o=null;for(let l of document.querySelectorAll(Ot)){if(l.scrollWidth<=l.clientWidth)continue;let u=l.getBoundingClientRect();if(u.bottom>r&&u.top<r){o=l;break}}if(o!==this.activeEl&&(this.activeEl&&this.activeEl.removeEventListener("scroll",this.syncThumb),this.activeEl=o,this.activeEl&&this.activeEl.addEventListener("scroll",this.syncThumb)),!this.activeEl){this.track.classList.remove("is-visible");return}let a=this.activeEl.getBoundingClientRect();this.track.style.setProperty("--track-left",`${String(a.left)}px`),this.track.style.setProperty("--track-width",`${String(a.width)}px`),this.track.style.setProperty("--track-bottom",`${String(i)}px`),this.track.classList.add("is-visible"),this.syncThumb()}handleNativeScrollbarCursor(t){let i=t.target;if(!(i instanceof HTMLElement))return;let r=i.closest(Ot);!r||r.scrollWidth<=r.clientWidth||r.classList.toggle("nested-properties-ew-resize",jn(r,t))}handleNativeScrollbarWheel(t){let i=pr(t);if(!i)return;let r=t.deltaX||t.deltaY;i.scrollLeft+=r,t.preventDefault(),t.stopPropagation()}handleTrackMousedown(t){if(!this.activeEl||!this.track)return;t.preventDefault();let i=this.track.getBoundingClientRect(),r=this.activeEl;function o(c){return(c.clientX-i.left)/i.width}s(o,"toRatio");function a(c){let d=r.scrollWidth-r.clientWidth;r.scrollLeft=Math.max(0,Math.min(1,c))*d}s(a,"scrollToRatio");function l(c){a(o(c))}s(l,"onMouseMove");function u(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",u)}s(u,"onMouseUp"),a(o(t)),document.addEventListener("mousemove",l),document.addEventListener("mouseup",u)}syncThumb=s(()=>{if(!this.track||!this.thumb||!this.activeEl)return;let t=this.activeEl.scrollWidth-this.activeEl.clientWidth;if(t<=0)return;let i=this.track.clientWidth,r=Math.max(ur,this.activeEl.clientWidth/this.activeEl.scrollWidth*i),o=this.activeEl.scrollLeft/t*(i-r);this.thumb.style.setProperty("--thumb-width",`${String(r)}px`),this.thumb.style.setProperty("--thumb-left",`${String(o)}px`)},"syncThumb")};function pr(n){let e=n.target;if(!(e instanceof HTMLElement))return null;let t=e.closest(Ot);return!t||t.scrollWidth<=t.clientWidth||!jn(t,n)?null:t}s(pr,"findScrollbarTarget");function jn(n,e){let t=n.getBoundingClientRect();return e.clientY>=t.bottom-dr&&e.clientY<=t.bottom}s(jn,"isNearScrollbar");var Bn=require("obsidian");var Ye=class extends Bn.Modal{static{s(this,"TypeChangeModal")}confirmed=!1;resolve;typeName;constructor(e,t){super(e),this.typeName=t}onClose(){this.resolve?.(this.confirmed)}onOpen(){this.titleEl.setText(`Display as ${this.typeName}?`),this.contentEl.createEl("p",{text:"Your text data is not compatible. It will be adapted to fit the new format."});let e=this.contentEl.createDiv({cls:"modal-button-container"});e.createEl("button",{cls:"mod-cta",text:"Update"}).addEventListener("click",()=>{this.confirmed=!0,this.close()}),e.createEl("button",{text:"Cancel"}).addEventListener("click",()=>{this.close()})}waitForResult(){return new Promise(e=>{this.resolve=e})}};function Wn(n,e){switch(e){case"aliases":case"multitext":case"tags":return yr(n);case"checkbox":return!!n;case"date":case"datetime":return fr(n);case"list":return hr(n);case"number":return gr(n);case"object":return mr(n);default:return Lt(n)}}s(Wn,"convertValue");function z(n){return n!==null&&typeof n=="object"}s(z,"isComplexValue");function Hn(n,e){switch(e){case"aliases":case"multitext":case"tags":return!X(n);case"list":return!Array.isArray(n);case"object":return!z(n)||Array.isArray(n);default:return!1}}s(Hn,"isLossyConversion");function X(n){return Array.isArray(n)&&n.every(e=>!z(e))}s(X,"isSimpleArray");function fr(n){return typeof n=="string"&&n&&window.moment(n).isValid()?n:null}s(fr,"convertToDate");function hr(n){return Array.isArray(n)?n:n!==null&&typeof n=="object"?[n]:n==null?[]:[n]}s(hr,"convertToMixedList");function gr(n){return Number(Lt(n))||0}s(gr,"convertToNumber");function mr(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)?n:{}}s(mr,"convertToObject");function yr(n){if(Array.isArray(n))return X(n)?n:n.filter(t=>!z(t));if(n!==null&&typeof n=="object")return[];let e=Lt(n);return e?[e]:[]}s(yr,"convertToSimpleList");function Lt(n){return String(n??"")}s(Lt,"convertToString");var Z="list",ue="object",Je=class extends L.Component{constructor(t){super();this.app=t}static{s(this,"NestedPropertyRenderer")}_listWidget=null;_mixedListWidget=null;_objectWidget=null;expandedPaths=new Set;floatingScrollbar=null;lastMenuCloseTime=0;pendingFocusKey=null;widgetTypeOverrides=new Map;get listWidget(){return _(this._listWidget)}get mixedListWidget(){return _(this._mixedListWidget)}get objectWidget(){return _(this._objectWidget)}onload(){this._mixedListWidget={icon:"lucide-list-tree",name:s(()=>"Mixed list","name"),render:s((i,r,o)=>this.renderComplexWidget(i,r,o,Z),"render"),type:Z,validate:s(i=>Array.isArray(i),"validate")},this._objectWidget={icon:"lucide-braces",name:s(()=>"Object","name"),render:s((i,r,o)=>this.renderComplexWidget(i,r,o,ue),"render"),type:ue,validate:s(i=>i!==null&&typeof i=="object"&&!Array.isArray(i),"validate")},this.app.metadataTypeManager.registeredTypeWidgets[Z]=this.mixedListWidget,this.app.metadataTypeManager.registeredTypeWidgets[ue]=this.objectWidget,this._listWidget=this.app.metadataTypeManager.registeredTypeWidgets.multitext,Ge(this,this.listWidget,{validate:s(i=>r=>this.validateListWidget(i,r),"validate")}),Ge(this,this.app.metadataTypeManager,{getTypeInfo:s(i=>(r,o)=>this.getTypeInfo(i,r,o),"getTypeInfo")});let t=this.app.metadataTypeManager.getWidget("unknown");Ge(this,t,{render:s(i=>(r,o,a)=>this.renderUnknownWidget(i,r,o,a),"render")}),this.register(()=>{delete this.app.metadataTypeManager.registeredTypeWidgets[Z],delete this.app.metadataTypeManager.registeredTypeWidgets[ue];for(let i of document.querySelectorAll(".nested-properties-header-actions"))i.remove();this.reloadAllProperties()}),this.floatingScrollbar=this.addChild(new qe(this.app)),this.reloadAllProperties()}reloadAllProperties(){for(let t of this.app.workspace.getLeavesOfType("markdown"))if(t.view instanceof L.MarkdownView){let i=t.view.metadataEditor.serialize();t.view.metadataEditor.synchronize({}),t.view.metadataEditor.synchronize(i)}}async changeType(t,i,r,o){if(Hn(r,t.type)){let l=new Ye(this.app,t.name());if(l.open(),!await l.waitForResult())return}document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this.widgetTypeOverrides.set(i,t.type);let a=Wn(r,t.type);a===r?this.reloadAllProperties():o(a)}getTypeInfo(t,i,r){let o=t.call(this.app.metadataTypeManager,i,r);return o.inferred.type==="unknown"&&z(r)&&(X(r)?o.inferred=this.listWidget:Array.isArray(r)?o.inferred=this.mixedListWidget:o.inferred=this.objectWidget,o.expected=o.inferred),o}getWidget(t,i,r){let o=this.widgetTypeOverrides.get(t);if(o){let a=this.app.metadataTypeManager.registeredTypeWidgets[o];if(a)return a}return this.app.metadataTypeManager.getTypeInfo(i,r).inferred}renderArray(t,i,r,o,a){for(let[l,u]of i.entries())this.renderEntry(t,String(l),u,r,o,c=>{let d=[...i];d[l]=c,a(d)},()=>{let c=i.filter((d,p)=>p!==l);a(c)});wr(t,i,a)}renderComplexWidget(t,i,r,o){o===Z&&!Array.isArray(i)?i=[]:o===ue&&(!z(i)||Array.isArray(i))&&(i={});let a=`${r.sourcePath}:${r.key}`,l=t.closest(".metadata-property");if(l instanceof HTMLElement){let c=this.expandedPaths.has(a);l.classList.add("nested-properties-collapsible"),l.setAttribute("data-path",a),c||l.classList.add("is-collapsed");let d=l.querySelector(".metadata-property-key .metadata-property-icon");d instanceof HTMLElement&&(0,L.setIcon)(d,o===Z?"lucide-list-tree":"lucide-braces");let p=l.querySelector(".metadata-property-key");if(p&&!p.querySelector(".nested-properties-collapse-btn")){let f=createDiv("nested-properties-collapse-btn");(0,L.setIcon)(f,"right-triangle"),p.insertBefore(f,p.firstChild),f.addEventListener("click",h=>{h.stopPropagation(),h.preventDefault();let m=l.hasClass("is-collapsed");l.toggleClass("is-collapsed",!m),m?this.expandedPaths.add(a):this.expandedPaths.delete(a),this.floatingScrollbar?.update()})}}l instanceof HTMLElement&&zn(t,i,l,a,this.expandedPaths);let u=t.createDiv({cls:"nested-properties-container"});return this.renderNestedValue(u,i,r,a,c=>{r.onChange(c)}),setTimeout(()=>{let c=u.closest(".metadata-container");if(c instanceof HTMLElement&&vr(c,this.expandedPaths),this.pendingFocusKey){let d=this.pendingFocusKey;this.pendingFocusKey=null;for(let p of u.querySelectorAll(".metadata-property-key-input"))if(p instanceof HTMLInputElement&&p.value===d){let h=p.closest(".metadata-property")?.querySelector(":scope > .metadata-property-value");if(h instanceof HTMLElement){let m=h.querySelector("input, textarea, [contenteditable]");m instanceof HTMLElement?m.focus():h.click()}break}}this.floatingScrollbar?.update()},0),{focus:s(()=>{u.focus()},"focus"),type:o}}renderEntry(t,i,r,o,a,l,u){let c=a?`${a}.${i}`:i,d=this.widgetTypeOverrides.get(c);if(d===Z||d===ue||z(r)&&!X(r)){let v=this.expandedPaths.has(c),g=t.createDiv({attr:{"data-path":c},cls:["metadata-property","nested-properties-collapsible",...v?[]:["is-collapsed"]]});g.addEventListener("contextmenu",P=>{P.stopPropagation(),this.showNestedPropertyMenu(P,c,i,r,l,u)});let y=g.createDiv({cls:"metadata-property-key"}),A=y.createDiv({cls:"nested-properties-collapse-btn"});(0,L.setIcon)(A,"right-triangle"),A.addEventListener("click",P=>{P.stopPropagation(),P.preventDefault();let O=g.hasClass("is-collapsed");g.toggleClass("is-collapsed",!O),O?this.expandedPaths.add(c):this.expandedPaths.delete(c)});let w=this.getWidget(c,i,r),C=y.createSpan({cls:"metadata-property-icon"});(0,L.setIcon)(C,w.icon),C.addEventListener("click",P=>{P.stopPropagation(),this.showNestedPropertyMenu(P,c,i,r,l,u)});let T=y.createEl("input",{attr:{readonly:"",tabindex:"-1"},cls:"metadata-property-key-input",value:i});T.size=Math.max(1,i.length);let x=g.createDiv({cls:"metadata-property-value"});zn(x,r,g,c,this.expandedPaths);let M=x.createDiv({cls:"nested-properties-container"});this.renderNestedValue(M,r,o,c,l);return}let f=t.createDiv({cls:"metadata-property"});f.addEventListener("contextmenu",v=>{v.stopPropagation(),this.showNestedPropertyMenu(v,c,i,r,l,u)}),this.renderKeyEl(f,c,i,r,l,u);let h=this.getWidget(c,i,r),m=f.createDiv({cls:"metadata-property-value"});m.setAttr("data-property-type",h.type),h.render(m,r,{app:o.app,blur:o.blur.bind(o),key:i,onChange:l,sourcePath:o.sourcePath})}renderKeyEl(t,i,r,o,a,l){let u=t.createDiv({cls:"metadata-property-key"}),c=this.getWidget(i,r,o),d=u.createSpan({cls:"metadata-property-icon"});(0,L.setIcon)(d,c.icon),a&&l&&d.addEventListener("click",f=>{f.stopPropagation(),this.showNestedPropertyMenu(f,i,r,o,a,l)});let p=u.createEl("input",{attr:{readonly:"",tabindex:"-1"},cls:"metadata-property-key-input",value:r});p.size=Math.max(1,r.length)}renderNestedValue(t,i,r,o,a){Array.isArray(i)?this.renderArray(t,i,r,o,a):this.renderObject(t,i,r,o,a)}renderObject(t,i,r,o,a){for(let[l,u]of Object.entries(i))this.renderEntry(t,l,u,r,o,c=>{let d={...i,[l]:c};a(d)},()=>{let c={...i};delete c[l],a(c)});Cr(t,i,a,l=>{this.pendingFocusKey=l})}renderUnknownWidget(t,i,r,o){if(X(r)){let a=i.closest(".metadata-property")?.querySelector(".metadata-property-key .metadata-property-icon");return a instanceof HTMLElement&&(0,L.setIcon)(a,this.listWidget.icon),this.listWidget.render(i,r,o)}return Array.isArray(r)?this.mixedListWidget.render(i,r,o):z(r)?this.objectWidget.render(i,r,o):t(i,r,o)}showNestedPropertyMenu(t,i,r,o,a,l){if(Date.now()-this.lastMenuCloseTime<200)return;let c=new L.Menu;c.onHide(()=>{this.lastMenuCloseTime=Date.now()}),c.addSections(["type","action","","danger"]),c.addItem(d=>{d.setTitle("Property type").setIcon("lucide-info").setSection("type");let p=d.setSubmenu(),f=this.getWidget(i,r,o);for(let h of Object.values(this.app.metadataTypeManager.registeredTypeWidgets))h.reservedKeys&&!h.reservedKeys.contains(r)||p.addItem(m=>{m.setTitle(h.name()).setIcon(h.icon).setChecked(h.type===f.type).onClick(q(async()=>{await this.changeType(h,i,o,a)}))})}),c.addItem(d=>{d.setTitle("Cut").setIcon("lucide-scissors").setSection("action").onClick(q(async()=>{await navigator.clipboard.writeText(JSON.stringify({[r]:o})),l()}))}),c.addItem(d=>{d.setTitle("Copy").setIcon("lucide-copy").setSection("action").onClick(q(async()=>{await navigator.clipboard.writeText(JSON.stringify({[r]:o}))}))}),c.addItem(d=>{d.setTitle("Paste").setIcon("lucide-clipboard-paste").setSection("action").onClick(q(async()=>{try{let p=await navigator.clipboard.readText(),f=JSON.parse(p);if(f!==null&&typeof f=="object"&&!Array.isArray(f)){let h=Object.values(f)[0];h!==void 0&&a(h)}}catch(p){console.error(p)}}))}),c.addItem(d=>{d.dom.addClass("is-warning"),d.setTitle("Remove").setIcon("lucide-trash-2").setSection("danger").onClick(l)}),c.showAtMouseEvent(t)}validateListWidget(t,i){return t(i)||X(i)}};function br(n,e){for(let t of n.querySelectorAll(".nested-properties-collapsible")){t.classList.add("is-collapsed");let i=t.getAttribute("data-path");i&&e.delete(i)}}s(br,"collapseAllIn");function zn(n,e,t,i,r){n.createSpan({cls:"nested-properties-summary",text:Array.isArray(e)?"[ ... ]":"{ ... }"}).addEventListener("click",a=>{a.stopPropagation(),a.preventDefault(),t.classList.remove("is-collapsed"),r.add(i)})}s(zn,"createSummary");function Ar(n,e){for(let t of n.querySelectorAll(".nested-properties-collapsible")){t.classList.remove("is-collapsed");let i=t.getAttribute("data-path");i&&e.add(i)}}s(Ar,"expandAllIn");function vr(n,e){if(n.querySelector(".nested-properties-header-actions")||!n.querySelector(".nested-properties-collapsible"))return;let t=n.querySelector(".metadata-properties-heading");if(!t)return;let i=n.createDiv({cls:"nested-properties-header-actions"});t.after(i);let r=i.createDiv({cls:"clickable-icon"});Un(r,n),r.addEventListener("click",o=>{o.stopPropagation(),o.preventDefault();let a=n.querySelectorAll(".nested-properties-collapsible");a.length>0&&Array.from(a).every(u=>u.classList.contains("is-collapsed"))?Ar(n,e):br(n,e),Un(r,n)})}s(vr,"injectHeaderButtons");function wr(n,e,t){let i=n.createDiv({cls:"nested-properties-add-item"});(0,L.setIcon)(i,"plus"),i.createSpan({text:"Add item"}),i.addEventListener("click",r=>{r.stopPropagation(),r.preventDefault(),t([...e,""])})}s(wr,"renderAddItemButton");function Cr(n,e,t,i){let r=n.createDiv({cls:"nested-properties-add-property"});(0,L.setIcon)(r,"plus"),r.createSpan({text:"Add property"}),r.addEventListener("click",o=>{o.stopPropagation(),o.preventDefault(),r.empty();let a=r.createEl("input",{attr:{placeholder:"Property name",type:"text"},cls:"nested-properties-add-property-input"});a.focus();function l(){r.empty(),(0,L.setIcon)(r,"plus"),r.createSpan({text:"Add property"})}s(l,"restoreButton");function u(c){let d=a.value.trim();d&&!(d in e)?(c&&i(d),t({...e,[d]:""})):l()}s(u,"addKey"),a.addEventListener("keydown",c=>{if(c.stopPropagation(),c.key==="Enter"||c.key==="Tab"){c.preventDefault();try{a.remove()}catch{}u(c.key==="Tab");return}c.key==="Escape"&&(c.preventDefault(),l())}),a.addEventListener("blur",()=>{a.isConnected&&u(!1)})})}s(Cr,"renderAddPropertyButton");function Un(n,e){let t=e.querySelectorAll(".nested-properties-collapsible"),i=t.length>0&&Array.from(t).every(r=>r.classList.contains("is-collapsed"));n.setAttribute("aria-label",i?"Expand all nested properties":"Collapse all nested properties"),n.empty(),(0,L.setIcon)(n,i?"chevrons-up-down":"chevrons-down-up")}s(Un,"updateToggleButton");var Xe=class extends Ve{static{s(this,"Plugin")}createSettingsManager(){return null}createSettingsTab(){return null}async onloadImpl(){await super.onloadImpl(),this.addChild(new Je(this.app))}};var Er=Xe;
